Page 1 of 1

Error: Could not expand members specified in servicegroup

Posted: Thu Sep 13, 2018 7:02 am
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)

Re: Error: Could not expand members specified in servicegrou

Posted: Thu Sep 13, 2018 11:03 am
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
}

Re: Error: Could not expand members specified in servicegrou

Posted: Mon Sep 17, 2018 7:25 am
by dappa_don
thanks Scott, that has certainly done the trick.

Re: Error: Could not expand members specified in servicegrou

Posted: Mon Sep 17, 2018 8:15 am
by scottwilkerson
dappa_don wrote:thanks Scott, that has certainly done the trick.
Great!

Locking thread