Windows NRPE

Windows Failed Service restart batch file

Description:

Restart Windows Failed Service batch script with log.

Current Version

1.07

Last Release Date

2010-11-16

Compatible With

  • Nagios 3.x

Owner

License

GPL


Project Files
Project Notes
File: win_service_restart.cmd Author: Vadim Zenin http://vadimzenin.blogspot.com Version: 1.07 Date: 16/11/2010 12:28:45 Windows Failed Service restart batch file for Nagios Event Handler Copy win_service_restart.cmd to NSClient++scripts folder. Nagios commands.cfg: define command{ command_name win_service_restart command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c win_service_restart -a "$SERVICEDESC$" $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ } Nagios template-services_common-win.cfg define service{ name generic-service-win-wuauserv service_description wuauserv display_name Automatic Updates event_handler win_service_restart event_handler_enabled 1 check_command check_nt!SERVICESTATE!-d SHOWALL -l $SERVICEDESC$ } NSCLIENT++ version 0.3.8 NSC.ini: [Settings] allowed_hosts=192.168.1.1/32 ; your Nagios server IP [NRPE] allow_arguments=1 allow_nasty_meta_chars=1 [Script Wrappings] cmd=scripts%SCRIPT% %ARGS% [External Script] allow_arguments=1 allow_nasty_meta_chars=1 [External Scripts] command[win_service_restart]=scriptswin_service_restart.cmd "$ARG1$" $ARG2$ $ARG3$ $ARG4$ Additional examples on http://vadimszenins.blogspot.com/2008/12/nagios-restart-windows-failed-services.html Tested platform: Windows 2003 R2 x64 SP2, Nagios 3.2.0, NSClient++ 0.3.8.76 Version 1.07 revision: Description is changed for NSCLIENT++ version 0.3.8 NSC.ini Version 1.06 revision: Description is changed for NSCLIENT++ version 0.3.8 NSC.ini Version 1.05 revision: Logging changes, stop and start services commands nave changed. Logs examples added. Version 1.04 revision: Double restart of the servise is fixed Version 1.03 revision: Description is changed Version 1.02 revision: @NET changed to @SC Version 1.01 revision: Service name's with spase problem is fixed http://vadimszenins.blogspot.com/2008/12/nagios-restart-windows-failed-services.html dbf0663a9e6648886eb8015cee8c9ce0 *win_service_restart.zip
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
0
Views
166,766