Monitor Windows Server Bandwidth

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Gumby
Posts: 3
Joined: Tue Feb 18, 2014 1:33 pm

Monitor Windows Server Bandwidth

Post by Gumby »

Hi all,

I am looking to monitor the bandwidth usage on a few windows servers. What I would like to do is monitor the total throughput of outbound data for a specific NIC over a given amount of time (for example 1 or 3 hours). Is this possible with Nagios? I haven't been able to find a plugin that does this however my searching abilities may be sub par.

Thanks for any suggestions or even alternative options.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitor Windows Server Bandwidth

Post by slansing »

If you look at the performance counters for that NIC on the windows system, do they offer the data you need? If so we can help you monitor them.
Gumby
Posts: 3
Joined: Tue Feb 18, 2014 1:33 pm

Re: Monitor Windows Server Bandwidth

Post by Gumby »

slansing wrote:If you look at the performance counters for that NIC on the windows system, do they offer the data you need? If so we can help you monitor them.
Thanks for the response slansing. The following will tell me how much data has been used in 60 minutes using powershell's Get-Counter. This has to be executed and then wait 60 minutes for the result to be returned. This should suffice for what I need. It would be great to be alerted if the result is more than X bytes

Code: Select all

Get-Counter "\\$HOSTNAME\$NIC_NAME\bytes total/sec" -SampleInterval 3600
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitor Windows Server Bandwidth

Post by abrist »

Gumby wrote: This has to be executed and then wait 60 minutes for the result to be returned.
If this is run by an active check, it will most definitely time out before 60 minutes is reached. You would have to use a passive check to do this, so that nagios does not fork for sixty minutes or just flat time out.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Gumby
Posts: 3
Joined: Tue Feb 18, 2014 1:33 pm

Re: Monitor Windows Server Bandwidth

Post by Gumby »

What if I was to run a script via task scheduler to run at *:55 using the following powershell command and write that number to a file

Code: Select all

Get-Counter "\\$HOSTNAME\$NIC_NAME\bytes total/sec" -SampleInterval 3600 | Foreach-Object {$_.CounterSamples[0].CookedValue}
This will return a number like 144274.26582773199

Can I then use nagios to parse the file for the number and alert me if the number is more than X bytes ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitor Windows Server Bandwidth

Post by abrist »

That would work.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked