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.
Hello everyone,
I am running Nagios Core 3.5 and it appears excluding hostgroup members within hostgroups is not allowed. Here is an example definition of what I am trying to do:
If you look at the documentation you've linked, it explicitly says that what jessiegto is trying, should work. Unfortunately, it doesn't seem that it does; I'm running into the same issue. I haven't tested Nagios 4.0 yet either, but the documentation that says it should work is for 3.0 (I'm running 3.5.1).
I think what Scott was implying is that you cannot use excludes on the hostgroup object definition, whereas you can on the host definitions.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist wrote:I think what Scott was implying is that you cannot use excludes on the hostgroup object definition, whereas you can on the host definitions.
He might have been implying that, but the documentation he quoted says otherwise.
No where in the document does it mention that hostgroup object definitions can have "excludes" defined in them. You can exclude hostgroups from service/host object definitions, but not from hostgroup definitions. In fact, it only specifically mentions excludes on service object configs:
Excluding Hosts:
If you want to create identical services 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
f you want to create identical services 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.
define service{
host_name HOST1,HOST2,!HOST3,!HOST4,...,HOSTN
hostgroup_name HOSTGROUP1,HOSTGROUP2,!HOSTGROUP3,!HOSTGROUP4,...,HOSTGROUPN
service_description SOMESERVICE
other service directives ...
}