eaec49927b072d2091c190a2062d33fe914e8c07
docker-observation
Various tools to monitor Docker containers
Services
Telegraf - Docker plugin
Telegraf is the open source server agent to help you collect metrics from your stacks, sensors, and systems.
Grafana Promtail
Promtail is an agent which ships the contents of local logs to a private Grafana Loki instance or Grafana Cloud. It is usually deployed to every machine that runs applications which need to be monitored.
Pipline Stages
- appdaemon
- labels
date.time,level,app, andmsg
- labels
- zigbee2mqtt
- labels
MQTT publish-deviceandpayload - categorizes
occupancyorcontact
- labels
Environment Variables
| Environment Variable | Description |
|---|---|
HOSTNAME |
Hostname for identifying log lines |
DOCKER_GUID |
Group ID number for the docker user group |
DOCKER_INFLUXDB_INIT_ORG |
Organization name for InfluxDB |
INFLUX_WRITE_TOKEN |
InfluxDB write token |
INFLUX_HOST |
Hostname or IP address of the InfluxDB instance |
LOKI_HOST |
Hostname or IP address of the Loki instance |
Setup
Set the DOCKER_GUID so the container has permission to access the socket. This ensures that the telegraf container will have read access on the Docker socket.
export DOCKER_GUID=$(getent group docker | awk -F ':' '{print $3}')
Description