HI ,
I will get around 100 alerts in a day and all those come in different emails .
So , is there any way i can get all the alerts only in one mail on a particular time everyday using logstash.
Please help me solve it.
This is how far i came :
logstash.conf
input {
file {
path => "/home/Desktop/a.log"
start_position => "beginning"
}
}output {
elasticsearch { hosts => ["localhost:9200"] }
stdout { codec => rubydebug }if "Error" in [message] {
email {
from => "#######@gmail.com"
subject => "Ignore (test run)"
body => "log-message: %{message} \nLog file: %{path}"
to => "#######@gmail.com"
codec => "plain"
contenttype => "text/plain; charset=UTF-8"
address => "smtp.gmail.com"
port => "587"
authentication => "plain"
username => "##########@gmail.com"
password => "############"
use_tls => true
debug => true
}
}
}