Skip to content

Filter low-value generic IPMI sensor metrics#317

Open
SilenceAdele wants to merge 1 commit into
prometheus-community:masterfrom
SilenceAdele:312_1
Open

Filter low-value generic IPMI sensor metrics#317
SilenceAdele wants to merge 1 commit into
prometheus-community:masterfrom
SilenceAdele:312_1

Conversation

@SilenceAdele

Copy link
Copy Markdown
  • For native IPMI implementation:
    • Only export ipmi_sensor_value when the sensor has a real physical unit (i.e. SensorUnitType != Unspecified)
    • Only export ipmi_sensor_state when the mapped state is not NaN.
  • For freeipmi implementation:
    • Only export ipmi_sensor_value/ipmi_sensor_state when not NaN.

@SilenceAdele

Copy link
Copy Markdown
Author

Related explanation: #312 (comment)

@bitfehler

Copy link
Copy Markdown
Contributor

I would be open to dropping values that are NaN, but it would have to be opt-in, e.g. a command line switch. Dropping based on an unspecified unit seems dangerous, though, I don't think that makes sense.

Also, a word of caution: I took a closer look at the outputs of the native collectors. I have to say: I would not use that for production. FreeIPMI does a lot of post-processing of the raw sensor data, go-ipmi does not, and reproducing that to the effect that both have the same semantics is a massive undertaking...

@SuperQ

SuperQ commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

I agree that we should have some flags for this, but maybe opt-out is probably better for most use cases.

* Add a `--filter-nan-sensors` flag (disabled by default, opt-in).
* Filter NaN generic sensor value/state metrics.

Signed-off-by: zhiyuan.zhou <zhiyuan.zhou@easystack.cn>
@SilenceAdele

Copy link
Copy Markdown
Author

Thanks for your suggestions! @bitfehler @SuperQ

I've introduced an opt-in flag --filter-nan-sensors to filter out generic sensor metrics with NaN values.
This keeps the existing behavior unchanged by default, while providing flexibility for users who prefer to exclude NaN metrics.

Happy to refine this further if you have any concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants