Exclude or otherwise?

Flak Magnet flakmagnet at tabletop-battlezone.com
Tue Jun 15 18:39:23 CEST 2004


Ballowe, Charles wrote:
> I have a server in a server group but it routinely trips the threshold for
> CPU load during a certain window every day. This is expected and we'd rather
> not generate a page on it. Is there a clean way -- other than moving this
> server out of the hostgroup into it's own group and defining a special
> service that has that window disabled for alerts?
> 
> Basically - I'd like to find some way to handle exceptions to rules without
> major changes to configurations when they come up. Any suggestions?

I'm relatively new to using nagios, but from what I know, I would 
recommend making the services that you have exceptions to the rule for 
as a registered template then using that template to define your exception.

Just a wild guess, but from the sound of it, you're using hostgroup_name 
in the service def to tell nagios which hosts have the service.  You're 
necessarily giving up some flexibility if that's the case.  It wouldn't 
be a major change to config files to instead use host_name and the 
service templates to get what your after.

By way of example, I think you have something like:

define service{
		hostgroup_name	HOSTGROUP
		check_command	SOMESERVICE!threshold
		other service directives ...
		}

But if you instead:

define service{
		name	template.service.SOMESERVICE
		host_name comma,delimiated,list,of,hosts
		check_command	SOMESERVICE!threshold
		other service directives ...
		}

define service{
		use	template.service.SOMESERVICE
		host_name exception_to_rule_host(s)
		check_command	SOMESERVICE!differentthreshold
		}

The service description in the second service definition of the second 
example will over-ride JUST the check_command for your exceptional host. 
  Did that make any darned sense at all?

You're welcome to RTFM, of course for the details of what I describe. 
Alternatively if you send me the service definition that you've referred 
to I'll send you the changes that I suggest.  Your preference.

A link to the FM that you might want to R:
http://nagios.sourceforge.net/docs/1_0/templaterecursion.html

-- 

--Tim
The moment one accepts the idea that dissent is unpatriotic,
one wastes the sacrifices of every true patriot that's ever lived.


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
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