-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Proof on Concept] Add initial support to export metrics for Prometheus #7216
Conversation
Hi everybody, this is my first PR for embedded software. I have no idea what I'm doing. I don't know how the process works to add translations, so I added Regarding the checklist: I don't know what core 2.6.1 is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be frugal in flash size. Remove all help text and keep it utra-minimal.
Thx for the PR, but adding probitary enhancements have to be well considered. |
It is missing a define key in order to disable this and not adding more flash usage if this feature is not needed |
@s-hadinger: Sure, will do. @Jason2866: The Prometheus protocol is not proprietary, and it is not a small project either. @ascillato: Yes, will do. General question: I don't understand the code structure, esp. how .ino files work. |
I agree with @Jason2866 re: gains for users. Prometheus is a pull-based metrics collector, which needs code like this to continuously push data to prometheus. The same result can be obtained by simply configuring influxdb (which using the prometheus authors own words is better for event handling) with telegram's mqtt_consumer, without a single byte of code added to Tasmota. |
jziolkowski: The thing is, I have Prometheus running, and I'm not interested in setting up Influxdb. |
Can you measure the code increase with your PR. I'm surprised that %f works in printf, float is normally disabled to save a lot of code. |
Actually, it doesn't work, I need to rework that too. |
Hi, any news on this PR? |
Hi Adrian, sorry I didn't have time to work on this. |
No need for that. We wait for you. |
See https://prometheus.io/ for project information.
I added #defines and switched from printing floats to printing unsigned integers. I would like to access the Energy struct, but I can't because it is defined in a later .ino file. |
Don't change any core items. Energy is conditional anyway so it might not veen be there in some compiles. I'll scan over your implementation and see how it currently integrates. |
Add optional support for Prometheus using file xsns_91_prometheus.ino (#7216)
Implemented basic prometheus support using single file xsns_91_prometheus.ino As long as define USE_PROMETHEUS is disabled nothing is reported. |
Prometheus can't fetch metrics with error My current metrics:
And it will be nice to add prefix "tasmota_" to all metric names |
gauge, not guage for active_power? |
Fix typo in gauge metric type (#7216)
Description:
See https://prometheus.io/ for project information.
Checklist: