Different notification interval when service is critical

alertsmonitoringnagios

I've got a service in Nagios that checks how much disk space is used on a server.

When over 80% is used, the service is in a warning state. When it's over 97% it's considered critical.

When the service is in warning I want to send an alert once a day (notification_interval 1440). When the service is critical I want to send an alert every two hours (notification interval 120).

How do I set this up?

Is it possible to set this up in one service or do I need to define two services, one that sends alerts for warning and another that sends alerts for critical?

Thanks.

Best Answer

Define a serviceescalation with notification_interval set to 120 when the service is in CRITICAL state:

define serviceescalation{
    host_name               xx
    service_description     disk_free
    notification_interval   120
    .
    .
    escalation_period       24x7
    escalation_options      c
    }