Hi,
Can anyone help me with this I have created two conf file under /etc/logstash/conf.d/
- syslog.conf === Working fine
input {
beats {
port => "5044"
}
}
filter {
grok {
match => { "message" => "%{SYSLOGLINE}"}
}
geoip {
source => "clientip"
}
}
output {
elasticsearch {
hosts => [ "192.168.0.119:9200" ]
user => "${ES_USER}"
password => "${ES_PWD}"
}
}
- Output.conf for Email alert but not working .
if "ERROR" in [LEVEL]
{
elasticsearch {
hosts=>"192.168.0.119:9200"
user =>"${ES_USER}"
password =>"${ES_PWD}"
}
}
email {
options => [ "smtpIporHost", "smtp.gmail.com",
"port", "587",
"userName", "username",
"password", "Password",
"authenticationType", "plain",
"starttls","true"
]
from => "transmitter"
subject => "logstash alert"
to => "receiver"
via => "smtp"
body => "Here is the event line that occured: %{message}"
}
stdout { }
}
Request if anyone can help me to get this work.
Regards,
Ravi