Email Notifications
Re: Email Notifications
Ok thanks. I will try that. So if its SMTP is there one for that ? Is there docs on each ?
Re: Email Notifications
If you need to use SMTP, you will need to have an associated XI User and use the xi_host_notification handler and xi_service_notification handler commands for that User's contact. Otherwise, you will need to write a notification-handling script that can use SMTP, or configure Sendmail to work with SMTP. The following guides might help:
https://assets.nagios.com/downloads/nag ... ntacts.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... iables.pdf
https://assets.nagios.com/downloads/nag ... ntacts.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... iables.pdf
Former Nagios employee
Re: Email Notifications
Gotcha. I'll test w/ sendmail and those mail commands hopefully that will work with what I need to do.
Thanks!
Thanks!
Re: Email Notifications
Sounds good! We can keep this thread open for a bit and if you have any questions/news feel free to update.
Former Nagios employee
Re: Email Notifications
Perhaps this is a different issue but I did see the email alert. It was coming from a different email address with sendmail then I thought it would. Was the hostname of the VM but would like it to come accross with a different from address. Is that possible?
Second. Via the Web it seemed to take a long time for the problem to show up via the web interface? Not sure why that would be ? Almost a couple minutes?
Thanks.
Second. Via the Web it seemed to take a long time for the problem to show up via the web interface? Not sure why that would be ? Almost a couple minutes?
Thanks.
Re: Email Notifications
Yeah, you have to edit the command definition for notify-host-by-email and notify-service-from email. Depends on the distro, but for mine I had to put -a "From:[email protected]" right after the /usr/bin/mail command.jcwuerfl wrote:Perhaps this is a different issue but I did see the email alert. It was coming from a different email address with sendmail then I thought it would. Was the hostname of the VM but would like it to come accross with a different from address. Is that possible?
Where on the Web UI do you mean?jcwuerfl wrote:Second. Via the Web it seemed to take a long time for the problem to show up via the web interface? Not sure why that would be ? Almost a couple minutes?
Former Nagios Employee.
me.
me.
Re: Email Notifications
If you used notify-host-by-email and notify-service-by-email you would edit those commands in your /usr/local/nagios/etc/commands.cfg, I believe adding a -r [email protected] to the mail command should make it work, you should test it from the command line first though.
For your second issue, are you saying that you received the notification but it didn't show up in the interface until a few minutes later? Did you manually refresh the page?
Code: Select all
echo 'testing' | mail -s "TEST" [email protected] -r [email protected]