Server Fault Asked by sebastien.prudhomme on December 11, 2021
I’d like to use different service check interval base on host type. Some hosts are critical and services on these hosts need to be checked more often than service on other hosts.
It seems that is not possible to use host macros in “normal_check_interval”, so any advice to do it without declaring twice my service templates?
Thanks
After rereading Nagios doc, what I need is implied inheritance from host parameters.
I found that old post on nagios-dev list
Unfortunately it has not been implemented into Nagios source code.
I know what I have to do now :-)
Answered by sebastien.prudhomme on December 11, 2021
Since the check_interval
and retry_interval
are attributes of a service check, they cannot be set per-host like you want. (Don't use "normal_check_interval"... that's Nagios 2 syntax).
To do this, make multiple hostgroups; one for "critical" one for "normal". Then create 2 service definitions for each service you want to check, with different check_interval
, retry_interval
, and/or max_check_attempts
settings, and assign to the hostgroups.
You can make this config cleaner by using a template for the common settings, and just change the intervals in the actual service defs. See the inheritance docs for more info.
Answered by Keith on December 11, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP