Scott Greenman wrote: > 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. >
Sounds sensible. Since the two services really have different options defined, you can't keep them as one service without hackery. If the hackery lets you maintain configuration in a very simple manner I'd say it's worth it. Otherwise I'd go with creating two services. -- Andreas Ericsson [EMAIL PROTECTED] OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 ------------------------------------------------------------------------- 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 _______________________________________________ Nagios-users mailing list [email protected] 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
