I've got a configuration that works as expected in Core 3.5.1
In one .cfg file, I define a host group, call it name2.
in another .cfg file, I define a service with hostgroup_name name1, !name2
Indeed, the service is only defined for hosts in hostgroup name1 but not for hosts in hostgroup name2.
But under core 4.1.1, same configuration files, I get an error on that 2nd file, saying name2 could not be found.
I tried rearranging the order of specification of the separate configuration files in nagios.cfg, but no evident change.
Thoughts?
hostgroup_name name1, !name2 config test fails on name2
-
jlwilkinson
- Posts: 7
- Joined: Wed Jul 13, 2016 9:03 am
Re: hostgroup_name name1, !name2 config test fails on nam
This is odd, since it looks like you're doing this correctly. From our Core 4 Documentation....
https://assets.nagios.com/downloads/nag ... ricks.html
Could you post the problematic cfg file here for us to review?
https://assets.nagios.com/downloads/nag ... ricks.html
Excluding Hosts:
If you want to create identical host escalations on numerous hosts or hostgroups, but would like to exclude some hosts from the definition, this can be accomplished by preceding the host or hostgroup with a ! symbol.
Code: Select all
define hostescalation{
host_name HOST1,HOST2,!HOST3,!HOST4,...,HOSTN
hostgroup_name HOSTGROUP1,HOSTGROUP2,!HOSTGROUP3,!HOSTGROUP4,...,HOSTGROUPN
other escalation directives ...
}Could you post the problematic cfg file here for us to review?
Be sure to check out the Knowledgebase for helpful articles and solutions!
Re: hostgroup_name name1, !name2 config test fails on nam
We would have to see how the configuration files are setup to so can view the settings.
Can you post your nagios.cfg file and the other config files as well?
Also, in your example, you have a space between the , and the !, try removing that if is actually in your config file and see if that fixes it.
Can you post your nagios.cfg file and the other config files as well?
Also, in your example, you have a space between the , and the !, try removing that if is actually in your config file and see if that fixes it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: hostgroup_name name1, !name2 config test fails on nam
I'm using Core 4.1.1 and I've validated that it works properly on my system, PM one of us your configs and we'll take a look.