Different notifications times for same service on different hosts?

Glyn Astill glynastill at yahoo.co.uk
Mon Sep 28 14:14:44 CEST 2009


--- On Mon, 28/9/09, Jim Avery <jim at jimavery.me.uk> wrote:

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

Hi Jim, 

I've already tried this, but it's not working like that. I'm on version 3.0.3 - is there any reason why the inheritance wouldn't work?

E.g. I've got:

define host{
        use                     linux-server
        host_name               svr-restore
        alias                   svr-restore Restore
        address                 10.10.10.111
        check_period            nonrestorehours
        notification_period     nonrestorehours
        contact_groups          admins,smsadmins
}

define timeperiod{
        timeperiod_name         nonrestorehours
        alias                   Non-Restore Hours
        sunday                  00:00-02:00,9:00-24:00          ; Every Sunday of every week
        monday                  00:00-02:00,9:00-24:00          ; Every Monday of every week
        tuesday                 00:00-02:00,9:00-24:00          ; Every Tuesday of every week
        wednesday               00:00-02:00,9:00-24:00          ; Every Wednesday of every week
        thursday                00:00-02:00,9:00-24:00          ; Every Thursday of every week
        friday                  00:00-02:00,9:00-24:00          ; Every Friday of every week
        saturday                00:00-02:00,9:00-24:00          ; Every Saturday of every week
}

Thanks
Glyn



      

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