Email Notifications

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jcwuerfl
Posts: 76
Joined: Tue Jun 10, 2014 12:44 pm

Re: Email Notifications

Post by jcwuerfl »

Ok thanks. I will try that. So if its SMTP is there one for that ? Is there docs on each ?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Email Notifications

Post by tmcdonald »

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
Former Nagios employee
jcwuerfl
Posts: 76
Joined: Tue Jun 10, 2014 12:44 pm

Re: Email Notifications

Post by jcwuerfl »

Gotcha. I'll test w/ sendmail and those mail commands hopefully that will work with what I need to do.
Thanks!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Email Notifications

Post by tmcdonald »

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
jcwuerfl
Posts: 76
Joined: Tue Jun 10, 2014 12:44 pm

Re: Email Notifications

Post by jcwuerfl »

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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Email Notifications

Post by hsmith »

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?
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: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?
Where on the Web UI do you mean?
Former Nagios Employee.
me.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Email Notifications

Post by ssax »

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.

Code: Select all

echo 'testing' | mail -s "TEST" [email protected] -r [email protected]
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?
Locked