-
-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
In 5b2d2cc the flatdict dependency was removed as it broke builds for the new RHEL 10, SLE 15 and SLE 16 targets. (A newer version of flatdict cannot be used as it requires Python 3.10 and therefore does not work on older targets such as RHEL 8)
As a consequence the statuspal plugin is currently broken (this is the only plugin where flatdict is used).
The following usage of FlatterDict in the plugin needs to be replaced with another approach to traverse the nested dictionaries:
monitoring-plugins/check-plugins/statuspal/statuspal
Lines 229 to 244 in 5b2d2cc
| # services - search for any incidents in services | |
| flattened_result = flatdict.FlatterDict(result['services']) | |
| item = {} | |
| for key, value in flattened_result.items(): | |
| if key.endswith(':name'): | |
| item['name'] = concat_values(flattened_result, key) | |
| if key.endswith(':current_incident_type'): | |
| item['state'] = statuspalstate2state(value) | |
| if item['state'] == STATE_WARN: | |
| cnt_warn += 1 | |
| if item['state'] == STATE_CRIT: | |
| cnt_crit += 1 | |
| item['state'] = lib.base.state2str(item['state'], empty_ok=False) | |
| if len(item) == 2: | |
| table_data.append(item) | |
| item = {} |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels