Page 1 of 1

Notifications improvement

Posted: Thu Dec 29, 2011 1:36 am
by srrhd
What about implementing HTML notifications like "Nagios Flexible Notifications" from http://nagios.frank4dd.com/howto/nagios ... ations.htm ?

Re: Notifications improvement

Posted: Thu Dec 29, 2011 12:16 pm
by mguthrie
HTML in the notification message is actually allowed already. You can just add html tags to a user's notification message to format it however you'd like.
***** Nagios XI Alert *****

<h1>TESTING CHANGES TO MY NOTIFICATION MESSAGE</h1>

Notification Type: %type%
Host: %host%
State: %hoststate%
Address: %hostaddress%
Info: %hostoutput%
Date/Time: %datetime%

Nagios URL: %xiserverurl%
TEST Macro: %_test%
At one point we added the ability to put php scripts right into the notification messages as well, but I don't know if we ever published the documentation for it or if it ever reached production, I'll do some snooping on that part.

Re: Notifications improvement

Posted: Wed Jan 04, 2012 2:53 pm
by ecarrasq
Is there a way to change the notification messages per service by different hours?

Example:

service1(disk space usage)
notifications from 5am to 10pm send 'notification_message_X',
notifications from 10pm to 5am 'send notification_message_Z'

Re: Notifications improvement

Posted: Mon Jan 09, 2012 11:23 am
by mguthrie
Currently for this I think you'd have to have two contacts for a service, each with their own notification_period defined.

Contact A's notification period = 9am-5pm
Contact B's notification period = 5pm-9am

Re: Notifications improvement

Posted: Thu Jan 12, 2012 5:18 pm
by ecarrasq
It is working well so far. Thank you for the tip.

1. I created the additional"Contacts" based on the individual Admin notification needs (requests). Were one admin would have about 3 or 4 contacts assigned to their email address.
2. Created a Contact Group, so I won't have to add each individual Admin to every service.
3. Created the customised notifications (added certain phrases on the subject line of the notification message, so their mobile devices can alert them based on a particular phrase/word).

All I have to do now is simply add the desired contact group to the individual service.

I tested everything and all is well.

Thank you,
Eddie

Re: Notifications improvement

Posted: Fri Jan 13, 2012 10:29 am
by mguthrie
Good deal, glad it's working for you!