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: unexport unavailable metrics #125492

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Commits on Oct 6, 2024

  1. Prometheus: unexport unavailable metrics

    When sensors go offline, this component would continue to report its
    last value, until Home Assistant itself restarts, or the sensor
    returns.
    
    The `entity_available` metric can be used to filter out unavailable
    metrics, but this is slow with current versions of prometheus
    (see prometheus/prometheus#9577).
    
    Now, the component will automatically withdraw metrics when the entity
    becomes unavailable, which matches the behavior on restart and
    makes it easier to see missing metrics without using an `unless`.
    agoode committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    e3ffc0b View commit details
    Browse the repository at this point in the history