Werk #12714: hr_mem: don't crash on invalid SNMP values for hrStorageType
| Component | Checks & agents | ||||
| Title | hr_mem: don't crash on invalid SNMP values for hrStorageType | ||||
| Date | Apr 27, 2021 | ||||
| Level | Trivial Change | ||||
| Class | Bug Fix | ||||
| Compatibility | Compatible - no manual interaction needed | ||||
| Checkmk versions & editions |
|
hrStorageType defines the type of information provided via SNMP handled by hr_mem. Very often
invalid values for hrStorageType are being provided, which leads to unhandled ValueError()
exceptions.
This change makes the plugin not crash on invalid values but instead return a special string
"unknown" as value for hr_type which then can be handled properly by the checks which handle
the data provided by hr_mem.