servicegroups directive doesn't seem to work
Paul M. Dubuc
work at paul.dubuc.org
Thu Feb 25 17:25:06 CET 2010
FYI, The reason this wasn't working was that there was 'use' directive in the
service template that was using a template that also has a servicegroups
directive for another service group (that line got edited out of my example).
Putting a + sign in front of the ebusiness servicegroup name did the trick,
adding the new service group instead of using it to replace the old one.
Paul M. Dubuc wrote:
> 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