Refactor and extend prometheus component #3308
Unanswered
jzucker2
asked this question in
Component enhancements
Replies: 1 comment
-
🏷️ I've automatically added the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Component name
prometheus
Link to component documentation on our website
https://esphome.io/components/prometheus/
Describe the enhancement
I'm going to start with one big discussion around this component, as I am a big fan and a heavy user. We can break out ideas if that's considered best. I will let someone else make that call.
Current component allows relabeling and a boolean for internal components.
But what if there was something like:
This might more like having only an explicit
include
orexclude
and both might not be required. But it could help reduce prometheus payload size, especially if there's a handful of sensors or a specific component not needing metrics.As well, I think it'd be interesting to consider a v2 of the metrics that has an output that is simpler with more labels.
So instead of this as a current example:
We have something more like:
So this would remove some unnecessary code paths for current metrics that have failed metric code but can't reach it. It also solved the problem of needing 2 new metric types for each component left to add (and currently added, as well).
This would likely need to be done with a
v1/v2
flag of some kind to not break old set ups and give time to switch over. But this would greatly simplify dashboards and alerting.This would also sync up nicely with the work in in the include/exclude lists.
Some of this is already in motion:
Use cases
This is used for grafana dashboards, alerting, and debugging.
I think these changes/improvements could help with easy and generic solutions to all of the above, but especially the 3 main use cases listed above.
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions