How to monitor the bandwidth usage of a Windows host?

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.
Noctis0791
Posts: 58
Joined: Wed Oct 09, 2013 3:41 pm

How to monitor the bandwidth usage of a Windows host?

Post by Noctis0791 »

Hi Guys,

Our Windows hosts already have NSClient++ installed that we are using to monitor them. We would just like to ask what is the check command that we could use to the check the bandwidth usage of each host?

Thank You,

Arnel
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: How to monitor the bandwidth usage of a Windows host?

Post by slansing »

You can use windows performance counters found using "perfmon" to check the counter values of your NIC, please see:

https://www.nsclient.org/nscp/wiki/Chec ... eckCounter
Noctis0791
Posts: 58
Joined: Wed Oct 09, 2013 3:41 pm

Re: How to monitor the bandwidth usage of a Windows host?

Post by Noctis0791 »

Thanks slansing! Looks like I could use this plugin too to monitor the bandwidth of the Windows host. Im trying to configure it now but upon trying to execute the command on the terminal, I received this error. Nagios plugins should be located on /etc/nagios-plugins/config/ directory correct? Prior to the error, should I create /usr/local/nagios/libexec? I dont even see this directory exists. Also, I cant find check_nt on /etc/nagios-plugins/config/ directory. Any suggestion how can I get that as well or create one if possible?

Thank You,

Arnel
Attachments
check_nt missing.PNG
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: How to monitor the bandwidth usage of a Windows host?

Post by sreinhardt »

Offhand, I don't recall where they would be with ubuntu packages, source installs per our documentation would still have you place them in /usr/local/nagios/libexec. I would suggest looking at your commands.cfg and seeing what directory they are in. As for check_nt, it should have been created with the default nagios-plugins package\source build. You might also try a "find / -name check_nt" to see where it is. You will likely have to modify the script to point at your proper check_nt location.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Noctis0791
Posts: 58
Joined: Wed Oct 09, 2013 3:41 pm

Re: How to monitor the bandwidth usage of a Windows host?

Post by Noctis0791 »

Thanks sreinhardt! I modified the script to my check_nt's location which is under /usr/lib/nagios/plugins. However, Im getting a different error now (see attached). Could it be that the client is missing the check_nt plugin? But it was included in the NSClient++ as far as I know. Any idea?

By the way, "Test-PC" is a VMware virtual machine and I saw its using Intel for the network interface.

Thank You,

Arnel
Attachments
perfmon.PNG
Network_Unknown.PNG
Network_Unknown.PNG (10.83 KiB) Viewed 13156 times
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: How to monitor the bandwidth usage of a Windows host?

Post by slansing »

Can you send us a copy of the script you are using after the modifications were made? It looks like it may be having issues still, have you tried using just check_nt from the nagios server?
Noctis0791
Posts: 58
Joined: Wed Oct 09, 2013 3:41 pm

Re: How to monitor the bandwidth usage of a Windows host?

Post by Noctis0791 »

Hi slansing,

Can you give me a check_nt command that we could try? Apologies as I dont know any command to run. I have attached the script.

Thank You,

Arnel
Attachments
check_win_net_usage.sh
(3.94 KiB) Downloaded 1066 times
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: How to monitor the bandwidth usage of a Windows host?

Post by slansing »

Yes, you would run something along the lines of:

Code: Select all

 /path/to/check_nt -H host.address.here -p 12489 -v COUNTER -l "Intel(R) PRO_1000 MT Network Connection" -w 70 -c 90
We may need to tweak that command a bit but give it a shot, let us know what it returns.
Noctis0791
Posts: 58
Joined: Wed Oct 09, 2013 3:41 pm

Re: How to monitor the bandwidth usage of a Windows host?

Post by Noctis0791 »

Thanks slansing. I got this result from that command.
Attachments
check_nt result.PNG
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: How to monitor the bandwidth usage of a Windows host?

Post by slansing »

I left out a couple key elements, try this one:

Code: Select all

/usr/lib/nagios/plugins/check_nt -H addr.of.host -p 12489 -v COUNTER -l "\Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Total/sec" -w 7000 -c 9000
Locked