输出电子邮件插件logstash

时间:2017-06-15 15:15:24

标签: logstash

您好我想使用电子邮件插件。我收到此错误:

Cannot create pipeline {:reason=>"Couldn't find any output plugin named 'email'

这是pipeline.conf:

output {
if  "ERROR" in [LEVEL]
{
elasticsearch {
  hosts=>"localhost:9200"
  }
  }
  email {
        options => [ "smtpIporHost", "smtp.gmail.com",
         "port", "587",
         "userName", "user",
         "password", "mypassword",
         "authenticationType", "plain",
         "starttls","true"
           ]
            from => "transmitter"
            subject => "logstash alert"
            to => "receiver"
            via => "smtp"
            body => "Here is the event line that occured: %{message}"
       }
stdout { codec => rubydebug }
}

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:2)

默认情况下未安装email插件,因此您必须运行:

bin/logstash-plugin install logstash-output-email
相关问题