【发布时间】:2015-10-28 15:55:18
【问题描述】:
如果字符串匹配,我正在尝试从 logstash 发送电子邮件警报,但是当我要在 logstash 1.4 上安装 logstash-output-email 插件时出现错误
sudo bin/plugin install logstash-output-email
Can only install contrib at this time... Exiting.
我不知道我需要安装那个插件还是它已经安装了
已编辑 升级到 2.0 Logstash 后,我的配置如下所示
output {
elasticsearch { hosts => ["localhost:9200"] }
if "ERROR" in [message] {
email {
options => [ "smtpIporHost", "smtp.gmail.com",
"port", "587",
"userName", "test@gmail.com",
"password", "password",
"authenticationType", "plain",
"starttls","true"
]
from => "test@gmail.com"
subject => "logstash alert"
to => "test@gmail.com"
via => "smtp"
body => "Here is the event line that occured: %{message}"
}
}
stdout { codec => rubydebug }
}
任何想法并在 logstash 日志中出错
:message=>"Unknown setting 'options' for email", :level=>:error}
{:timestamp=>"2015-11-02T12:59:24.598000+0000", :message=>"Error: Something is wrong with your configuration."}
【问题讨论】:
-
sudo bin/plugin install在 Logstash 1.4 中不起作用。 Logstash's Plugin Ecosystem 是在 v1.5.0 版本中引入的。有更新的可能吗? -
我明天会检查升级到 1.5
-
升级到 2.0 logstash 后出现错误
标签: email logstash logstash-configuration