Email 如何在logstash输出电子邮件中附加附件?
在指南格式中,他们说附件使用数组。 然而,在格式和电子邮件似乎已经发送,但没有在它的附件 有人知道如何在logstash电子邮件输出中使用附件选项吗Email 如何在logstash输出电子邮件中附加附件?,email,logstash,Email,Logstash,在指南格式中,他们说附件使用数组。 然而,在格式和电子邮件似乎已经发送,但没有在它的附件 有人知道如何在logstash电子邮件输出中使用附件选项吗 output { if "shouldmail" in [tags] { email { to => 'technical@example.com' from => 'monitor@example.com' subject => 'Alert - %{title}' body => "Tags: %{tags
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'
attachment => ["C:\picture.jpg"]
port => 25
}
}
}
使用附件代替附件
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
}
}
}
您好,我使用上述示例,但收到的电子邮件中仍然没有任何附件。数组是否需要提供除文件路径以外的其他元素?