Add Prometeus Monitoring
This commit is contained in:
parent
19bd12f765
commit
5d1f750b59
4 changed files with 72 additions and 18 deletions
|
@ -6,6 +6,7 @@ services:
|
|||
networks:
|
||||
- web
|
||||
- grafana
|
||||
- monitoring
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.grafana.rule=Host(`monitoring.${DOMAIN}`)"
|
||||
|
@ -29,7 +30,7 @@ services:
|
|||
- GF_DATABASE_NAME=grafana
|
||||
- GF_DATABASE_USER=${POSTGRES_USER}
|
||||
- GF_DATABASE_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- GF_INSTALL_PLUGINS=flant-statusmap-panel
|
||||
- GF_INSTALL_PLUGINS=flant-statusmap-panel,redis-datasource
|
||||
depends_on:
|
||||
- influxdb
|
||||
- grafanadb
|
||||
|
@ -55,6 +56,8 @@ services:
|
|||
restart: unless-stopped
|
||||
networks:
|
||||
- web
|
||||
- monitoring
|
||||
- grafana
|
||||
environment:
|
||||
- INFLUXDB_MONITOR_STORE_ENABLED=false
|
||||
volumes:
|
||||
|
@ -72,6 +75,19 @@ services:
|
|||
- "docker.group=monitoring"
|
||||
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- grafana
|
||||
- monitoring
|
||||
- web # also used to get traefik metrics
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- ${VOLUMES_PATH}/prometheus:/prometheus
|
||||
labels:
|
||||
- "docker.group=monitoring"
|
||||
|
||||
|
||||
##################################################################
|
||||
# here starts data collection
|
||||
|
@ -98,11 +114,10 @@ services:
|
|||
depends_on:
|
||||
- influxdb
|
||||
|
||||
|
||||
telegraf_net:
|
||||
image: telegraf:${TELEGRAF_VERSION}
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./.env # set environments into container
|
||||
volumes:
|
||||
- ./telegraf_net.conf:/etc/telegraf/telegraf.conf:ro
|
||||
networks:
|
||||
|
@ -113,6 +128,7 @@ services:
|
|||
depends_on:
|
||||
- influxdb
|
||||
|
||||
|
||||
networks:
|
||||
grafana:
|
||||
monitoring:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue