dangmocrang / check_idrac

A script to monitoring DELL IDRAC via SNMP
Other
74 stars 53 forks source link

Line 773 - ValueError: could not convert sring to float: (n/a) #66

Open dmwhite1127 opened 2 years ago

dmwhite1127 commented 2 years ago

The following occurs when I run check_idrac against a server with iDRAC 8 that currently has last redundancy on 1 PSU:

Traceback (most recent call last):
  File "./check_idrac", line 874, in <module>
      result, tmp_code = PARSER().main()
  File "./check_idrac", line 773, in main
       else: hw_4 = float(hw[4]/10

I (temporarily) fixed this by changing line 773 as follows: else: hw_4 = hw[4].split('(')[0]

I'm no advanced programmer, and I have no idea if that was the proper thing to do, but it seemed reasonable as I was looking at some of the surrounding code.

It should be noted that there is no issue with the original code when it runs against a healthy iDRAC 8 machine.

hmakmur commented 2 years ago

Thanks for fixing this. I too had the same issue recently and fixed it with your patch!!