Page 1 of 1

Nesting Host groups for organization

Posted: Wed Feb 01, 2012 11:07 am
by ajnagiosadmin
Not sure if this can even be done but would like to organize my hostgroups by "categories". Here's my example..

Say you want to separate the state by Counties and Cities, you would have:
HostGroup Seminole Orange
Hosts Altamonte Springs Orlando
Hosts Sanford Goldenrod
Hosts Longwood Apopka

So now, you want to then create groups of counties by state which would give you:
HostGroup Florida
HostGroup Seminole Orange
Hosts Altamonte Springs Orlando
Hosts Sanford Goldenrod
Hosts Longwood Apopka

Is there a way to make a group of counties contained in a master group of a state? Basically I want the hostgroup page in nagios to display (what would be equal to) the states which when clicked will go to the sublist of counties.

Hope that makes sense.

Re: Nesting Host groups for organization

Posted: Wed Feb 01, 2012 6:01 pm
by jsmurphy
Hostgroups can be members of other hostgroups so you should have no problem configuring it the way you are suggesting :)

All you need to do is use the hostgroup_members directive inside the parent hostgroup definition, more information here: http://nagios.sourceforge.net/docs/3_0/ ... #hostgroup