Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Thanks to the Intel TCO watchdog some servers i manage now reboot on a kernel or hardware crash and init scripts are now even 'rebootsafe'. Sadly this means that i no longer get a notification from nagios when a machine has crashed because the service is simply back up before the checks fire for enough times to send a notification.

Is there a reliable script or nagios check out there that will let me get notified if say the machine has crashed say 3 times during the last 48 hour period?

share|improve this question
up vote 1 down vote accepted

How about you write one? An easy way would be to run uptime in the script. A slightly better way would be to add an initscript that echos the time to a rotating logfile. Grab the last three entries in the file, and check the elapsed time since the first.

share|improve this answer
The initscript method actually sounds worthwhile. I shall give it a try. – ZaphodB Feb 21 '12 at 8:53

There are a number of "check_uptime" variants on Nagios Exchange. These allow you to catch quick reboots, without setting max_check_attempts to 1 or 2 for the host check (therefore preventing false positives).

This one, for example, can be run via NRPE (uses uptime), but can also check via SNMP (Linux, Windows, etc.).

share|improve this answer
ah yes, i should have searched for 'check_uptime' rather then for nagios/uptime/crash thank you. – ZaphodB Feb 21 '12 at 8:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.