Here you go. Created a simple version of the issue. I still have the same
problem.
define host{
name generic-host ; The name of this host
template
notifications_enabled 0 ; Host notifications are enabled
event_handler_enabled 0 ; Host event handler is enabled
flap_detection_enabled 0 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information
across program restarts
retain_nonstatus_information 1 ; Retain non-status information
across program restarts
passive_checks_enabled 0
check_command check-host-alive
contact_groups prod-24x7
max_check_attempts 4
check_interval 1
retry_interval 1
notification_interval 15
notification_period 24x7
notification_options d,r
register 0 ; DONT REGISTER THIS DEFINITION
- ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define hostgroup {
hostgroup_name groupA
}
define hostgroup {
hostgroup_name groupB
}
define host {
use generic-host
host_name foo
address 127.0.0.1
hostgroups groupA
}
define host {
use generic-host
host_name foo2
address 127.0.0.1
hostgroups groupB
}
define hostgroup {
hostgroup_name groupC
hostgroup_members groupA,!groupB
}
Error: Could not find member group '!groupB' specified in hostgroup
From: Wolfgang [mailto:w...@gmx.net]
Sent: Tuesday, May 15, 2012 10:33 AM
To: icinga-users@lists.sourceforge.net
Subject: Re: [icinga-users] nested hostgroups
Am 15.05.2012 18:54, schrieb Lori Adams:
It's not a template and is definitely not empty.
It's pretty easy. Create two hostgroups with hosts in them. Then create a
third hostgroup with hostgroup members where one of them is included, and the
other excluded.
Notice that the error says "could not find group '!hostgroupC', as if it
doesn't know how to handle exclusions in the hostgroup_members line.
-Lori
From: Wolfgang [mailto:w...@gmx.net]
Sent: Tuesday, May 15, 2012 9:33 AM
To:
icinga-users@lists.sourceforge.net<mailto:icinga-users@lists.sourceforge.net>
Subject: Re: [icinga-users] nested hostgroups
Am 15.05.2012 18:09, schrieb Lori Adams:
Icinga 1.4.0
Is it true that I cannot do a hostgroup exclusion while attempting nested
hostgroups?
define hostgroup {
hostgroup_name foo
hostgroup_members hostgroupA,hostgroupB,!hostgroupC
}
Error: Could not find member group '!hostgroupC' specified in hostgroup
Any chance that this has been corrected in a newer version. I'm aware that
1.6.0 is out.
Lori Adams
Director of Operations Architecture
Cloudmark
510 388 8513 (M)
I cannot confirm your problem so please verify that hostgroupC exists (and is
not a template or maybe an empty hostgroup).
I did create such a setup using Icinga 1.4.0 before writing the other posting
;-).
Attached a (modified) localhost.cfg containing the following definitions:
define hostgroup{
hostgroup_name hg1
members localhost1
}
define hostgroup{
hostgroup_name hg2
members localhost2
}
define hostgroup{
hostgroup_name hg3
hostgroup_members hg1,!hg2
}
>From what I get that is similar to what you described. Attached an
>objects.precache containing the following lines:
define hostgroup {
hostgroup_name hg1
members localhost1
}
define hostgroup {
hostgroup_name hg2
members localhost2
}
define hostgroup {
hostgroup_name hg3
members localhost1
}
.../bin/icinga -vp complains about some missing services but there are no
errors.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users