Unregister a service definition

Giorgio Zarrelli zarrelli at linux.it
Thu Jun 17 11:19:45 CEST 2010


Apply the service to the hostgroup AND in the definition of the  
service apply it ALSO to the hosts negating them (!) eg:

hostgroup_name HTTP
host_name !host-not-to-apply




Ciao,

Giorgio

Il giorno 17/giu/2010, alle ore 09.17, Matthew Angelo  
<bangers at gmail.com> ha scritto:

> Hi Nagios Users,
>
> I have an *extremely* modular configuration.  My template structure  
> is well defined and when it comes to monitoring a host, it's as  
> simple as including it as a Member of a Hostgroup.
>
> An example Linux server would be:
>
>
> # cat ./linux/LINUXSERVER.cfg
> define host{
>         use                     PROD-SERVERS
>         host_name               LINUXSERVER.local.lan
>         alias                   LINUXSERVER.local.lan
>         address                 LINUXSERVER.local.lan
>         hostgroups              LINUX, HTTP, SMTP
>         }
>
>
> And that's it.  It auto inherits all service checks defined against  
> LINUX, HTTP and SMTP.
>
> 95% of my LINUX servers have a "/apps" mount point.  Therefore it  
> makes sense to include a service check for it inside the LINUX host  
> group and then inside the Host Definition for the remaining 5%  
> 'unregister' that service check.
>
> Is it possible, inside LINUXSERVER2.cfg, to say "Yes I know I'm a  
> member of hostgroup LINUX, but I *don't* want to inherit the service  
> check "Disk /apps"?
>
> I tried:
>
> define service{
>         use                        GENERIC-SERVICE-TEMPLATE
>         host_name                  LINUXSERVER2.local.lan
>         service_description        Disk /apps
>         check_command              null
>         }
>
> But obviously this fails with an "Already defined" error.
>
>
> Appreciate any info.
>
> Thanks,
> Matthew.
> --- 
> --- 
> --- 
> ---------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> 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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
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