master
greglebreton 2 years ago
parent fc92d0cd67
commit edf4f15d7c
  1. 8
      docker-compose-telegraf-agent.yml
  2. 24
      docker-compose.yml

@ -19,11 +19,7 @@ services:
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux
- /cgroup:/cgroup:ro
restart: unless-stopped
ports:
- "8080:8080"
# networks:
# - monitor-net
# labels:
# org.label-schema.group: "monitoring"
- '8080:8080'

@ -1,7 +1,7 @@
version: '3.6'
services:
# store datas in DB
influxdb:
image: influxdb:1.8-alpine
container_name: influxdb
@ -13,6 +13,7 @@ services:
- influxdb_data:/var/lib/influxdb
- ./influxdb/imports:/imports
# Dashboard
grafana:
image: grafana/grafana:8.0.2
container_name: grafana
@ -29,6 +30,7 @@ services:
- ./grafana/provisioning/:/etc/grafana/provisioning/
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
# host metrics
telegraf:
image: telegraf:1.18-alpine
# image: telegraf:latest #(for amd64)
@ -43,6 +45,21 @@ services:
ports:
- '8125:8125/udp'
# containers metrics
cadvisor:
image: gcr.io/cadvisor/cadvisor
# + image arm64
container_name: cadvisor
restart: unless-stopped
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
- /cgroup:/cgroup:ro
ports:
- '8080:8080'
# gather metrics and launch alerts
prometheus:
image: prom/prometheus:v2.17.1
container_name: prometheus
@ -58,8 +75,9 @@ services:
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
ports:
- "9090:9090"
- '9090:9090'
# alert manager!
alertmanager:
image: prom/alertmanager:v0.20.0
container_name: alertmanager
@ -70,7 +88,7 @@ services:
- '--config.file=/etc/alertmanager/alertmanager.yml'
- '--storage.path=/alertmanager'
ports:
- "9093:9093"
- '9093:9093'
pushgateway:
image: prom/pushgateway:v1.2.0

Loading…
Cancel
Save