jenningsloy318 / redfish_exporter

exporter to get metrics from redfish based hardware such as lenovo/dell/superc servers
Apache License 2.0
70 stars 61 forks source link

PhysicalSecurity Metrics/State mixed up ? #39

Closed iceman91176 closed 2 years ago

iceman91176 commented 2 years ago

Hi,

i might be wrong but it seems like the physical_security_sensor* metrics are mixed up.

The chassis API returns the following

...
  "PhysicalSecurity": {
    "IntrusionSensor": "Normal",
    "IntrusionSensorNumber": 115,
    "IntrusionSensorReArm": "Manual"
  },
...

which generates the following metric

redfish_chassis_physical_security_sensor_rearm_method{chassis_id="System.Embedded.1",  intrusion_sensor="Normal", intrusion_sensor_number="115", job="probe/prometheus-playground/redfish-monitoring", resource="physical_security"}  1

In this case the metric value is taken/translated from IntrusionSensorReArm.

IMHO it would be more relevant to use the IntrusionSensor - Property as Metric-Value, because this one tells waht the IntrusionState is, eg HardwareIntrusion, Normal, TamperingDetected.

The IntrusionSensorReArm-Value should rather be a label.

The feature was implemented here

_Originally posted by @jenningsloy318 in https://github.com/jenningsloy318/redfish_exporter/issues/16#issuecomment-657338827_