fixed for updated telegraf

This commit is contained in:
John Lancaster
2024-02-24 15:50:56 -06:00
parent d6f377b5bf
commit fee154dbc5
3 changed files with 2 additions and 5 deletions

View File

@@ -24,7 +24,6 @@ Various tools to monitor Docker containers
| 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 |

View File

@@ -14,7 +14,7 @@ services:
image: telegraf
restart: unless-stopped
uts: host
user: root:${DOCKER_GUID}
user: telegraf:${DOCKER_GUID}
env_file:
- .env
volumes:
@@ -27,8 +27,6 @@ services:
uts: host
env_file:
- .env
environment:
- DOCKER_HOST=${HOSTNAME}
volumes:
- ./promtail:/etc/promtail
- /var/run/docker.sock:/var/run/docker.sock

View File

@@ -20,7 +20,7 @@ scrape_configs:
- source_labels: ['__meta_docker_container_log_stream']
target_label: 'logstream'
- target_label: 'host'
replacement: '${DOCKER_HOST}'
replacement: '${HOSTNAME}'
pipeline_stages:
- match:
selector: '{container="appdaemon"}'