Do not report unavailable values as NaN#6
Open
derselbst wants to merge 1 commit intocleargray:masterfrom
Open
Conversation
I am currently creating a Grafana dashboard for the ipmi exporter. And I find it incredibly difficult to deal with NaN values. For example, I want to calculate the average power consumption. But when a node is powered off, the power consumption is reported as NaN. Hence the entire result become none. My attempt to join the query with `ipmi_power_state` and to assume a default value instead of NaN while the node is powered off have been futile. In Prometheus, it is good practice to skip missing values. In this case, a simple `or` in the Prometheus query could be used to deal with the missing values. So, please consider to simply skip unavailable values rather than reporting them as NaN.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am currently creating a Grafana dashboard for the ipmi exporter. And I find it incredibly difficult to deal with the returned NaN values. For example, I want to calculate the average power consumption. But when a node is powered off, the power consumption is reported as NaN. Hence the entire calculated power consumption result becomes NaN at some point. My attempt to join the query with
ipmi_power_stateand to assume a default value instead of NaN while the node is powered off have been futile. In Prometheus, it is good practice to skip missing values. Doing so would allow a simpleorin the Prometheus query to be used to deal with the missing values appropriately. So, please consider to simply skip unavailable values rather than reporting them as NaN.