A simple express node project that exposes a /metrics
endpoint with temperature and humidity read from a DHT22 sensor connected to a Raspberry Pi. The project also comes with a Docker Compose stack containing the node project container, Prometheus and Grafana.
Prometheus is configured to scrape the /metrics
endpoint every 5 seconds. Grafana is also pre-configured with a default dashboard that displays the current temperature and humidity. Additionally, the dashboard also displays the temperature and humidity over the specified time range.
- Docker
- Docker-compose
- Clone the repository:
git clone https://github.com/saidghamra/dht22_pi.git
- Change directories:
cd dht22_pi
- Spin up the stack:
docker-compose up -d
- View the default Grafana dashboard by navigating to this URL