Page 1 of 1
Monitor Windows Server Bandwidth
Posted: Tue Feb 18, 2014 1:37 pm
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.
Re: Monitor Windows Server Bandwidth
Posted: Tue Feb 18, 2014 1:39 pm
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.
Re: Monitor Windows Server Bandwidth
Posted: Tue Feb 18, 2014 2:48 pm
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
Re: Monitor Windows Server Bandwidth
Posted: Tue Feb 18, 2014 3:12 pm
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.
Re: Monitor Windows Server Bandwidth
Posted: Tue Feb 18, 2014 3:31 pm
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 ?
Re: Monitor Windows Server Bandwidth
Posted: Tue Feb 18, 2014 3:40 pm
by abrist
That would work.