check_winping - Nagios plugin for ping checks from Windows systems
check_winping [ -H | --hostname ] host --warning threshold --critical threshold [ [ -4 | --use-ip4 ] | [ -6 | --use-ipv6 ] ] [ --packets number of packets ] [ --buffersize number of bytes ] [ --timeout seconds ] [ --verbose .. ] [ --help ]
Inspired by the standard Nagios plugin check_ping, check_winping performs ping checks from Windows systems. It is a compiled perl script and the source code is available as a part of the package.
Hostname to ping. Required.
Return WARNING if measured values are at least the threshold values. A threshold is specified as a combination of round trip time and packet loss ratio with the following format : round-trip-time in milliseconds,packet-losss-ratio%. Example: 100,80%. Required.
Return CRITICAL if measured values are at least the threshold values. A threshold is specified as a combination of round trip time and packet loss ratio with the following format : round-trip-time in milliseconds,packet-losss-ratio%. Example: 100,80%. Required.
Use IPv4 connection (standard Windows ping.exe). Optional. Default is on.
Use IPv6 connection (standard Windows ping6.exe). Optional. Default is off.
Specify the number of packets to send during pinging. Optional. Default is 5 packets.
Specify buffer size for ping packets. Optional. Default is 32 bytes.
Specify ping timeout in seconds. Optional. Default is 10 seconds.
Produces detailed output for debugging. Optional. Can be specified up to twice for increasing verbosity.
Produces a help message.
check_winping -H itefix.no --warning 100,80% --critical 250,100%
Checks itefix.no with default ping values and returns WARNING if round trip average or packet loss ratio is at least 100 ms or 80% respectively, returns CRITICAL if round trip average or packet loss ratio is at least 250 ms or 100% respectively
0 OK 1 WARNING 2 CRITICAL 3 UNKNOWN
Tevfik Karagulle http://www.itefix.no
This program is distributed under the Artistic License. http://www.opensource.org/licenses/artistic-license.php
Version 1.4, May 2011
- Produce performance data output according to the guidelines
- Bug fix: Newer Windows versions produce ping messages with one less empty line. Check_winping strips now all empty lines before processing ping output.
- Better pattern match for localized pings (support for multiple words) - Scan response messages to detect anomalies (TTL expire for instance)
- Use more generalized match patterns to support localized ping/ping6