Troubleshooting

A Nagios service has max_check_attempts set to 3, and its first check fails. If the failure continues, when does Nagios send a problem notification?

Show the answer

Correct answerC. After the third consecutive failed check, when the state becomes hard

AWhy not this: The first failure puts the service in a soft state, which does not trigger notifications.

BWhy not this: notification_interval controls repeat notifications after the first; the first comes when the state turns hard.

CWhy this is right: After max_check_attempts consecutive failures the state becomes hard, and the notification is sent then.

DWhy not this: Acknowledging a problem suppresses further notifications; it is not needed for the first one.

Nagios treats the first failures as a soft state and rechecks the service. It sends notifications only once the failure persists for max_check_attempts and the state becomes hard. This filters out transient failures.