Grafana + Promethues + Loki + Promtail
- IoT Device
- Obervability Server
- Grafana Promtail
./promtail-linux-arm --config.file=promtail-local-config.yaml
- Prometheus Node Exporter
./node_exporter --collector.systemd --collector.processes
Make sure to link the labels with the prometheus server configuration
host/promtail-local-config.yaml
scrape_configs:
- job_name: node
static_configs:
- targets:
- localhost
labels:
job: varlogs
iotProperty1: iotProperty1Value
__path__: /var/log/CTP*
-
Prometheus
-
config/prometheus-config.yml
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'node'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['<IoT Host IP>:9100']
labels:
iotProperty1: iotProperty1Value
docker-compose up -d
Open http://localhost:3000/
- Username: admin
- Password: admin
http://localhost:9090/
http://localhost:3100/