Add /metrics endpoint for prometheus #1063
Replies: 6 comments
-
no idea how to do this. is this something you can implement? or come up with a spec and a design on how it should be implemented? |
Beta Was this translation helpful? Give feedback.
-
its basically an additional endpoint with location /metrics and header Content-Type: text/plain; charset=utf-8 where the metrics, that are already accessible via mqtt are presented. Currently I am running mosquitto and an mqtt-exporter to generate this /metrics endpoint, but the desired implementation would reduce complexity in a vanilla prometheus grafana architecture. The metrics are then presented like this:
If u create a basic skeleton with at least one metric, I will try my best to implement the rest |
Beta Was this translation helpful? Give feedback.
-
can't you create a mapping in prometheus to read from the API? e.g. http://ems-esp.local/api/thermostat already exposes the data in JSON |
Beta Was this translation helpful? Give feedback.
-
good point. I can write an adapter that reads the api and exposes the /metrics. But the best part is no part :-) this feature request has, of cause, no priority. maybe I will dig into the code and try it by myself |
Beta Was this translation helpful? Give feedback.
-
@thegitarist I needed the same thing and gave it a go: https://github.com/poelstra/ems-esp-exporter Currently, it only polls the |
Beta Was this translation helpful? Give feedback.
-
thanks and nice implementation! I'm familiar with js, but ts with generics looks interesting. due to memory constraints on my rpi, I'll keep my current setup (mosquitto & mqtt-exporter = 16MB RAM) |
Beta Was this translation helpful? Give feedback.
-
Hello,
would be great to have an prometheus endpoint exposed (at default /metrics path) to easily add metrics to prometheus / grafana stack.
THNX & BR
Beta Was this translation helpful? Give feedback.
All reactions