Page 1 of 1

separate services in according to hostgroup

Posted: Thu Sep 29, 2011 12:33 pm
by mrninni
Hi all,

I'd like to create a host with 2 services and 2 hostgroups.
I want to put in the first hostgroup the host and only one service, and in the second hostgroup the host and only the other service.
There is a way to separate the services of the same host in according to the hostgroup that contains the host?

thanks

Re: separate services in according to hostgroup

Posted: Thu Sep 29, 2011 6:05 pm
by jsmurphy
Easy to do!
1. Create the two hostgroups
2. Assign the services to the respective hostgroup using the "hostgroup_name" directive instead of "host_name" in the service definition.
3. Assign the two hostgroups to that host using the "hostrgroups" directive in the host definition.

This is my favourite way to handle service inheritance :)