Page 1 of 2
check_nwc_health threshold settings
Posted: Mon Aug 03, 2015 7:19 pm
by stecino
Hello Everyone,
I needed help setting warning and critical thresholds for Interface Errors and Interface Status moniotors
./check_nwc_health -t 20 --mode interface-errors --hostname xxx.xx.xx.xx --community blah --regexp --name '1.(1|2)|external' --selectedperfdata ''
OK - interface 1.1 errors in:0.00/s out:0.00/s , interface 1.2 errors in:0.00/s out:0.00/s , interface /Common/external errors in:0.00/s out:0.00/s | '1.1_errors_in'=0;1;10;; '1.1_errors_out'=0;1;10;; '1.2_errors_in'=0;1;10;; '1.2_errors_out'=0;1;10;; '/Common/external_errors_in'=0;1;10;; '/Common/external_errors_out'=0;1;10;;
./check_nwc_health -t 20 --mode interface-usage --hostname xxx.xx.xx.xx --community blah --regexp --name '1.(1|2)|external' --selectedperfdata 'traffic'
OK - interface 1.1 usage is in:0.00% (0.00Bits/s) out:0.00% (0.00Bits/s) (down), interface 1.2 usage is in:0.00% (22149.33Bits/s) out:0.00% (20203.56Bits/s), interface /Common/external usage is in:0.00% (33533.33Bits/s) out:0.00% (34769.78Bits/s) | '1.1_traffic_in'=0;;;0;0 '1.1_traffic_out'=0;;;0;0 '1.2_traffic_in'=22149.33;;;0;0 '1.2_traffic_out'=20203.56;;;0;0 '/Common/external_traffic_in'=33533.33;;;0;0 '/Common/external_traffic_out'=34769.78;;;0;0
This is for GTM. What should be the threshold values be set to? Based on the module, if you don't specify the warning or critical threshold it just reports ok
Re: check_nwc_health threshold settings
Posted: Mon Aug 03, 2015 7:53 pm
by Box293
For the errors, looking at the performance data string I can see it will warning at 1 and critical at 10.
The interface usage does not appear to have any warning or critical. Really it comes down to what is applicable to your environment. What is specific about these interfaces that you want to warn? Is it connected to a fixed size pipe and you want to know when you are reaching it's capacity?
Re: check_nwc_health threshold settings
Posted: Mon Aug 10, 2015 4:51 pm
by stecino
Needed help in some regex implementation in nagios config file
I have this explicitly working:
./check_nwc_health -t 60 --mode interface-status --hostname xx.xxx.xx.xx --community ******** --regexp --name 'Vlan3|GigabitEthernet1/0/(?!1|4|1[7-9]|2[0-1]|27|29|3[0-9]|4[0-4]|5[1-2])|Port-Channel(?!1|2|1[0-3]|48)|Tel' --selectedperfdata ''
defineservice{
use network-services
host_name CS301
service_description Interface Status
check_command check_nwc_health_regex!interface-status!******!\'Vlan3|GigabitEthernet1/0/(?!1|4|1[7-9]|2[0-1]|27|29|3[0-9]|4[0-4]|5[1-2])|Port-Channel(?!1|2|1[0-3]|48)|Tel\'!\'\'!60
notifications_enabled 0
}
This is returning me error, I am assuming because of the slashes, ? and !
I have simpler regex expression withing nagios config that works
defineservice{
use network-services
host_name GTM301
service_description Interface Status
check_command check_nwc_health_regex!interface-status!********!\'1.(1|2)|external\'!\'\'!60
notifications_enabled 0
}
Thanks in advance
Re: check_nwc_health threshold settings
Posted: Mon Aug 10, 2015 6:56 pm
by stecino
It seems that the issue is the !
I need to be able to escape it properly, so it won't look at it as Nagios argument separator
Re: check_nwc_health threshold settings
Posted: Mon Aug 10, 2015 7:55 pm
by Box293
You could put it as a user defined variable in resoruces.cfg and is referenced as $USERxx$
Or perhaps as a custom service object and reference it that way, like _INTERFACE and it is referenced as $_SERVICEINTERFACE$
Does that make sense?
https://assets.nagios.com/downloads/nag ... tvars.html
Re: check_nwc_health threshold settings
Posted: Tue Aug 11, 2015 6:17 pm
by stecino
\! did the trick
Re: check_nwc_health threshold settings
Posted: Tue Aug 11, 2015 6:20 pm
by tmcdonald
Are we all set to close this up then?
Re: check_nwc_health threshold settings
Posted: Tue Aug 11, 2015 7:00 pm
by stecino
Box293 wrote:For the errors, looking at the performance data string I can see it will warning at 1 and critical at 10.
The interface usage does not appear to have any warning or critical. Really it comes down to what is applicable to your environment. What is specific about these interfaces that you want to warn? Is it connected to a fixed size pipe and you want to know when you are reaching it's capacity?
For the interface usage for example I am getting something like this
8-11-2015 16:17:23] SERVICE ALERT: VPN302;Interface Usage;CRITICAL;SOFT;1;CRITICAL -
interface Tunnel177 usage is in:6.90% (1380015.52Bits/s) out:103.66% (20731672.94Bits/s), interface GigabitEthernet0/0 usage is in:2.06% (20575647.23Bits/s) out:0.15% (1533854.07Bits/s), interface GigabitEthernet0/1 usage is in:0.24% (2430135.28Bits/s) out:2.26% (22596979.59Bits/s), interface Tunnel162 usage is in:0.40% (79373.72Bits/s) out:0.08% (15125.52Bits/s), interface GigabitEthernet0/0.310 usage is in:2.05% (20543773.17Bits/s) out:0.15% (1503935.89Bits/s), interface GigabitEthernet0/0.401 usage is in:0.00% (2710.95Bits/s) out:0.00% (25770.98Bits/s), interface Tunnel160 usage is in:0.47% (93780.67Bits/s) out:0.09% (17887.08Bits/s), interface Tunnel161 usage is in:0.76% (151267.22Bits/s) out:0.40% (80941.06Bits/s), interface Tunnel159 usage is in:0.55% (110203.95Bits/s) out:0.27% (53587.86Bits/s), interface Tunnel157 usage is in:0.00% (0.00Bits/s) out:0.00% (0.00Bits/s), interface Tunnel178 usage is in:0.00% (0.00Bits/s) out:0.00% (0.00Bits/s), interface Tunnel2002 usage is in:0.00% (375.21Bits/s) out:0.00% (110.73Bits/s), interface Tunnel2003 usage is in:0.00% (632.66Bits/s) out:0.00% (104.66Bits/s), interface Tunnel2014 usage is in:0.01% (11.20Bits/s) out:0.00% (0.00Bits/s)
[08-11-2015 13:40:23] SERVICE ALERT: VPN302;Interface Usage;CRITICAL;HARD;3;CRITICAL - interface Tunnel177 usage is in:
304.17% (60834714.49Bits/s) out:128.80% (25760426.73Bits/s), interface GigabitEthernet0/0 usage is in:2.55% (25494853.45Bits/s) out:6.07% (60721235.30Bits/s), interface GigabitEthernet0/1 usage is in:6.59% (65934877.33Bits/s) out:2.80% (28013899.18Bits/s), interface Tunnel162 usage is in:0.39% (78761.53Bits/s) out:0.08% (15455.10Bits/s), interface GigabitEthernet0/0.310 usage is in:2.52% (25174856.21Bits/s) out:6.02% (60189171.03Bits/s), interface GigabitEthernet0/0.401 usage is in:0.00% (3426.70Bits/s) out:0.00% (27885.45Bits/s), interface Tunnel160 usage is in:0.47% (94699.51Bits/s) out:0.09% (18040.48Bits/s), interface Tunnel161 usage is in:0.76% (151676.25Bits/s) out:0.37% (74285.24Bits/s), interface Tunnel159 usage is in:0.55% (110222.62Bits/s) out:0.27% (54296.09Bits/s), interface Tunnel157 usage is in:0.00% (0.00Bits/s) out:0.00% (0.00Bits/s), interface Tunnel178 usage is in:0.00% (0.00Bits/s) out:0.00% (0.00Bits/s), interface Tunnel2002 usage is in:0.00% (529.98Bits/s) out:0.00% (140.07Bits/s), interface Tunnel2003 usage is in:0.00% (601.29Bits/s) out:0.00% (141.18Bits/s), interface Tunnel2014 usage is in:0.00% (4.64Bits/s) out:0.00% (0.00Bits/s)
How can I explain this, even if we do the math it's more throughput through a 100MB pipe, this stuff is in Gbytes/S
Re: check_nwc_health threshold settings
Posted: Tue Aug 11, 2015 8:47 pm
by Box293
Are you using the latest version of check_nwc_health?
https://labs.consol.de/nagios/check_nwc ... index.html
I did notice this bug fix:
2014-08-28 3.0.3.8
bugfix in interface-usage/ifspeed (Thanks Matthias Gallinger)
Re: check_nwc_health threshold settings
Posted: Wed Aug 19, 2015 6:16 pm
by stecino
I have 3.5 which is after ifspeed fix. I am just using ifspeed flag to set the maxrange along with the units to MBi and calcualations are matching up with the my cacti graphs. Thanks for the pointer