home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.83k stars 28.94k forks source link

Fan entities not exposed in Prometheus metrics #119803

Closed llamafilm closed 1 day ago

llamafilm commented 3 weeks ago

The problem

Entities in the fan domain are not exposed to Prometheus metrics. I believe this is a bug because the documentation states:

By default, no entity will be excluded

What version of Home Assistant Core has the issue?

core-2024.6.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

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

prometheus:
  namespace: hass

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 weeks ago

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)

knyar commented 3 weeks ago

I believe this is a bug because the documentation states:

By default, no entity will be excluded

I suspect what that note is intended to do is describe the default behaviour of the filter configuration parameter, since it's in the Configure filter section of the doc. But I agree it can be interpreted to mean that the Prometheus integration automatically supports all (existing and future) Home Assistant entities, which is not accurate.

Would you be interested in also sending a PR to make the documentation more clear? Perhaps it might be sufficient to mention that each Home Assistant entity domain is instrumented explicitly, and many domains currently have no Prometheus metrics defined for them.

llamafilm commented 2 weeks ago

I've made a small PR to clarify this in the docs.

frenck commented 1 day ago

Fixed in the above linked core PR