Home Directory Plugins Operating Systems Windows Check Automatic Services for Windows (Advanced Nagios Plugins Collection)

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Check Automatic Services for Windows (Advanced Nagios Plugins Collection)

Rating
0 votes
Favoured:
1

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

Checks all automatic Windows services are running. Accepts exclusions. Written Natively to work on any modern Windows system and can be used with any standard Nagios remote execution method.
Part of the Advanced Nagios Plugins Collection.

Download it here:

https://github.com/harisekhon/nagios-plugins

++++ Overview

* Checks all automatic windows services are running.
* Native Windows Execution - will run on any reasonably modern Windows Operating System
* Will work with any remote execution method
* Efficient - Only 1 execution call for all services
* Accepts exclusions for services you either don't care about or are normally not actively running all the time, like Volume Shadow Copy or Performance Logs and Alerts.

It is written to Nagios coding guidelines. Arguments are as flexible as possible, accepting either /windows or -u/--unix style arguments.

It also supports timeout and verbosity for debugging. Can even be run against any remote windows server (runs locally by default)


++++ Basic Usage

>> cscript //NOLOGO check_all_services.wsf

>> cscript //NOLOGO check_all_services.wsf /exclude:DHCP Client

>> cscript //NOLOGO check_all_services.wsf /server:dc1 /exclude:Performance Logs and Alerts

>> cscript //NOLOGO check_all_services.wsf /server:dc3 /exclude:sysmonlog, messenger, winvnc4

Input is flexible, /exclude can take services in either long or short name format, eg "DHCP Client" or just "dhcp", simply separate multiple services with commas.

Output of non running services can be shortened, so instead of getting an alert like:

>> SERVICES CRITICAL: 1 Automatic Service not Running - Performance Logs and Alerts

you can use the /shortname switch (or just /sh) and get the actual service name rather than the service full display name (this might be convenient to know since this is what you use when you do net start shortServiceName and net stop shortServiceName)

>> SERVICES CRITICAL: 1 Automatic Service not Running - SysmonLog


All options are case insensitive and have shortcuts too, like /s for /server (or -s or --server) and /e for exclude (or -e or --exclude)

Use --help or /help or full details


++++ Support

NOTE: Make sure you have Windows Script Host 5.6 or newer if you are running Windows 2000 or older. Test it by doing "cscript /?" at a command prompt.

For bugs, feature requests, coding style discussion or anything to improve this code, contact me at hpsekhon at googlemail dot com.