Skip to content

augmntd/pimon

Repository files navigation

Pi Monitor

Raspberry Pi monitoring stack with InfluxDB, Telegraf, and Grafana. Includes temperature-based GPIO control with heartbeat monitoring.

Architecture

flowchart LR
    RPI["Raspberry Pi"]
    TEL["Telegraf<br/>Metrics Agent"]
    INFLUX[("InfluxDB<br/>TSDB")]
    GRAF["Grafana<br/>Dashboard"]
    TEMP["Temperature<br/>Control"]
    GPIO["GPIO 24/23"]
    
    RPI --> TEL
    TEL --> INFLUX
    INFLUX --> GRAF
    RPI --> TEMP
    TEMP --> GPIO
    TEMP -.health check.-> GRAF
Loading

Stack

  • InfluxDB 2.7 - Time-series database
  • Telegraf 1.36 - Metrics collection agent
  • Grafana 12.3 - Visualization (Dashboard source)

Quick Start

# Start monitoring stack
docker compose up -d

# Install systemd services (optional)
sudo ./install-services.sh
sudo systemctl start pimon-docker.service
sudo systemctl start pimon-heartbeat.service

Access Grafana at http://<pi-ip>:3000 (admin/admin)

Temperature Control

python3 temperature_control.py \
  --threshold 40.0 \
  --pin 24 \
  --heartbeat-pin 23 \
  --grafana-url http://localhost:3000

GPIO 24 activates when CPU exceeds threshold. GPIO 23 provides heartbeat signal.

Configuration

Default credentials in docker-compose.yaml:

  • InfluxDB: admin/adminadmin
  • InfluxDB Token: my-super-secret-auth-token
  • Grafana: admin/admin

Change these for production use.

Services

# Status
sudo systemctl status pimon-docker.service
sudo systemctl status pimon-heartbeat.service

# Logs
sudo journalctl -u pimon-docker.service -f
sudo journalctl -u pimon-heartbeat.service -f

Releases

No releases published

Packages

No packages published