leibler / check_mk-sas2ircu

Check_MK Check for SAS2IRCU Raid Controller used in Dell R200 Server
2 stars 3 forks source link

sas2ircu check_mk check index out of range #3

Closed moultonsa closed 6 years ago

moultonsa commented 6 years ago

Hi Leo, I don't know if you are still interested in maintaining this code, but this morning I was greeted with an index error:

Crash Type check
Time 2018-01-03 09:24:34
Operating System el7
Check_MK Version 1.4.0p22
Python Version 2.7.14 (default, Dec 19 2017, 13:54:27) [GCC 7.2.0]
Exception IndexError (list index out of range)
Traceback File "/omd/sites/cades/share/check_mk/modules/check_mk_base.py", line 1460, in execute_check result = sanitize_check_result(check_function(item, params, info), check_uses_snmp(checkname)) File "/omd/sites/cades/local/share/check_mk/checks/sas2ircu", line 92, in checksas2ircu itemName = "DISK "+line[1]+"/"+line[2]+" "+line[6].upper()+""+line[7].upper()+" ("+line[9].upper()+")"

The agent output looks like

<<>> volume 0 169 degraded(dgd) 0044abf5cd1f9b41 raid1e 1429080 disk 0 0 missing(mis) 0000000-0-0000-0000 9xg90a75 - undetermined disk 0 1 optimal_(opt) 4433221-1-0100-0000 ata st91000640ns 9xg8zwl5 sata satahdd disk 0 2 optimal(opt) 4433221-1-0200-0000 ata st91000640ns 9xg9025g sata satahdd disk 0 3 ready(rdy) 4433221-1-0300-0000 ata intel_ssdsc2bb80 btwa61450610800hgn sata sata_ssd

I suspect that it is choking on the disk 0 0 warning since there are not at least 9 fields.

If you aren't doing this any more, please let me know, and I'll dive in python. Otherwise, please let me know if there is additional information you need.

leibler commented 6 years ago

removed debug print statement (commit 5b192a4)