I'm trying to set up my Nagios instance so that after a power failure – or any other service restart for that matter – that the checks show up as unknown until they have been rechecked.
I was able to get this behavior with the retain_state_information=0 directive, however this is also killing of any service acknowledgements or notification settings I've defined via the GUI.
Is there a combination for retain_state_information, retain_status_information and retain_nonstatus_information which can provide the behavior I'm after?
Best Answer
No, having looked through the docs it seems that ACKs cannot be separated from the status info. The
MODATTR_*
defines in include/common.c also don't seem to cover this so the retained_process_host_attribute_mask and retained_process_service_attribute_mask settings won't help either.If you really need to have services transition to UNKNOWN it's possible to submit passive check results to set the hosts/services to UNKNOWN. This could be automated with curl for script usage.