0

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?

Thanks

5 Answers 5

1

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

1

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!

2
0

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...

0

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.

2
  • 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, 2009 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, 2009 at 13:55
0

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.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .