This project is designed to be easy to integrate with prometheus.
For this it contains a metrics endpoint(/metrics on the web server) which contains the measurements as well as usage statistics for the web pages.
Alternatively there is also the prometheus pushgateway integration which makes this program push these metrics to a prometheus pushgateway instance to allow use in prometheus, but more about that in its own file.
This assumes you already have a running prometheus server.
- Make sure
ENABLE_PROMETHEUS_SCRAPE_SUPPORT
is set to 1 in config.h. - Build and flash this program again if it wasn't enabled before.
- Add something like the example below to your
prometheus.yml
configuration file in thescrape_configs
section. - Reload your prometheus config, for example by restarting prometheus.
Example prometheus.yml config section:
- job_name: esp-wifi-thermometer
static_configs:
- targets: ['ESP_IP:80']
Make sure to replace ESP_IP
with the ip address of your ESP.
This program writes the local IP address of the ESP to the Serial console on startup.
If you are using a prometheus on kubernetes (for example kube-prometheus or cluster-monitoring) you can use the kube prometheus integration instead.