Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As per this question I want to monitor the network utilisation of my Windows Servers using Nagios (not Cacti).

Does anyone have any guidance on querying the WMI counters using NSClient or via SNMP so that rrd data can be collected by nagios for graphing using pnp4nagios?

Or does anyone have a plugin that does this?


share|improve this question

I'm using Centreon which provides the perl script check_centreon_snmp_traffic.

share|improve this answer
up vote 1 down vote accepted

Solved this by using the check_bandwidth3 plugin for Nagios and checking it over SNMP. I don't know why I didn't think of checking it via SNMP first as that's how I collect the stats for my cisco kit!

share|improve this answer
Just a word of warning--this won't work for 1Gpbs interfaces or faster since Windows only has 32-bit counters which rapidly overflow on fast uplinks… – Ryan Horrisberger Mar 18 '13 at 17:30
I've actually authored my own check plugin for Nagios for this exact reason!… – Dan Apr 3 '13 at 11:20

The standard Nagios plugins should include an SNMP plugin that can check the bandwidth usage of a NIC just fine. I've never bothered to use WMI when SNMP was much more interoperable in a mixed environment. I try not to use NRPE or NSClient as it means more work to maintain the plugins if you make a change or update them.

As for being able to use RRD tools to graph the data from Nagios, you will have to setup a script that will collect the performance data from the Nagios check execution and use that to populate your RRD data files. There is nothing that comes stock with Nagios to do this. Groundwork OpenSource Monitor which is based on Nagios does provide some functionality to do this. In our environment we use Nagios for monitoring and Cacti for graphing... ie- use the right tool for the job...

share|improve this answer

I'm using Opsview which does this out of the tin. I spent alot of time researching this area and IMHO I couldn't find anything as good as Opsview.

share|improve this answer
Currently trying this on Debian Lenny - Fingers x'd looks like everything I need wrapped up in a nice meta-package. As long as it works and can let me see the trends I need then I'm happy. – Dan Aug 25 '09 at 15:13
Have installed OpsView, Am impressed by it's user interface, but I'm still struggling to get it to display the actual bandwidth, rather than the RTA and packetloss values which I have already. – Dan Aug 26 '09 at 13:55

WMI will work even for fast interfaces. SNMP won't work well for >=1Gbps interfaces since 64-bit counters aren't available on Windows and 32-bit counters overflow, nor will Performance Monitor Counters since they are only rates (bytes/sec) and not absolute counters [1]). You mention you have nsclient which can easily query WMI, so you could do this:

check_nrpe -H <host> -c CheckWMIValue -a 'Query=select BytesReceivedPersec, BytesSentPersec from Win32_PerfRawData_Tcpip_NetworkInterface where name = "<interface-name>"' Check:BytesReceived:=BytesReceivedPersec Check:BytesSent:=BytesSentPersec

Despite the name BytesReceivedPersec this is a 64-bit counter (Total Bytes) and not a rate (Bytes/sec).

[1] - Anything that is already in a rate form (bytes/sec) like the perfmon counters will not work well. For instance if you do your checks every 5 min, imagine you check an idle interface and get 0 BytesReceived/sec, then for 3 minutes you d/l a huge file and max out the interface, then it goes back to idle for the next min. When you poll for BytesReceived/sec you will get 0 again, even though for most of the time you were pulling a lot of data. You need an absolute counter of Bytes Sent/Received so you can subtract the first check from the second and divide by the time interval.

share|improve this answer
As per my other comment, you can now use my plugin at… – Dan Apr 3 '13 at 11:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.