gpt4 book ai didi

email - logstash 电子邮件插件安装给出错误

转载 作者:行者123 更新时间:2023-12-04 02:16:33 27 4
gpt4 key购买 nike

如果字符串匹配,我试图从 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."}

最佳答案

I am getting error now after upgrade to 2.0 logstash

是的,因为 options => 已弃用,在 logstash v2.0 中不再可用。请参阅v2.0 email plugin docs .这就是为什么它说 :message=>"Unknown setting 'options' for email

您需要将 options => 部分内的所有值迁移到新设置中。这样的事情可能会起作用:

email  {
port => "587"
address => "smtp.gmail.com"
username => "test@gmail.com"
password => "password"
authentication => "plain"
use_tls => true
from => "test@gmail.com"
subject => "logstash alert"
to => "test@gmail.com"
via => "smtp"
body => "Here is the event line that occured: %{message}"
}

看看这两个,old v1.5 email docsnew v2.0 email docs有关迁移的更多信息。

关于email - logstash 电子邮件插件安装给出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33395753/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com