使用下面的配置我使用logstash将日志发送到我的电子邮箱:
output {
email {
to => "xyz@gmail.com"
codec => "plain"
contenttype => "text/html; charset=UTF-8"
body => "Here is the event line that occured: %{message}"
options => {
smpt => {
smtpIporHost => "smtp.gmail.com"
port => 567
userName => "user@gmail.com"
password => "mypass"
starttls => true
}
}
}
}
由于
答案 0 :(得分:1)
你得到的错误很清楚:
未知设置电子邮件的“选项”
您需要这样配置email
output:
email {
to => "xyz@gmail.com"
codec => "plain"
contenttype => "text/html; charset=UTF-8"
body => "Here is the event line that occured: %{message}"
address => "smtp.gmail.com"
port => 587
username => "xyz@gmail.com"
password => "passw"
use_tls => true
}