how to have host-defined services override hostgroup-defined services?

Peter Grace pete.grace at gmail.com
Wed Sep 23 21:04:15 CEST 2009


Hi list,

I saw a patch a few months ago that was supposed to allow hostgroup-defined
services to be overriden by host-defined services.  In my case, I have a sql
server that I don't want to follow my generic memory check, but instead want
to tweak its arguments a bit.  I have shown below both service definitions,
one utilizing hostgroup and the other utilizing host.  When I tried to use
this, the parser reported an error for duplicate object however I was under
the impression the patch (referenced here:
http://markmail.org/download.xqy?id=ms6rzljthml7ejlt&number=1 from
nagios-devel) would make this setup work.  NOTE, the patch was not accepted
as it was provided here, however there is very similar functionality as of
3.2.0 in xodtemplate.c.

Any hints on how to make the host-service override the hostgroup-service
would be much appreciated.  I was shown by a user on #nagios of freenode
that I could simply ! the hostname in question in the hostgroup-defined
service, however with how my config files are setup it would not be
intuitive for anyone coming after me.

Hostgroup-defined service:

define service{
        use                     generic-service
        hostgroups              windows-servers-dom1
        service_description     mem at dom1
        name                    mem at dom1
        check_command           check_wsc_dom1!memory!10%,5%,10%,5%
}

host-defined service:

define service{
        use                     generic-service
        host                    nin-tgisqlcl-01
        service_description     mem at dom1
        name                    mem at dom1
        check_command           check_wsc_dom1!memory!3%,2%,3%,2%
}


Thanks in advance,
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090923/2250fc48/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
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