NIC Traffic monitor
Re: NIC Traffic monitor
Yes, its a heavy traffic, thats where requirement come in to monitor it.
Re: NIC Traffic monitor
It works for me:
I was getting all zero information also at first. Everywhere in windows it was showing up as "Intel(R) 82579LM Gigabit Network Connection" instead of "Intel[R] 82579LM Gigabit Network Connection"
Go into Windows Performance Monitor and verify you are using the name of the card that it shows! Also, in your code example, it looks like you have a space after the initial ". Make sure there is not a space after it.
Also realize if you use the "-o KB" option, it still may show 0 if the number of bytes is low. Try leaving off that option until you verify it is working and that will make it report bytes instead of KB.
Code: Select all
[clarkj@svwdcnagios02 libexec]$ sudo ./check_win_net_usage.sh -H 10.5.2.34 -p 12489 -i "Intel[R] 82579LM Gigabit Network Connection"
Network OK - 153 Bytes received/sec, 119 Bytes sent/sec|bytes_in=153;bytes_out=119
Go into Windows Performance Monitor and verify you are using the name of the card that it shows! Also, in your code example, it looks like you have a space after the initial ". Make sure there is not a space after it.
Also realize if you use the "-o KB" option, it still may show 0 if the number of bytes is low. Try leaving off that option until you verify it is working and that will make it report bytes instead of KB.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NIC Traffic monitor
Can you open perfmon.exe on your windows machine
Select performance Monitor and click the green +
Select Network Interface\Bytes Received/sec
As BanditBBS pointed out, I also have square braces [] instead of () around an item, make sure your -i argument is exactly what is displayed here.
@BanditBBS - Thanks.
@BanditBBS - Thanks.
You do not have the required permissions to view the files attached to this post.
Re: NIC Traffic monitor
Hi,
Thanks for the information, now I able to fetch the bytes value as expected. Can we set some warning/critical parameters too like -w 80 and -c 90 using this plugin. In plugin help, I was not able to see any parameters for such alerts, please advise.
Regards,
Sanjeev
Thanks for the information, now I able to fetch the bytes value as expected. Can we set some warning/critical parameters too like -w 80 and -c 90 using this plugin. In plugin help, I was not able to see any parameters for such alerts, please advise.
Regards,
Sanjeev
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: NIC Traffic monitor
You would have to define them as such:
This is an example command definition, you do not need to follow this exact format, and could add them into the arguments on a per service definition basis. You must define a MaxWarn and a MaxCrit value for the check, if you would like to see the entire output but still be alerted when a threshold is met add ShowAll.
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -p 5666 -c CheckCounter -a "\\Print Queue(_Total)\\Jobs Spooling" ShowAll MaxWarn=2 MaxCrit=20Re: NIC Traffic monitor
Looking at the code of the plugin, short answer is no.
You could modify it to handle sending a warning or critical message, but as it is, no. Might be able to find one that handles it out of the box, but this one does not.
You could modify it to handle sending a warning or critical message, but as it is, no. Might be able to find one that handles it out of the box, but this one does not.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: NIC Traffic monitor
Thanks for the information.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: NIC Traffic monitor
As shown in the example above if you use NRPE to call CheckCounter on the remote host you can add a Warning and Critical value at the end of the check and it will return Warning or Critical if those thresholds are met. Seeing as you already have NSClient++ configured an example for Bytes Received/Sec would be:
Returns:
Since NSClient++ parses the performance counter returns it can assign values to the returns:
http://www.nsclient.org/nscp/wiki/Check ... eckCounter
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H windows.server.ip -c CheckCounter -a "Counter:=\\Network Interface(Intel[R] PRO_1000 MT Network Connection)\\Bytes Received/Sec" ShowAll MaxWarn=400 MaxCrit=2000Code: Select all
CRITICAL: \Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Received/Sec: 380.045 > critical|'\Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Received/Sec'=380.045354;50;100
http://www.nsclient.org/nscp/wiki/Check ... eckCounter
Re: NIC Traffic monitor
Remember, if you use this method to modify the NSClient settings and in the ini make sure allow_nasty_meta_chars under the NRPE section is set to 1 and not commented out.slansing wrote:As shown in the example above if you use NRPE to call CheckCounter on the remote host you can add a Warning and Critical value at the end of the check and it will return Warning or Critical if those thresholds are met, example for Bytes Received/Sec:Returns:Code: Select all
/usr/local/nagios/libexec/check_nrpe -H windows.server.ip -c CheckCounter -a "Counter:=\\Network Interface(Intel[R] PRO_1000 MT Network Connection)\\Bytes Received/Sec" ShowAll MaxWarn=400 MaxCrit=2000Since NSClient++ parses the performance counter returns it can assign values to the returns:Code: Select all
CRITICAL: \Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Received/Sec: 380.045 > critical|'\Network Interface(Intel[R] PRO_1000 MT Network Connection)\Bytes Received/Sec'=380.045354;50;100
http://www.nsclient.org/nscp/wiki/Check ... eckCounter
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: NIC Traffic monitor
If you do decide to use this performance counter, let us know how it works out for you! They are usually pretty straight forward to play with.