Page 1 of 1

service check override

Posted: Thu Apr 21, 2016 6:16 pm
by doneil326
i would like to know if there is an easy way to override a service check interval by assignment to a host group? For example i have these host groups and want the same service to be checked at these intervals for each without having to duplicate the service

prod - check_cpu 1 min
stage - check_cpu 5 min
dev - check_cpu 5 min

Re: service check override

Posted: Thu Apr 21, 2016 7:24 pm
by Box293
If you create a service template and assign these intervals, then the objects using this template will inherit the intervals.

However if you have intervals assigned at the service level, then the template intervals will be ignored.
doneil326 wrote:For example i have these host groups and want the same service to be checked at these intervals for each without having to duplicate the service
If you want the same service to be used by multiple hosts, in the service assign the service to the hostgroup, instead of a host.

Generally speaking, the answer to your question is about assigning the service to the hostgroup. The template with intervals is possibly extra work setting up configs. HOWEVER if you had 10 services (cpu, memory, disk, blah blah) and you wanted to change all the intervals at once, then updating the template would do exactly that, instead of having to update multiple services.

Re: service check override

Posted: Thu Apr 21, 2016 7:29 pm
by doneil326
so i use a shared service template for all of the services in question but i do not see how i can apply a different service template to the same service and override it at the host group level to accomplish my goal

Re: service check override

Posted: Thu Apr 21, 2016 7:43 pm
by Box293
Unfortunately there is no way of being able to do that. There is no ability in a service definition to say "hosts in groupA get templateA" and "hosts in groupB get templateB", you need two separate services for that.