Sorry for the ambiguous post.
I can't seem to find a way to set up the second approach that uses a simple regex approach to defining service groups. When I test it, it always chokes.
Right now I've got about 45 computers that I'm tracking. It seems it would be bordering on the ridiculous to define the service groups the long way...
<host1>,<service description1>, <host2>,<service description1>,<host3>,<service description1>,<host4>,<service description1>, and on and on...
I'm looking for the definitive approach to using regex to associate each service with a hostgroup name.
This is a typical host group definition:
Code: Select all
define hostgroup{
hostgroup_name comm ; The name of the hostgroup
alias Communications ; Long name of the group
members comm*
}
Typical service definition:
Code: Select all
define service{
use generic-service
hostgroup_name comm
service_description OS SNMP
check_command check_nrpe!check_snmp
}
Then defining a service group:
Code: Select all
define servicegroup {
servicegroup_name snmp_ecm
alias Std_SNMP
members comm,OS SNMP
}
Chokes with:
Code: Select all
Error: Could not find a service matching host name 'comm' and description 'OS SNMP check_snmp' (config file '/usr/local/nagios/etc/servers/_service_groups.cfg', starting on line 9)
I've tried putting the regex approach in the servicegroup definition, like comm*, but to no avail. So it always seems Im back to a LOT of tedious typing and tedious changes if I have to hard code all the definitions.
Is this a mostly unused feature; service groups?
How are others looking at, for example, all disk drives across specific host groups, or across all groups?
Thanks for any leads or tips,
Chris.