Open 6d6178 opened 6 years ago
I cloned your repo and tested using the -i
parameter for issue #44. I'm getting an error with your repo that I don't get with the original script, both with and without -i
.
# ./idrac_2.2rc5 -H 10.181.4.21 -v 2c -c public -i
Traceback (most recent call last):
File "./idrac_2.2rc5", line 852, in <module>
result, tmp_code = PARSER().main()
File "./idrac_2.2rc5", line 647, in main
hw_dict = self.classifier(snmp_data, hw_dict) # classify data
File "./idrac_2.2rc5", line 416, in classifier
item_order = int(_.split()[0].split('.')[-1])
ValueError: invalid literal for int() with base 10: 'MIB-Dell-10892::systemStateGlobalSystemStatus'
# ./idrac_2.2rc5 -H 10.181.4.21 -v 2c -c public
PS
--
DISK
--PDisk 1 (0:1:0) 278.88 GB: ONLINE, PowerStat: SPUNUP, HotSpare: no [SEAGATE, HDD, S/N: XXXXXXXX] isFailing: 0
--PDisk 2 (0:1:1) 278.88 GB: ONLINE, PowerStat: SPUNUP, HotSpare: no [SEAGATE, HDD, S/N: XXXXXXXX] isFailing: 0
FAN
--
BATTERY
--System Board CMOS Battery: ENABLED/OK [PRESENCEDETECTED]
--PERC1 ROMB Battery: ENABLED/OK [PRESENCEDETECTED]
--PERC2 ROMB Battery: ENABLED/OK [0]
PU
--
MEM
--
VDISK
--VDisk 1 (): OK/ONLINE, RAID-1 (278.88 GB), BadBlock: 0 [Virtual Disk 0 on Integrated RAID Controller 1]
Traceback (most recent call last):
File "./idrac_2.2rc5", line 870, in <module>
result, tmp_code = PARSER().main()
File "./idrac_2.2rc5", line 647, in main
hw_dict = self.classifier(snmp_data, hw_dict) # classify data
File "./idrac_2.2rc5", line 416, in classifier
item_order = int(_.split()[0].split('.')[-1])
ValueError: invalid literal for int() with base 10: 'MIB-Dell-10892::systemStateGlobalSystemStatus'
Hi everyone The bug was fixed after this pull request. Since it turns out to be a useful feature, I now merged this "-i" parameter into the latest version in my fork: https://github.com/eeshlomi/check_idrac Shlomi
I have added a
-i
option, refering to the monitoring software Icinga, which only displays WARNINGS and ERRORS. If everything is fine, only "OK" will be displayed. The script works in this state. I would like to discuss:I am very open for suggestions to improve this.