How achieve the effect of having a different max_check_attempts values for WARNING and CRITIAL states Nagios

nagios

For example, I want that when service X check results in a WARNING state, it send a notification right away (max_check_attempts=1), but if the check results is CRITICAL (max_check_attempts=3), it check twice time more before send the notification. My requirement come from the fact that I configure different Nagios contacts for CRITICAL and WARNING.

My goal is avoid some kind of Nagios contacts receive a notification so soon (if is a Notif related to a WARNING state), still, I need other contacts get informed about a serious problem (CRITICAL state) asap.

Best Answer

To get the functionality you are looking for you want to use (host/service)escalations.

max_check_attempts 

is a function of the service/host check itself, not if it's in a warning or critical state.