# Alerting
if [log_message] == "POSSIBLE BREAK-IN ATTEMPT!" {
email {
body => "Triggered in: %{message}"
subject => "This is a Logstash alert for POSSIBLE BREAK-IN ATTEMPTS!"
from => "logstash.alert@example.com"
to => "admin@example.com"
via => "sendmail"
}
}
Yields the following:
[root@logs:/etc/logstash/conf.d] #/opt/logstash/bin/logstash --configtest --config 20-filters.conf
The error reported is:
Couldn't find any filter plugin named 'email'. Are you sure this is correct? Trying to load the email filter plugin resulted in this error: no such file to load -- logstash/filters/email
The email plugin is an output plugin and has to be in the 'output' block of the configuration. Based on the error message it looks like you are trying to use it from the 'filter' block.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.