I want to send an email notification if there are any errors inside the Logstash import process.
For this I'm using the email plugin inside the output section
output {
email {
to => "mail@gmail.com"
from => "server@server.com"
body => "%{message}"
address => "address"
port => port
username => "username"
password => "password"
use_tls => true
debug => true
authentication => "login"
subject => "subject"
}
}
I want to check the %{message} to see if there are any errors but the "%{message} is always empty.
Do you know why "%{message}" is always empty or some other way to send an email notification if there are any errors inside the Logstash import process?