如何在logstash输出电子邮件中附加附件?

时间:2020-02-24 03:18:38

标签: email logstash

在指南格式中,他们表示附件正在使用数组。 但是,在格式化之后,似乎已经发送了电子邮件,但其中没有附件。

有人知道如何在logstash电子邮件输出中使用附件选项吗?

/test

1 个答案:

答案 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
  }
 }
}