I have, in fact, the very same problem, but I just added a
line to exclude that specific host (so technically it was
double-excluded) and it didn't cry at me anymore. For some reason, only
the 1st host (when listed alphabetically) generates that problem as I
didn't need to exclude any other hosts in a sub-group.<br><br><br>>
I've discovered what seems to be an inconsistency between Nagios 2.1
and<br>> 3.0b3. I have a few host groups defined, one containing all
my hosts,<br>> and the second a subset:<br>> <br>> define
hostgroup {<br>> hostgroup_name all-hosts<br>>
alias All UNIX Hosts<br>> members
hostadm01,hostfs01,hostps01<br>> members<br>>
hostop01,hostop02,hostop03,hostop04,hostop05,hostop06,hostop07<br>>
members
hostop08,hostop09,hostop10,hostop11,hostop12<br>>
members<br>>
hostop14,hostop15,hostop16,hostop17,hostop18,hostop19,hostop20,hostop21,<br>>
hostop23<br>> members
hostweb01,hostweb02,hostweb03,hostweb05<br>> members<br>>
hostjas00,hostjas01,hostjas02,hostjas03,hostjas04,hostjas05<br>>
members<br>>
hostapp01,hostapp02,hostdb01,hostdb02,hostdb03,hosteq01,hosteq02,hosteq0<br>>
3<br>> members
hostdoc01,hostdoc02,hostot01,host100<br>> }<br>> <br>> <br>>
define hostgroup {<br>> hostgroup_name some-hosts<br>>
alias Some UNIX Hosts<br>> members
hostop03,hostop05,hostop06,hostop07<br>> members<br>>
hostjas00,hostjas01,hostjas02,hostjas03,hostjas04,hostjas05<br>>
members hosteq02,hostot01,host100<br>> }<br>> <br>>
Now, I'd like to monitor disk services and send email to 'erp-admins'
if<br>> there is a problem on one of the 'some-hosts':<br>>
<br>> define service {<br>> use
generic-service<br>> hostgroup_name
all-hosts,!some-hosts<br>> service_description DISK
ALL<br>> check_command
check_nrpe!check_disk<br>> contact_groups
unix-admins<br>> }<br>> define service {<br>> use
generic-service<br>> hostgroup_name
some-hosts<br>> service_description DISK ALL<br>>
check_command check_nrpe!check_disk<br>>
contact_groups erp-admins,unix-admins<br>> }<br>>
<br>> This cinfig passes preflight on 2.1, but gets the following
message on<br>> 3.0b3:<br>> <br>> Reading configuration
data...<br>> <br>> Error: Service 'DISK ALL' on host 'host100 has
already been defined<br>> Error: Could not register service (config
file<br>> '/usr/local/nagios/etc/services.cfg', starting on line
65)<br>> <br>> <br>> So, host100 exists in both all-hosts, and
some-hosts. But it should be<br>> excluded with the !some-hosts
statement. Is this broken, or am I doing<br>> something
wrong?<br>> <br>> -- <br>> Mike Stevens <br>