Let's monitor our #IoT Devices in #TheThingsNetwork ... With Prometheus and Grafana
In MQTT2Prometheus Config we specify the MQTT Server Settings for #TheThingsNetwork
https://github.com/lupyuen/prometheus-the-things-network/blob/main/ttn-mqtt.yaml
We'll ingest these Sensor Values from #TheThingsNetwork as #Prometheus Metrics
https://github.com/lupyuen/prometheus-the-things-network/blob/main/ttn-mqtt.yaml#L38-L65
MQTT2Prometheus works with #TheThingsNetwork because we have decoded our Message Payload with a Payload Formatter
Follow these steps to run MQTT2Prometheus and ingest #TheThingsNetwork Sensor Data as #Prometheus Metrics
Run "curl" to check the #Prometheus Metrics ingested by MQTT2Prometheus from #TheThingsNetwork
Now we configure #Prometheus to scrape the metrics from MQTT2Prometheus
https://github.com/lupyuen/prometheus-the-things-network#configure-prometheus
Every 15 seconds #Prometheus will scrape the metrics from MQTT2Prometheus (via HTTP)
https://github.com/lupyuen/prometheus-the-things-network#configure-prometheus
To check the scraped metrics in #Prometheus, browse to localhost:9090 and enter the Metric Name (t)
https://github.com/lupyuen/prometheus-the-things-network#configure-prometheus
We're ready to connect #Prometheus to #Grafana ... And render our metrics!
https://github.com/lupyuen/prometheus-the-things-network#configure-grafana
Head over to #Grafana and add a Data Source for #Prometheus (localhost:9090)
https://github.com/lupyuen/prometheus-the-things-network#configure-grafana
In #Grafana, add a Panel, set the Data Source to #Prometheus and enter the Metric Name (t)
https://github.com/lupyuen/prometheus-the-things-network#configure-grafana
#TheThingsNetwork Sensor Data appears in #Grafana Dashboard ... Thanks to #Prometheus! 🎉
https://github.com/lupyuen/prometheus-the-things-network#configure-grafana
For security, we should connect #Prometheus to #TheThingsNetwork MQTT with TLS Encryption ... Here's how
https://github.com/lupyuen/prometheus-the-things-network#mqtt-with-tls
In case of TLS Problems with #TheThingsNetwork MQTT ... Wireshark is our best friend!
https://github.com/lupyuen/prometheus-the-things-network#mqtt-with-tls
Monitoring our #IoT Devices connected to #TheThingsNetwork ... With #Prometheus and #Grafana ... All shall be explained in this article
Configuring a Payload Formatter for #TheThingsNetwork
https://lupyuen.github.io/articles/prometheus?3#payload-formatter
#Prometheus needs an MQTT Gateway to ingest Sensor Data from #TheThingsNetwork ... We'll use MQTT2Prometheus
https://github.com/hikhvar/mqtt2prometheus