Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus integration does not differentiate between "unavailable" and "unknown" entity states #139201

Open
K900 opened this issue Feb 24, 2025 · 1 comment

Comments

@K900
Copy link

K900 commented Feb 24, 2025

The problem

As currently written, the Prometheus integration reports entities as "unavailable" when they're either actually unavailable or in an "unknown" state:

IGNORED_STATES = frozenset({STATE_UNAVAILABLE, STATE_UNKNOWN})

This makes it really hard to set up an alert rule that would trigger on things actually being unavailable, as many integrations don't report states for things such as action buttons, and thus those are always in the "unknown" state.

It would be nice to have a way to differentiate those two cases on the Prometheus side, instead of having to hardcode a list of known-unknown-state entities.

What version of Home Assistant Core has the issue?

2025.2.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Prometheus

Link to integration documentation on our website

https://www.home-assistant.io/integrations/prometheus/

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

@home-assistant
Copy link

Hey there @knyar, mind taking a look at this issue as it has been labeled with an integration (prometheus) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of prometheus can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign prometheus Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


prometheus documentation
prometheus source
(message by IssueLinks)

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

No branches or pull requests

1 participant