Compare commits
2 commits
c770df59f7
...
b3c96687c3
Author | SHA1 | Date | |
---|---|---|---|
b3c96687c3 | |||
118c050be9 |
7 changed files with 49 additions and 41 deletions
|
@ -70,46 +70,6 @@ services:
|
|||
- "traefik.docker.network=web"
|
||||
- "docker.group=monitoring"
|
||||
|
||||
|
||||
##################################################################
|
||||
# here starts data collection
|
||||
|
||||
telegraf_host:
|
||||
image: telegraf:1.18
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- HOST_MOUNT_PREFIX=/hostfs
|
||||
- HOST_PROC=/hostfs/proc
|
||||
- HOST_SYS=/hostfs/sys
|
||||
- HOST_ETC=/hostfs/etc
|
||||
- HOST_VAR=/hostfs/var
|
||||
- HOST_RUN=/hostfs/run
|
||||
volumes:
|
||||
- ./telegraf/telegraf_host.conf:/etc/telegraf/telegraf.conf:ro
|
||||
- /var/run/utmp:/var/run/utmp:ro
|
||||
- /:/hostfs:ro
|
||||
network_mode: "host"
|
||||
labels:
|
||||
- "docker.group=monitoring"
|
||||
depends_on:
|
||||
- influxdb
|
||||
|
||||
|
||||
telegraf_net:
|
||||
image: telegraf:1.18
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./telegraf/telegraf_net.conf:/etc/telegraf/telegraf.conf:ro
|
||||
networks:
|
||||
- monitoring
|
||||
- dockersocket
|
||||
labels:
|
||||
- "docker.group=monitoring"
|
||||
depends_on:
|
||||
- influxdb
|
||||
dns:
|
||||
- 192.168.16.5
|
||||
|
||||
networks:
|
||||
monitoring:
|
||||
web:
|
||||
|
|
|
@ -44,7 +44,7 @@ services:
|
|||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.whoami.rule=Host(`whoami.${DOMAIN}`)"
|
||||
- "traefik.http.routers.whoami.rule=Host(`whoami.${HOSTNAME}`)"
|
||||
- "traefik.http.routers.whoami.entrypoints=web"
|
||||
- "traefik.http.services.whoami.loadbalancer.server.port=80"
|
||||
- "docker.group=proxy"
|
||||
|
|
36
telegraf/docker-compose.yaml
Normal file
36
telegraf/docker-compose.yaml
Normal file
|
@ -0,0 +1,36 @@
|
|||
version: "3.3"
|
||||
services:
|
||||
|
||||
host:
|
||||
image: telegraf:1.18
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- HOST_MOUNT_PREFIX=/hostfs
|
||||
- HOST_PROC=/hostfs/proc
|
||||
- HOST_SYS=/hostfs/sys
|
||||
- HOST_ETC=/hostfs/etc
|
||||
- HOST_VAR=/hostfs/var
|
||||
- HOST_RUN=/hostfs/run
|
||||
volumes:
|
||||
- ./telegraf_host.conf:/etc/telegraf/telegraf.conf:ro
|
||||
- /var/run/utmp:/var/run/utmp:ro
|
||||
- /:/hostfs:ro
|
||||
network_mode: "host"
|
||||
labels:
|
||||
- "docker.group=telegraf"
|
||||
|
||||
net:
|
||||
image: telegraf:1.18
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./telegraf_net.conf:/etc/telegraf/telegraf.conf:ro
|
||||
networks:
|
||||
- dockersocket
|
||||
labels:
|
||||
- "docker.group=telegraf"
|
||||
dns:
|
||||
- ${LOCAL_DNS_SERVER}
|
||||
|
||||
networks:
|
||||
dockersocket:
|
||||
external: true
|
12
telegraf/influxdb.conf
Normal file
12
telegraf/influxdb.conf
Normal file
|
@ -0,0 +1,12 @@
|
|||
[meta]
|
||||
dir = "/var/lib/influxdb/meta"
|
||||
|
||||
[data]
|
||||
dir = "/var/lib/influxdb/data"
|
||||
wal-dir = "/var/lib/influxdb/wal"
|
||||
max-concurrent-compactions = 1
|
||||
|
||||
[monitor]
|
||||
store-enabled = false
|
||||
store-database = "_internal"
|
||||
store-interval = "10s"
|
Loading…
Reference in a new issue