Page 1 of 1

Nagios 4.1.1 servicegroup error

Posted: Thu May 12, 2016 6:27 am
by berekin
Hi all,

i have installed Nagios 4.1.1 Core on Ubuntu 14.04.4 LTS and i have a problem when creating servicegroup

this is in /usr/local/nagios/etc/objects/services.cfg

Code: Select all

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Current Load
        check_command                   check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
        }
and in /usr/local/nagios/etc/objects/servicegroups.cfg

Code: Select all

define servicegroup{
        servicegroup_name       Current_load_group
        alias                   Current_load_group
        members                 Current Load
        }
but when i do

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Service description missing from list 'Current Load' (config file '/usr/local/nagios/etc/objects/servicegroups.cfg', starting at line 1)
Error: Could not expand members specified in servicegroup 'Current_load_group' (config file '/usr/local/nagios/etc/objects/servicegroups.cfg', starting at line 1)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

Where i am making mistake? .. it looks so simple.. :(

Re: Nagios 4.1.1 servicegroup error

Posted: Thu May 12, 2016 10:37 am
by ThomasJohansen
not sure but should

members Current Load

not be

members localhost

I would say it is localhost there is member not Current Load, but it's just a guess

Re: Nagios 4.1.1 servicegroup error

Posted: Thu May 12, 2016 1:11 pm
by tmcdonald
ThomasJohansen wrote:not sure but should

members Current Load

not be

members localhost

I would say it is localhost there is member not Current Load, but it's just a guess
Very close: https://assets.nagios.com/downloads/nag ... rvicegroup

Your servicegroup definition needs to be:

Code: Select all

define servicegroup{
        servicegroup_name       Current_load_group
        alias                   Current_load_group
        members                 localhost,Current Load
        }
From the documentation:

Code: Select all

members: 	

This is a list of the descriptions of services (and the names of their corresponding hosts) that should be included in this group. Host and service names should be separated by commas. This directive may be used as an alternative to the servicegroups directive in service definitions. The format of the member directive is as follows (note that a host name must precede a service name/description):

members=<host1>,<service1>,<host2>,<service2>,...,<hostn>,<servicen>