lausser / check_nwc_health

nwc = network component. This plugin checks lots of aspects of routers, switches, wlan controllers, firewalls,.....
http://labs.consol.de/nagios/check_nwc_health
GNU General Public License v2.0
146 stars 88 forks source link

Black-/Whitelist Hardware Components #287

Open it-native opened 2 years ago

it-native commented 2 years ago

Hi,

what's the correct way to blacklist/whitelist Hardware sensors for mode "hardware-health"? I tries several combinations of --name, --blacklist and --regex but none of them gave blacklistet the powersuppy issue (or only showed temperature, which is also ok)

/check_nwc_health --hostname 1.2.3.4 --community "public-what-else" --mode hardware-health 

CRITICAL - powersupply 10 (Switch 1 Power Supply 1) is shutdown, powersupply 9 (Switch 1 Power Supply Module 1) is shutdown, temperature 1016 Switch 1 Slot 1 Temp: Outlet_A is 28 (of 80 max = normal), temperature 1017 Switch 1 Slot 1 Temp: Outlet_B is 25 (of 75 max = normal), temperature 1018 Switch 1 Slot 1 Temp: Inlet_A is 29 (of 70 max = normal), temperature 1019 Switch 1 Slot 1 Temp: Inlet_B is 26 (of 70 max = normal), temperature 1020 Switch 1 Slot 1 Temp: UADP_0_0 is 36 (of 124 max = normal), temperature 1021 Switch 1 Slot 1 Temp: UADP_0_1 is 36 (of 124 max = normal), temperature 1022 Switch 1 Slot 1 Temp: UADP_0_2 is 36 (of 124 max = normal), temperature 1023 Switch 1 Slot 1 Temp: UADP_0_3 is 37 (of 124 max = normal), temperature 1024 Switch 1 Slot 1 Temp: UADP_0_4 is 37 (of 124 max = normal), temperature 1025 Switch 1 Slot 1 Temp: UADP_0_5 is 36 (of 124 max = normal), temperature 1026 Switch 1 Slot 1 Temp: UADP_0_6 is 36 (of 124 max = normal), temperature 1027 Switch 1 Slot 1 Temp: UADP_0_7 is 39 (of 124 max = normal), temperature 1028 Switch 1 Slot 1 Temp: UADP_0_8 is 36 (of 124 max = normal), temperature 1039 Switch 1 Slot 1 Temp: Coretemp is 34 (of 125 max = normal), temperature 1040 Switch 1 Slot 1 Temp: OutletDB is 26 (of 85 max = normal), temperature 2016 Switch 2 Slot 1 Temp: Outlet_A is 24 (of 80 max = normal), temperature 2017 Switch 2 Slot 1 Temp: Outlet_B is 21 (of 75 max = normal), temperature 2018 Switch 2 Slot 1 Temp: Inlet_A is 24 (of 70 max = normal), temperature 2019 Switch 2 Slot 1 Temp: Inlet_B is 22 (of 70 max = normal), temperature 2020 Switch 2 Slot 1 Temp: UADP_0_0 is 33 (of 124 max = normal), temperature 2021 Switch 2 Slot 1 Temp: UADP_0_1 is 33 (of 124 max = normal), temperature 2022 Switch 2 Slot 1 Temp: UADP_0_2 is 33 (of 124 max = normal), temperature 2023 Switch 2 Slot 1 Temp: UADP_0_3 is 33 (of 124 max = normal), temperature 2024 Switch 2 Slot 1 Temp: UADP_0_4 is 33 (of 124 max = normal), temperature 2025 Switch 2 Slot 1 Temp: UADP_0_5 is 33 (of 124 max = normal), temperature 2026 Switch 2 Slot 1 Temp: UADP_0_6 is 33 (of 124 max = normal), temperature 2027 Switch 2 Slot 1 Temp: UADP_0_7 is 34 (of 124 max = normal), temperature 2028 Switch 2 Slot 1 Temp: UADP_0_8 is 33 (of 124 max = normal), temperature 2039 Switch 2 Slot 1 Temp: Coretemp is 31 (of 125 max = normal), temperature 2040 Switch 2 Slot 1 Temp: OutletDB is 23 (of 85 max = normal) | 'temp_1016'=28;80;;; 'temp_1017'=25;75;;; 'temp_1018'=29;70;;; 'temp_1019'=26;70;;; 'temp_1020'=36;124;;; 'temp_1021'=36;124;;; 'temp_1022'=36;124;;; 'temp_1023'=37;124;;; 'temp_1024'=37;124;;; 'temp_1025'=36;124;;; 'temp_1026'=36;124;;; 'temp_1027'=39;124;;; 'temp_1028'=36;124;;; 'temp_1039'=34;125;;; 'temp_1040'=26;85;;; 'temp_2016'=24;80;;; 'temp_2017'=21;75;;; 'temp_2018'=24;70;;; 'temp_2019'=22;70;;; 'temp_2020'=33;124;;; 'temp_2021'=33;124;;; 'temp_2022'=33;124;;; 'temp_2023'=33;124;;; 'temp_2024'=33;124;;; 'temp_2025'=33;124;;; 'temp_2026'=33;124;;; 'temp_2027'=34;124;;; 'temp_2028'=33;124;;; 'temp_2039'=31;125;;; 'temp_2040'=23;85;;;

thx & BR Oliver

ggzengel commented 2 years ago

add -vv | grep "\[" /check_nwc_health --hostname 1.2.3.4 --community "public-what-else" --mode hardware-health -vv | grep "\["

You will get

[DISKSUBSYSTEM]
[DEVICESUBSYSTEM]
[HRDEVICEPROCESSOR_196608]
[HRDEVICENETWORK_lo]
[HRDEVICENETWORK_sit0]
[HRDEVICENETWORK_bond0]
[HRDEVICENETWORK_eth0]
[HRDEVICENETWORK_eth1]
[HRDEVICEPRINTER_327680]
[HRDEVICECOPROCESSOR_786432]

Run: /check_nwc_health --hostname 1.2.3.4 --community "public-what-else" --mode hardware-health --blacklist HRDEVICENETWORK_sit0,HRDEVICENETWORK_bond0