check_nwc_health icon indicating copy to clipboard operation
check_nwc_health copied to clipboard

no interface when using interface-usage mode

Open bunghi opened this issue 6 years ago • 2 comments

Hi,

I'm using latest version 7.2.0.2 of the script running on Debian 9 server. This is the error I get when running interface-usage mode:

nagios@mqus01icinga2wk01:/var/tmp$ '/usr/lib/nagios/plugins/check_nwc_health' '--community' 'public' '--hostname' 'cwus01-wan01' '--ifspeed' '52428800' '--mode' 'interface-usage' '--morphperfdata' 'GigabitEthernet1/0/1=US01' '--name' 'GigabitEthernet1/0/1' '--protocol' '1' '--units' 'MB'
UNKNOWN - no interfaces

I try to delete the temp files and check again:

nagios@mqus01icinga2wk01:/var/tmp$ rm -rf check_nwc_health*
nagios@mqus01icinga2wk01:/var/tmp$ '/usr/lib/nagios/plugins/check_nwc_health' '--community' 'public' '--hostname' 'cwus01-wan01' '--ifspeed' '52428800' '--mode' 'interface-usage' '--morphperfdata' 'GigabitEthernet1/0/1=US01' '--name' 'GigabitEthernet1/0/1' '--protocol' '1' '--units' 'MB'
UNKNOWN - no interfaces

Same result. I'm trying to use list-interfaces to check if the interface that I'm using is listed:

nagios@mqus01icinga2wk01:/var/tmp$ '/usr/lib/nagios/plugins/check_nwc_health' '--community' 'public' '--hostname' 'cwus01-wan01' '--ifspeed' '52428800' '--mode' list-interfaces
000001 Vlan1
000002 Vlan2
000102 Vlan102
005001 Port-channel1
005137 StackPort1
005138 StackSub-St1-1
005139 StackSub-St1-2
005140 StackPort2
005141 StackSub-St2-1
005142 StackSub-St2-2
010101 GigabitEthernet1/0/1
010102 GigabitEthernet1/0/2
010103 GigabitEthernet1/0/3
010104 GigabitEthernet1/0/4
010105 GigabitEthernet1/0/5
010106 GigabitEthernet1/0/6
010107 GigabitEthernet1/0/7
010108 GigabitEthernet1/0/8
010109 GigabitEthernet1/0/9
010110 GigabitEthernet1/0/10
010111 GigabitEthernet1/0/11
010112 GigabitEthernet1/0/12
010113 GigabitEthernet1/0/13
010114 GigabitEthernet1/0/14
010115 GigabitEthernet1/0/15
010116 GigabitEthernet1/0/16
010117 GigabitEthernet1/0/17
010118 GigabitEthernet1/0/18
010119 GigabitEthernet1/0/19
010120 GigabitEthernet1/0/20
010121 GigabitEthernet1/0/21
010122 GigabitEthernet1/0/22
010123 GigabitEthernet1/0/23
010124 GigabitEthernet1/0/24
010125 GigabitEthernet1/0/25
010126 GigabitEthernet1/0/26
010127 GigabitEthernet1/0/27
010128 GigabitEthernet1/0/28
010601 GigabitEthernet2/0/1
010602 GigabitEthernet2/0/2
010603 GigabitEthernet2/0/3
010604 GigabitEthernet2/0/4
010605 GigabitEthernet2/0/5
010606 GigabitEthernet2/0/6
010607 GigabitEthernet2/0/7
010608 GigabitEthernet2/0/8
010609 GigabitEthernet2/0/9
010610 GigabitEthernet2/0/10
010611 GigabitEthernet2/0/11
010612 GigabitEthernet2/0/12
010613 GigabitEthernet2/0/13
010614 GigabitEthernet2/0/14
010615 GigabitEthernet2/0/15
010616 GigabitEthernet2/0/16
010617 GigabitEthernet2/0/17
010618 GigabitEthernet2/0/18
010619 GigabitEthernet2/0/19
010620 GigabitEthernet2/0/20
010621 GigabitEthernet2/0/21
010622 GigabitEthernet2/0/22
010623 GigabitEthernet2/0/23
010624 GigabitEthernet2/0/24
010625 GigabitEthernet2/0/25
010626 GigabitEthernet2/0/26
010627 GigabitEthernet2/0/27
010628 GigabitEthernet2/0/28
012001 Null0
012002 FastEthernet0
OK - have fun

Interface is there. I try again the interface-usage mode and it works:

nagios@mqus01icinga2wk01:/var/tmp$ '/usr/lib/nagios/plugins/check_nwc_health' '--community' 'public' '--hostname' 'cwus01-wan01' '--ifspeed' '52428800' '--mode' 'interface-usage' '--morphperfdata' 'GigabitEthernet1/0/1=US01' '--name' 'GigabitEthernet1/0/1' '--protocol' '1' '--units' 'MB'
OK - interface GigabitEthernet1/0/1 (alias OpenSystem_1) usage is in:18.20% (1.19MB/s) out:6.02% (0.39MB/s) | 'US01_usage_in'=18.20%;80;90;0;100 'US01_usage_out'=6.02%;80;90;0;100 'US01_traffic_in'=1.19MB;5.2429;5.8982;0;6.5536 'US01_traffic_out'=0.39MB;5.2429;5.8982;0;6.5536

I'm checking content of interface-usage temp file and there is recent data:

nagios@mqus01icinga2wk01:/var/tmp$ ls -ltr check_nwc_health/
total 88
-rw-r--r-- 1 nagios nagios 7518 Sep 17 09:03 cwus01-wan01_interface_cache_4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:05 172.25.100.10_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:05 172.21.201.2_device::hardware::load_protect_2222_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:05 172.21.200.15_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:06 192.168.23.3_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:06 172.21.200.19_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:07 172.21.200.11_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:07 172.21.200.3_device::hardware::load_protect_2222_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:07 192.168.25.174_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:08 172.21.200.10_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:08 172.25.100.60_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:09 172.21.200.13_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios  147 Sep 17 09:09 cwus01-wan01_device::interfaces::usage_10101#gigabitethernet1_0_14c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:09 172.21.200.17_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:09 172.21.200.16_device::hardware::load_protect_11001_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:09 172.21.200.14_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:09 172.21.201.3_device::hardware::load_protect_2222_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:10 172.21.200.12_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:10 172.21.200.18_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:10 172.21.200.2_device::hardware::load_protect_2222_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:10 172.25.100.61_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
nagios@mqus01icinga2wk01:/var/tmp$ cat check_nwc_health/cwus01-wan01_device::interfaces::usage_10101#gigabitethernet1_0_14c9184f37cff01bcdc32dc486ec36961
$VAR1 = {
  'timestamp' => 1537189829,
  'localtime' => 'Mon Sep 17 09:10:29 2018',
  'ifOutOctets' => 1648874213,
  'ifInOctets' => 140825275
};
nagios@mqus01icinga2wk01:/var/tmp$

The thing is that after a fiew executions I run again in the "UNKNOWN - no interface" problem and the only way to fix is is following the steps above. Any idea?

bunghi avatar Sep 17 '18 13:09 bunghi

How can i debug this? I need ssh-access. Gesendet von meinem Windows 10-Gerät. Von: mailto:[email protected] bunghi Gesendet: Montag, 17. September 2018 15:12 An: mailto:[email protected] lausser/check_nwc_health Cc: mailto:[email protected] Subscribed Betreff: [lausser/check_nwc_health] no interface when using interface-usage mode (#180)Hi,

I'm using latest version 7.2.0.2 of the script running on Debian 9 server. This is the error I get when running interface-usage mode:

nagios@mqus01icinga2wk01:/var/tmp$ '/usr/lib/nagios/plugins/check_nwc_health' '--community' 'public' '--hostname' 'cwus01-wan01' '--ifspeed' '52428800' '--mode' 'interface-usage' '--morphperfdata' 'GigabitEthernet1/0/1=US01' '--name' 'GigabitEthernet1/0/1' '--protocol' '1' '--units' 'MB'
UNKNOWN - no interfaces

I try to delete the temp files and check again:

nagios@mqus01icinga2wk01:/var/tmp$ rm -rf check_nwc_health*
nagios@mqus01icinga2wk01:/var/tmp$ '/usr/lib/nagios/plugins/check_nwc_health' '--community' 'public' '--hostname' 'cwus01-wan01' '--ifspeed' '52428800' '--mode' 'interface-usage' '--morphperfdata' 'GigabitEthernet1/0/1=US01' '--name' 'GigabitEthernet1/0/1' '--protocol' '1' '--units' 'MB'
UNKNOWN - no interfaces

Same result. I'm trying to use list-interfaces to check if the interface that I'm using is listed:

nagios@mqus01icinga2wk01:/var/tmp$ '/usr/lib/nagios/plugins/check_nwc_health' '--community' 'public' '--hostname' 'cwus01-wan01' '--ifspeed' '52428800' '--mode' list-interfaces
000001 Vlan1
000002 Vlan2
000102 Vlan102
005001 Port-channel1
005137 StackPort1
005138 StackSub-St1-1
005139 StackSub-St1-2
005140 StackPort2
005141 StackSub-St2-1
005142 StackSub-St2-2
010101 GigabitEthernet1/0/1
010102 GigabitEthernet1/0/2
010103 GigabitEthernet1/0/3
010104 GigabitEthernet1/0/4
010105 GigabitEthernet1/0/5
010106 GigabitEthernet1/0/6
010107 GigabitEthernet1/0/7
010108 GigabitEthernet1/0/8
010109 GigabitEthernet1/0/9
010110 GigabitEthernet1/0/10
010111 GigabitEthernet1/0/11
010112 GigabitEthernet1/0/12
010113 GigabitEthernet1/0/13
010114 GigabitEthernet1/0/14
010115 GigabitEthernet1/0/15
010116 GigabitEthernet1/0/16
010117 GigabitEthernet1/0/17
010118 GigabitEthernet1/0/18
010119 GigabitEthernet1/0/19
010120 GigabitEthernet1/0/20
010121 GigabitEthernet1/0/21
010122 GigabitEthernet1/0/22
010123 GigabitEthernet1/0/23
010124 GigabitEthernet1/0/24
010125 GigabitEthernet1/0/25
010126 GigabitEthernet1/0/26
010127 GigabitEthernet1/0/27
010128 GigabitEthernet1/0/28
010601 GigabitEthernet2/0/1
010602 GigabitEthernet2/0/2
010603 GigabitEthernet2/0/3
010604 GigabitEthernet2/0/4
010605 GigabitEthernet2/0/5
010606 GigabitEthernet2/0/6
010607 GigabitEthernet2/0/7
010608 GigabitEthernet2/0/8
010609 GigabitEthernet2/0/9
010610 GigabitEthernet2/0/10
010611 GigabitEthernet2/0/11
010612 GigabitEthernet2/0/12
010613 GigabitEthernet2/0/13
010614 GigabitEthernet2/0/14
010615 GigabitEthernet2/0/15
010616 GigabitEthernet2/0/16
010617 GigabitEthernet2/0/17
010618 GigabitEthernet2/0/18
010619 GigabitEthernet2/0/19
010620 GigabitEthernet2/0/20
010621 GigabitEthernet2/0/21
010622 GigabitEthernet2/0/22
010623 GigabitEthernet2/0/23
010624 GigabitEthernet2/0/24
010625 GigabitEthernet2/0/25
010626 GigabitEthernet2/0/26
010627 GigabitEthernet2/0/27
010628 GigabitEthernet2/0/28
012001 Null0
012002 FastEthernet0
OK - have fun

Interface is there. I try again the interface-usage mode and it works:

nagios@mqus01icinga2wk01:/var/tmp$ '/usr/lib/nagios/plugins/check_nwc_health' '--community' 'public' '--hostname' 'cwus01-wan01' '--ifspeed' '52428800' '--mode' 'interface-usage' '--morphperfdata' 'GigabitEthernet1/0/1=US01' '--name' 'GigabitEthernet1/0/1' '--protocol' '1' '--units' 'MB'
OK - interface GigabitEthernet1/0/1 (alias OpenSystem_1) usage is in:18.20% (1.19MB/s) out:6.02% (0.39MB/s) | 'US01_usage_in'=18.20%;80;90;0;100 'US01_usage_out'=6.02%;80;90;0;100 'US01_traffic_in'=1.19MB;5.2429;5.8982;0;6.5536 'US01_traffic_out'=0.39MB;5.2429;5.8982;0;6.5536

I'm checking content of interface-usage temp file and there is recent data:

nagios@mqus01icinga2wk01:/var/tmp$ ls -ltr check_nwc_health/
total 88
-rw-r--r-- 1 nagios nagios 7518 Sep 17 09:03 cwus01-wan01_interface_cache_4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:05 172.25.100.10_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:05 172.21.201.2_device::hardware::load_protect_2222_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:05 172.21.200.15_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:06 192.168.23.3_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:06 172.21.200.19_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:07 172.21.200.11_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:07 172.21.200.3_device::hardware::load_protect_2222_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:07 192.168.25.174_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:08 172.21.200.10_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:08 172.25.100.60_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:09 172.21.200.13_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios  147 Sep 17 09:09 cwus01-wan01_device::interfaces::usage_10101#gigabitethernet1_0_14c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:09 172.21.200.17_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:09 172.21.200.16_device::hardware::load_protect_11001_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:09 172.21.200.14_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:09 172.21.201.3_device::hardware::load_protect_2222_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:10 172.21.200.12_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:10 172.21.200.18_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   48 Sep 17 09:10 172.21.200.2_device::hardware::load_protect_2222_usage4c9184f37cff01bcdc32dc486ec36961
-rw-rw---- 1 nagios nagios   49 Sep 17 09:10 172.25.100.61_device::hardware::load_protect_10_usage4c9184f37cff01bcdc32dc486ec36961
nagios@mqus01icinga2wk01:/var/tmp$ cat check_nwc_health/cwus01-wan01_device::interfaces::usage_10101#gigabitethernet1_0_14c9184f37cff01bcdc32dc486ec36961
$VAR1 = {
  'timestamp' => 1537189829,
  'localtime' => 'Mon Sep 17 09:10:29 2018',
  'ifOutOctets' => 1648874213,
  'ifInOctets' => 140825275
};
nagios@mqus01icinga2wk01:/var/tmp$

The thing is that after a fiew executions I run again in the "UNKNOWN - no interface" problem and the only way to fix is is following the steps above. Any idea?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/lausser/check_nwc_health/issues/180

lausser avatar Sep 17 '18 16:09 lausser

I found this similar problem. The thing that having to run list-interfaces fixes the problem, for a while..

https://monitoring-portal.org/t/check-nwc-health-interface-usage-in-a-ha-icinga2-setup/1891

As you can see it stopped working after one hour more or less: image

Can I debug it for you?

bunghi avatar Sep 18 '18 05:09 bunghi