Overriding notification contacts

Assaf Flatto nagios at flatto.net
Wed Sep 1 12:44:15 CEST 2010


  On 01/09/10 09:37, J.M. wrote:
> Hey there,
>
> In case one has many services checked via wildcard templates:
>
> define service {
>          name            std
>          use             normal
>          register        0 ;;; template
>
>          host_name       * ;;; ALL hosts
>
>          check_period    24x7
>          ; contact_groups are inherited from host definitions
> }
>
> define service {
>          name            std_ping
>          use             std
>
>          service_description            PING
> ....
>          check_command                  check_ping
> }
>
> Now suppose there are services for a few hosts that would need to have a
> different check_period (they have, in hosts.cfg).
>
> What would be the most elegant way to accomplish that without adding too many
> new services?
>
> Would/could the check_period maybe be inherited from the host? Don't think so.
>
> As far as I can see, just adding the concerned services with a specific host
> will only result in duplicate service definition warnings. Unless one would have
> to remember removing those specific hosts from the wildcard service while
> defining the more specific service. In that scenario some kind of override would
> be cool.
>
> Any thoughts that didn't cross my mind yet?
>
> Regards,
> JM
>
>
>
An alternate template with the changed parameter could do the trick .

this will mean you build another template with another time period for 
the check and use that template for the services you need.

Since the service in your example is a template and not and active one - 
there should be no conflicts .

-- 
Never,Ever Cut A Deal With a Dragon


Next year I will be doing the London to Paris bike ride to
raise money for the DogTrust (www.dogtrust.co.uk) .
Please Sponsor me at http://www.justgiving.com/Assaf-Flatto


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
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