Different notifications times for same service on different hosts?

Thomas Guyot-Sionnest dermoth at aei.ca
Mon Sep 28 14:42:29 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/09/09 08:10 AM, Jim Avery wrote:
> 2009/9/28 Glyn Astill <glynastill at yahoo.co.uk>:
>> Hi Chaps,
>>
>> I've got a nagios server that constantly performs various checks on database servers.  I have one set of services that serve as the checks for all of the database servers since they are all identical.
>>
>> What I want to do is prevent the checks running against just one of the servers during the early hours of the morning, is this possible without duplicating all the service checks again?
>>
>> E.g. I've got a service defined like :
>>
>> define service{
>>        use                             generic-service
>>        host_name                       svr-a,svr-b,svr-c,svr-restore
>>        service_description             Some check
>>        check_command                   check_nrpe!some_check
>>        check_interval                  10
>>        check_period                    24x7
>>        notification_period             24x7
>>        contact_groups                  admins,smsadmins
>> }
>>
>> Now I want 24x7 notifications from this service for svr-a, svr-b and svr-c but I don not want notifications from svr-restore in the early hours (whilst it is restoring the database)
>>
>> Does anyone know how to do this? Or an I going to have to duplicate all the service checks for the restore server?
> 
> 
> In Nagios 3, some variables can be inherited by the service definition
> from the host definition.
> 
> So, if you set a suitable notification_period in your host definition
> it will be inherited by all of the services for that host too (unless
> you explicitly set it in the service definition).
> 
> See: http://nagios.sourceforge.net/docs/3_0/objectinheritance.html

My understanding is that you can define custom variables in the host
definitions and use them in the service definition. This is very useful
to define per-host thresholds for example.

I doubt the macros will be expanded for the timeperiod definition
though. Have you tried? That would definately be an interesting feature
if it doesn't work already (and probably not so hard to implement).

It there really is inheritance from host to service can you point
exactly where it is mentioned in the documentation?

Thanks

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKwK816dZ+Kt5BchYRAj7UAJwMKg+3lILetsT+Rs0KE2/FotPIAQCfQQg2
m6AL2BSOBZWQ4aMyc3V2fpI=
=0DjG
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
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