Bug 2220887

Summary: [RHOSP 17.1] Power metrics are reported as current metrics
Product: Red Hat OpenStack Reporter: Yadnesh Kulkarni <ykulkarn>
Component: openstack-ceilometerAssignee: Yadnesh Kulkarni <ykulkarn>
Status: ON_DEV --- QA Contact: Leonid Natapov <lnatapov>
Severity: medium Docs Contact: mgeary <mgeary>
Priority: medium    
Version: 17.1 (Wallaby)CC: apevec, ifrangs, jelynch, rheslop
Target Milestone: z2Keywords: Triaged, ZStream
Target Release: 17.1Flags: ifrangs: needinfo? (ykulkarn)
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
The data collection service (ceilometer) does not filter separate power and current metrics.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yadnesh Kulkarni 2023-07-06 12:33:38 UTC
Description of problem:

Power metrics with units Watts(W) must be reported with metric name "hardware.ipmi.power" and not "hardware.ipmi.current"
~~~
| defa8232-8928-4608-8187-e61e16bd357e | ceilometer-high | hardware.ipmi.current | W | 87760997-1692-5ade-9d30-b12507ce8a44 |
~~~

The output of the command used to capture current metrics also includes power metrics, the readings are sampled as a current metric
without considering the type of sensor.
~~~
[stack@standalone ~]$ sudo ipmitool sdr -v type Current
Discovered IPMB address 0x0
Sensor ID              : Current 1 (0x6b)
 Entity ID             : 10.1 (Power Supply)
 Sensor Type (Threshold)  : Current (0x03)
 Sensor Reading        : 0.800 (+/- 0) Amps
 Status                : ok

Sensor ID              : Current 2 (0x6c)
 Entity ID             : 10.2 (Power Supply)
 Sensor Type (Threshold)  : Current (0x03)
 Sensor Reading        : Disabled
 Status                : Not Available

Sensor ID              : Pwr Consumption (0x76)
 Entity ID             : 7.1 (System Board)
 Sensor Type (Threshold)  : Current (0x03)
 Sensor Reading        : 154 (+/- 0) Watts
 Status                : ok
 Nominal Reading       : 1034.000
 Normal Maximum        : 1056.000
 Upper critical        : 1914.000
 Upper non-critical    : 1738.000
~~~

Version-Release number of selected component (if applicable):
openstack-ceilometer-ipmi-16.0.2-1.20230428061013.7dbb69e.el9ost.noarch