servicegroups directive doesn't seem to work

Paul M. Dubuc work at paul.dubuc.org
Wed Feb 24 23:28:56 CET 2010


Hello,

The documentation at 
http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html for 
Service Definition says that you can use a 'servicegroups' directive to 
assign a service to a servicegroup instead of using the 'members' 
directive in the service group:

> *servicegroups*: This directive is used to identify the /short 
> name(s)/ of the servicegroup(s) 
> <http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#servicegroup> 
> that the service belongs to. Multiple servicegroups should be 
> separated by commas. This directive may be used as an alternative to 
> using the /members/ directive in servicegroup 
> <http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#servicegroup> 
> definitions.

I would like to do this using a service template that service 
definitions can use to do the assignment like the configuration below.  
This would save me from having to add many host,service pairs to the 
members directive in the service group.  But it doesn't seem to work 
(I'm using Nagios 3.2.0).  I get the following configuration error:

Error: Servicegroup members must be specified in 
<host_name>,<service_description> pairs (config file ' ...

I get the same error when I delete the service template and move the 
servicegroups directive into the service definitions.
What am  I doing wrong?

Thanks,
Paul Dubuc


define servicegroup{
    servicegroup_name       ebusiness
    alias                   Business Services
#  members   ; use servcicegroups in service definitions below instead.
 }

#
# Nagios service definition template used by services in this config file
#
define service{
    name                        ebusiness-service
    register                    0   ; this is a template

    servicegroups               ebusiness   ; add the service to this 
service group

}


define service{
    use                             ebusiness-service
    host_name                       host1,host2
    service_description             service1

    check_command  ...

}

#
# SciFinder Password Change test service
#
define service{
    use                             ebusiness-service
    host_name                       host1,host2
    service_description            service2

    check_command                   ...

}


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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