在指南格式中,他们表示附件正在使用数组。 但是,在格式化之后,似乎已经发送了电子邮件,但其中没有附件。
有人知道如何在logstash电子邮件输出中使用附件选项吗?
/test
答案 0 :(得分:0)
使用附件代替附件
output {
if "shouldmail" in [tags] {
email {
to => 'technical@example.com'
from => 'monitor@example.com'
subject => 'Alert - %{title}'
body => "Tags: %{tags}\\n\\Content:\\n%{message}"
template_file => "/tmp/email_template.mustache"
domain => 'mail.example.com'
attachments => ["C:\picture.jpg"]
port => 25
}
}
}