Page 1 of 1

How can I have different Notification For Diferrent states?

Posted: Wed Aug 28, 2013 9:49 am
by doulakis
Hello,
I need to have different notification for different states (hosts and services) is it possilbe to do this,
without creating the same contact two times?
For example i want to get notified by SMS for critical states and for all the other states i want to get an email.

Is it possible to create two different templates of contact with diferent notification method and use in the definition of contact both of these?

Thank you.

Re: How can I have different Notification For Diferrent stat

Posted: Wed Aug 28, 2013 11:38 am
by slansing
Well you would more than likely need to create a contact group, that contains your two contact's. They would both receive the notifications that their contact definition allows them to "w,c,u,s,r, etc."

Re: How can I have different Notification For Diferrent stat

Posted: Wed Aug 28, 2013 4:15 pm
by grimm26
Or write a notification script that can differentiate between the types of alerts and send the alert to the appropriate address.

Re: How can I have different Notification For Diferrent stat

Posted: Wed Aug 28, 2013 4:18 pm
by abrist
grimm26 wrote:Or write a notification script that can differentiate between the types of alerts and send the alert to the appropriate address.
^This. It can be done as others have done so. You will need to make use of a number of nagiso macros. If you choose this route, I would suggest that you start with the following documents:

http://nagios.sourceforge.net/docs/3_0/macrolist.html
http://nagiosplug.sourceforge.net/devel ... lines.html