On 1/16/07, Scott Greenman <[EMAIL PROTECTED]> 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.

Scott Greenman

------------------------------



I guess it really depends on how many different hosts your are monitoring
the service, but you could always template the service description and then
override the hostname and notifcation_enabled directives when you actually
come to use the service. It's probably overkill for monitoring on only 2
hosts, but if your scenario is applicable to a wider number of Hosts, it
could be an option.

Rob
-------------------------------------------------------------------------
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

Reply via email to