Error: Could not expand members specified in servicegroup

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dappa_don
Posts: 8
Joined: Tue May 30, 2017 9:57 am

Error: Could not expand members specified in servicegroup

Post by dappa_don »

Hello All,

i'm having issues adding a servicegroup to nagios core 4.4.2, can someone please point me in the right direction as to why this is no longer working in 4.4.2?

define servicegroup {
servicegroup_name switches
alias switches
members server1, server2, server3, server4, server5
}

define service{
use switches
host_name server1, server2, server3, server4, server5
service_description Interface_Bandwidth
check_command cisco_interface! blah blah
}

Error: Could not find a service matching host name 'server1' and description 'server2' (config file '/path/to/config/servicegroups.cfg', starting on line 1)
Error: Could not expand members specified in servicegroup 'swicthes' (config file ''/path/to/config/servicegroups.cfg'', starting at line 1)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error: Could not expand members specified in servicegrou

Post by scottwilkerson »

The servicegroup members should be added in this format

Code: Select all

members=<host1>,<service1>,<host2>,<service2>,...,<hostn>,<servicen>
https://assets.nagios.com/downloads/nag ... rvicegroup

so the definition should look like this

Code: Select all

define servicegroup {
servicegroup_name switches
alias switches
members server1,Interface_Bandwidth,server2,Interface_Bandwidth,server3,Interface_Bandwidth,server<n>,Interface_Bandwidth
}
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dappa_don
Posts: 8
Joined: Tue May 30, 2017 9:57 am

Re: Error: Could not expand members specified in servicegrou

Post by dappa_don »

thanks Scott, that has certainly done the trick.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error: Could not expand members specified in servicegrou

Post by scottwilkerson »

dappa_don wrote:thanks Scott, that has certainly done the trick.
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked