Windows

Check Windows Network Traffic/Usage

Description:

This plugin uses check_nt, which is part of the official Nagios plugin collection. However with check_nt you only get to check one value (e.g. Bytes sent/s). If one wants to create graphics with Bytes_in and Bytes_out, there is need to bundle two checks in one. This is where this plugin plays its part. It launches two check_nt checks (one for Bytes sent/s and one for Bytes received/s) and bundles both checks to one common output.

Current Version

20151127

Last Release Date

2015-11-27

Compatible With

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

License

GPL


Project Photos
Project Notes
Please check out the following URL for complete and up to date documentation: http://www.claudiokuenzler.com/nagios-plugins/check_win_net_usage.php Version History ------------------ 20111116 First version released 20120126 Bugfix in port check 20121010 Bugfix in password handling 20121019 Handling Connection Error (thanks Hermit) 20151126 Verify interface parameter was set 20151127 Handling connection error on second connection, too Requirements ------------------ 1) check_nt plugin 2) NSClient++ installed on Windows host 3) Set variable 'pluginlocation' at the begin of the plugin to your Nagios plugins path (e.g. /usr/local/nagios/libexec) Definition of the parameters ------------------ -H Hostname of Windows server to check -p Listening port of NSClient++ on target server (default 12489) -s Password in case NSClient++ was defined to use a password -i Name of network interface to use (not ethX, check Windows performance GUI) -o Choose output of value in KB, MB (default Byte) --help Help text Usage Example ------------------ /usr/local/nagios/libexec # ./check_win_net_usage.sh -H mywindows.server.local -p 12489 -i "VMware Accelerated AMD PCNet Adapter" -o KB Network OK - 14 Bytes Received/sec, 4 Bytes Sent/sec|bytes_in=14608;bytes_out=4196
Reviews (7) Add a Review
Language-Problems
by ViktorEngelmann, December 31, 2019

On my german machine, it didn't work although I used the flag "-l de" (to set the language to german). The problem was that (in addition to use "Netzwerkadapter" instead of "Network Interface") it also needs to query for "Empfangene Bytes/s" instead of "Bytes Received/sec" and "Bytes gesendet/s" instead of "Bytes Sent/sec"



Windows server 2012 & 2016
by scudieroa, April 30, 2019

For my Server 2016 I had to manually go to "Administrative Tools" > Performance Monitor > Data Collector Sets > User Defined > Server Manager Performance > Performance Counters...If you select "Add" under "Network Interface" you can see the exact names of the interfaces you can monitor. On my 2016 server this name was slightly different from the description name on the adapter. Once I mirrored the name from here, all worked! I also added the "-c" & "-w" options to the .sh for setting the critical and warrning levels, works great!



Windows Server 2016
by robertfergusonsr, April 30, 2019

Hey - this plugin works great on Windows 2012 but I keep getting the following error on 2016: ./check_win_net_usage.sh -H 10.3.0.14 -p 12489 -i Broadcom NetXtreme Gigabit Ethernet _2 Network UNKNOWN: NSClient - ERROR: No performance data from command: check_pdh Thoughts? Thanks in advance.



Windows Server 2012 / 8
by MN81, October 31, 2015

MS changed the counters on W2012. To get it to work on 2012 change these lines bytes_in=$(${pluginlocation}/check_nt -H ${host} -p ${insertport} -s ${password} -v COUNTER -l "Network Interface(${interface})Bytes Received/sec") bytes_out=$(${pluginlocation}/check_nt -H ${host} -p ${insertport} -s ${password} -v COUNTER -l "Network Interface(${interface})Bytes Sent/sec") else # Without password bytes_in=$(${pluginlocation}/check_nt -H ${host} -p ${insertport} -v COUNTER -l "Network Interface(${interface})Bytes Received/sec") bytes_out=$(${pluginlocation}/check_nt -H ${host} -p ${insertport} -v COUNTER -l "Network Interface(${interface})Bytes Sent/sec") fi To this. bytes_in=$(${pluginlocation}/check_nt -H ${host} -p ${insertport} -s ${password} -v COUNTER -l "Network Adapter(${interface})Bytes Received/sec") bytes_out=$(${pluginlocation}/check_nt -H ${host} -p ${insertport} -s ${password} -v COUNTER -l "Network Adapter(${interface})Bytes Sent/sec") else # Without password bytes_in=$(${pluginlocation}/check_nt -H ${host} -p ${insertport} -v COUNTER -l "Network Adapter(${interface})Bytes Received/sec") bytes_out=$(${pluginlocation}/check_nt -H ${host} -p ${insertport} -v COUNTER -l "Network Adapter(${interface})Bytes Sent/sec")



Good !
by baher09, March 31, 2014

This shell script uses check_nt to check both Bytes Sent and Bytes Received counters in one place. My understanding is that it is lacking the ability to set Warning and Critical thresholds. For that, I'm planning to user check_nt. My biggest challenge was to get NIC naming work. Here is what worked for me: ./check_win_net_usage.sh –H –p 12489 –i “Intel[R] 82579LM Gigabit Network Connection” And for thresholds, I used ./check_nt –H –p 12489 –v COUNTER –l “network interface(intel[r] 82579lm gigabit network connection)bytes sent/sec” –w 1000000 –c 3000000 and ./check_nt –H –p 12489 –v COUNTER –l “network interface(intel[r] 82579lm gigabit network connection)bytes received/sec” –w 1000000 –c 3000000



Simple but great plugin
by jud5962, January 31, 2014

Perfectly does the job! Thanks



very good check but ...
by luke, May 31, 2013

Hello everybody. i m search a good plugin to monitoring the network traffic on windows system. My problem, i m french and i need to monitoring an operating system french and inside windows use a charactere special some like " é ç" and other . When i use this plugin with spécial charatere he cant because i have é for é and ç for ç can you help me please



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
4.3 (9)
Favorites
0
Views
103,544