Page 3 of 4
Re: NIC Traffic monitor
Posted: Fri Mar 08, 2013 3:04 am
by HAL
Yes, its a heavy traffic, thats where requirement come in to monitor it.
Re: NIC Traffic monitor
Posted: Fri Mar 08, 2013 3:40 pm
by BanditBBS
It works for me:
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
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.
Re: NIC Traffic monitor
Posted: Fri Mar 08, 2013 3:58 pm
by scottwilkerson
Can you open perfmon.exe on your windows machine
perfmon0.PNG
Select performance Monitor and click the green +
perfmon.PNG
Select Network Interface\Bytes Received/sec
perfmon1.PNG
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.
Re: NIC Traffic monitor
Posted: Mon Mar 11, 2013 6:50 am
by HAL
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
Re: NIC Traffic monitor
Posted: Mon Mar 11, 2013 9:16 am
by slansing
You would have to define them as such:
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -p 5666 -c CheckCounter -a "\\Print Queue(_Total)\\Jobs Spooling" ShowAll MaxWarn=2 MaxCrit=20
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.
Re: NIC Traffic monitor
Posted: Mon Mar 11, 2013 10:17 am
by BanditBBS
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.
Re: NIC Traffic monitor
Posted: Mon Mar 11, 2013 10:24 am
by HAL
Thanks for the information.
Re: NIC Traffic monitor
Posted: Mon Mar 11, 2013 10:28 am
by slansing
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:
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=2000
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
Since NSClient++ parses the performance counter returns it can assign values to the returns:
http://www.nsclient.org/nscp/wiki/Check ... eckCounter
Re: NIC Traffic monitor
Posted: Mon Mar 11, 2013 11:52 am
by BanditBBS
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:
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=2000
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
Since NSClient++ parses the performance counter returns it can assign values to the returns:
http://www.nsclient.org/nscp/wiki/Check ... eckCounter
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.
Re: NIC Traffic monitor
Posted: Mon Mar 11, 2013 11:56 am
by slansing
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.