我在我们的Windows服务器上安装了logstash 5.5.2,我想在识别一些句子时发送电子邮件警报。 我的输出部分如下:
output {
tcp {
host => "host.com"
port => 1234
codec => "json_lines"
}
if "The message was Server with id " in [log_message] {
email {
to => "<myName@company.com>"
from => "<otherName@company.com>"
subject => "Issue appearance"
body => "The input is: %{incident}"
domain => "smtp.intra.company.com"
port => 25
#via => "smtp"
}
}
}
在调试期间,我收到以下消息:
[2017-09-11T13:19:39,181][ERROR][logstash.plugins.registry] Problems loading a plugin with {:type=>"output", :name=>"email", :path=>"logstash/outputs/email", :error_message=>"NameError", :error_class=>NameError
[2017-09-11T13:19:39,186][DEBUG][logstash.plugins.registry] Problems loading the plugin with {:type=>"output", :name=>"email"}
[2017-09-11T13:19:39,195][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Couldn't find any output plugin named 'email'. Are you sure this is correct? Trying to load the email output plugin resulted in this error: Problems loading the requested plugin named email of type output.
我猜这说我没有安装电子邮件插件。 有人可以建议一种解决方法吗? 使用其他解决方案不是一种选择,以防有人提出建议。
谢谢和问候, Fotis
答案 0 :(得分:0)
我尝试按照official documentation中的说明操作
但是创建脱机插件包的选项不起作用。
所以我做的是在我的客户端上创建一个正在运行的logstash实例,运行命令来安装output-email插件logstash-plugin install logstash-output-email
然后我在我的服务器上复制了这个实例(没有上网功能)。