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
Checkmk Editon Checkmk Raw (CRE)
Checkmk Version 2.0.0p4 2.1.0i1
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

`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`.

To the list of all Werks