Windows

Check for unexpected reboot

Description:

check_unexpected_reboot.cmd is a Windows cmd script that checks for a reboot after a crash or power outage of a Windows machine.

Current Version

0.1

Last Release Date

2012-09-18

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion

License

GPL


Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Project Files
Project Notes
check_unexpected_reboot.cmd is a Windows cmd script that checks for a reboot after a crash or power outage of a Windows machine. It uses wevtutil.exe (Windows Vista, 2008 and up only) to read eventlog details from the command line. It compares the dates between a normal boot and an unexpected reboot. So the alarm will always go off after an unexpected reboot and until the system has had a normal reboot. This is in order for you to do a nice chkdsk c: at boottime, which Windows refuses to do automatically. Once a normal reboot is newer than an unexpected or the unexpected event is cleared, the alarm will go away. Use this plugin with Nsclient++ and add the following to the section [External Scripts] in NSC.ini: check_unexpected_reboot=cmd /c scriptscheck_unexpected_reboot.cmd Use check_nrpe to remotely check from your Nagios server NOTE: to make the test go green again you would normally have to perform a clean reboot. You can bypass this by sending an event with ID 13 to the eventlog. E.g.: 'eventcreate /L system /T INFORMATION /SO "Nagios_confirm" /ID 13 /D "Unexpected reboot confirmed"'
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
0 (0)
Favorites
1
Views
60,172