Defining different notification behavior for the same service on different hosts

Scott Greenman GreenmanSE at ldschurch.org
Wed Jan 17 00:24:03 CET 2007


I can't any way to have the same service on two hosts have different
notification rules.  Am I missing anything?
 
Say you have two hosts, 'A' and 'B'.  The service 'S' is defined as existing on
both hosts. 
 
If 'S' goes down on 'A', I want notifications sent.  If 'S' goes down on 'B', I
don't want any notifications sent.  
 
If I set the 'notifications_enabled' directive on the service to either on or
off, it's wrong for one host or the other.
 
If I set the 'notifications_enabled' directive on the two hosts, this only
affects host notifications, it seems to have no effect on service notifications
on those hosts.
 
To get what I want, It seems I'd have to create two services, one with
'notifications_enabled' set to 1 and one with it set to 0 (zero).  
 
That would be a real pain because most of my services would have to be
duplicated this way.  We run one group of machines as our 'production'
environment where notifications are turned on and another group of machines as a
'test' environment where notifications are turned off.  Both of these are
monitored by the same nagios server and both run the same set of services.
 
Unless someone can suggest an alternative, I am planning on having
notifications turned on for both environments, and add filtering in the script
defined as the 'service_notification_commands' for the contacts. This has the
down side that Nagios will show I sent notifications to both hosts, when some of
those notifications will have been filtered out by my script.
 
Any help or ideas would be greatly appreciated.
 
Scott Greenman
 

----------------------------------------------------------------------
NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070116/bbd98411/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list