Browse Source

Support for metrics description

This patch adds the capability to add a description for the ipmi

The description are based on [1]


Change-Id: Ic21a778b06456140ac5dbbec0e44271c72d80b29
Iury Gregory Melo Ferreira 11 months ago
committed by Iury Gregory Melo Ferreira
3 changed files with 115 additions and 3 deletions
  1. +15
  2. +96
  3. +4

+ 15
- 3
ironic_prometheus_exporter/parsers/ View File

@@ -10,7 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.

import json
import logging
import pkg_resources
import re

from datetime import datetime
@@ -71,6 +73,11 @@ CATEGORY_PARAMS = {

IPMI_JSON = pkg_resources.resource_filename(__name__,

def metric_names(category_info):'metric_names function called with data=%s' % str(category_info))

@@ -214,7 +221,8 @@ def prometheus_format(category_info, ipmi_metric_registry, available_metrics):
values = extract_values(entries, category_info)
if all(v is None for v in values.values()):
g = Gauge(metric, '', labelnames=labels.get(entries[0]).keys(),
g = Gauge(metric, get_metric_description(metric),
for e in entries:
if values[e] is None:
@@ -244,6 +252,10 @@ def timestamp_registry(node_information, ipmi_metric_registry):
dt_timestamp = datetime.strptime(node_information['timestamp'],
value = int((dt_timestamp - dt_1970).total_seconds())
g = Gauge(metric, 'Timestamp of the last received payload',
labelnames=labels.keys(), registry=ipmi_metric_registry)
g = Gauge(metric, get_metric_description(metric),
labelnames=list(labels), registry=ipmi_metric_registry)

def get_metric_description(metric_name):
return IPMI_METRICS_DESCRIPTION.get(metric_name, '')

+ 96
- 0
ironic_prometheus_exporter/parsers/metrics_information/ipmi.json View File

@@ -0,0 +1,96 @@
"The System Board Management Subsys Health",
"The temperature of each Processor",
"The exhaust temperature for the Systeam Board",
"The inlet temperature for the Systeam Board",
"Unknown System Event",
"The System Firmware progress",
"Current power supply",
"Current power consumption",
"Indicates if the Trusted Platform Module is present",
"Indicates if there is a hardware version error",
"Indicates if there is a mismatch in the chassis information",
"Status of the ECC Corr Err",
"Status of the iDPT Mem Fail",
"Status of the ECC Uncorr Err",
"Status of the Memory Mirrored",
"Status of the Mem ECC Warning",
"Status of the Memory B",
"Status of the Memory A",
"Status of the USB Over-current",
"Status of the POST Pkg Repair",
"Status of the Memory Spared",
"Indicates if there is redundancy for power supply",
"Indicates the status of the power supply",
"watchdog timer expirations",
"Indicates if watchdog is enabled",
"Indicates if fan redundancy is actived",
"Indicates the fan speed",
"Timestamp of the last received payload",
"Status of the MEM___ VTT PG",
"Status of the SW PG",
"Status of the VSA PG",
"Status of the VCORE PG",
"Indicates the voltage for the power supply",
"Status of the DIMM PG",
"Status of the VSBM SW PG",
"Status of the NDC PG",
"Status of the PS_ PG FAIL",
"Status of the VCCIO PG",
"Status of the VSB__ SW PG",
"Status of the MEM___ VDDQ PG",
"Status of the BP PG",
"Status of the A PG",
"Status of the FIVR PG",
"Status of the PVNN SW PG",
"Status of the MEM___ VPP PG",
"Status of the Pfault Fail Safe",
"Status of the B PG"

+ 4
- 0
releasenotes/notes/ipmi-metric-description-d670149bcd984a51.yaml View File

@@ -0,0 +1,4 @@
- |
Adds support to add a description for each ipmi metric.