thanks a stack for conceiving this fine program. We found that the code path when running into a No SNMP response received before timeout condition can be improved.
While we don't quite like how the patch is currently implemented, the code now handles this condition well. In this case, check_synology will respond with state "UNKNOWN".
With kind regards,
Andreas.
P.S.: For your reference, I am sharing two of the tracebacks we received below.
Traceback (most recent call last):
File "/opt/check_synology/check_synology.py", line 100, in if disk.startswith("No Such Instance"):
AttributeError: 'NoneType' object has no attribute 'startswith'
Traceback (most recent call last):
File "/opt/check_synology/check_synology.py", line 67, in load1 = str(float(snmpget('1.3.6.1.4.1.2021.10.1.5.1'))/100)
TypeError: float() argument must be a string or a number, not 'NoneType'
Dear Frederic,
thanks a stack for conceiving this fine program. We found that the code path when running into a
No SNMP response received before timeout
condition can be improved.While we don't quite like how the patch is currently implemented, the code now handles this condition well. In this case,
check_synology
will respond with state "UNKNOWN".With kind regards, Andreas.
P.S.: For your reference, I am sharing two of the tracebacks we received below.
/cc @tonkenfo