Overriding/removing hostgroup_name from service template?

Steven Danz steven-danz at kc.rr.com
Wed Nov 10 05:33:30 CET 2004


Hello

I'm trying out the uses of templates in 1.2 and noticed that if I define 
a service template that uses a hostgroup_name, later when I use the 
template there doesn't seem to be a way to drop the hostgroup_name if I 
have a service that I only want to monitor on one host.  Adding 
host_name gets both the single host along with the hostgroup monitored 
for the service. If hostgroup_name is given with a blank entry, nagios 
complains about parsing the line.  Is there a way to list hostgroup_name 
with an 'empty' entry so as to remove it, leaving the host_name as the 
only thing defined?  It goes something like:

define service{
        name                            8x5-service
        use                             generic-service
        register                        0
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        notification_interval           120
        notification_period             workhours
        notification_options            c,r
        contact_groups                  linux-admins
        }

# For the most part, we monitor the same things on all the evaluation 
systems
define service{
        name                            8x5-eval-service
        register                        0
        use                             8x5-service
        hostgroup_name                  evaluation_servers
        contact_groups                  evaluation-admins
}
.
.
.
# For this one system, we have a special service so we only want to monitor
# it on the one server.  The settings in 8x5-eval-service are still 
good, except
# that there doesn't seem to be a way to drop the hostgroup_name without 
specifying
# a new one.  Writing it like this attempts to monitor the service on both
# the host_name host and all the hosts in the hostgroup_name from the 
template.
define service{
        use                             8x5-eval-service
        service_description             Service only on one system
        host_name                       server1
        check_command                   check_nrpe!check_special_service
}

Thanks for your time

Steven


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
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