The category_registry function used separate 'if' statements to check for different key prefixes (ironic.api, ironic.drivers.modules, ironic.conductor). When a key didn't match any prefix, the formatted_key variable from the previous loop iteration would be reused, causing metrics to be created with incorrect names and incomplete labels. Changed the if/if/if structure to if/elif/elif/else to ensure: - Keys are processed by exactly one branch - Unknown keys are explicitly skipped with a debug log message - No accidental reuse of stale formatted_key values Also updated test expectations to remove the bogus metric that was created by this bug, and added a unit test to verify unknown keys are properly skipped. Assisted-By: Claude Sonnet 4.5 Change-Id: Iadca6941906783259ff7af0564a092d67f11b156 Signed-off-by: Riccardo Pittau <elfosardo@gmail.com>
Ironic Prometheus Exporter
Ironic Prometheus Exporter is a Tool to expose hardware sensor data in the Prometheus format through an HTTP endpoint.
The hardware sensor data come from bare metal machines deployed using OpenStack Bare Metal Service (ironic).
- License: Apache License, Version 2.0
- Documentation: https://docs.openstack.org/ironic-prometheus-exporter/
- Source: https://opendev.org/openstack/ironic-prometheus-exporter
- Bugs: https://bugs.launchpad.net/ironic-prometheus-exporter/+bugs
- Release Notes: https://docs.openstack.org/releasenotes/ironic-prometheus-exporter
Description
Application capable to export hardware sensor data from Ironic nodes to a Prometheus Server.
Languages
Python
96%
Shell
4%