Unregister a service definition
Matthew Angelo
bangers at gmail.com
Thu Jun 17 09:17:50 CEST 2010
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100617/9879ce20/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- 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