Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29748

How to attach an attachment in the logstash output email?

$
0
0

In the guide format , they said the attachment is using array. However after the format and it seems the email has been sent but no attachment in it.

Do anyone know how to use the attachment option in logstash email output??

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

Viewing all articles
Browse latest Browse all 29748

Trending Articles