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.
Monitor Windows Server Bandwidth
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Monitor Windows Server Bandwidth
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
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 bytesslansing 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.
Code: Select all
Get-Counter "\\$HOSTNAME\$NIC_NAME\bytes total/sec" -SampleInterval 3600Re: Monitor Windows Server Bandwidth
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.Gumby wrote: This has to be executed and then wait 60 minutes for the result to be returned.
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.
"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.
Re: Monitor Windows Server Bandwidth
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
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 ?
Code: Select all
Get-Counter "\\$HOSTNAME\$NIC_NAME\bytes total/sec" -SampleInterval 3600 | Foreach-Object {$_.CounterSamples[0].CookedValue}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
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.
"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.