Page 1 of 1

Servicegroup Members defined by logic

Posted: Tue Jun 18, 2013 10:46 am
by jkbuster
I'm trying to do something fancy, and maybe a little too fancy. Here's the example:

Host1 is in hostgroups "type1" and "env1"
Host2 is in hostgroups "type1" and "env2"
Services are applied to the "type1" hostgroup
I want certain services of Host1's to be in the "env1-app" servicegroup, and the same for Host2 except for "env2-app"

Is this something that anyone has tried before? Have you had any success?

--
JKB

Re: Servicegroup Members defined by logic

Posted: Tue Jun 18, 2013 10:57 am
by abrist
Yep, this is one of the major configuration paradigms for nagios.
Make service templates/servicegroups for checks, add them hostgroups, and then add hosts to those hostgroups.