2009/9/28 Glyn Astill <glynast...@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 hth, Jim ------------------------------------------------------------------------------ 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@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