Jafner.net/homelab/fighter/config/monitoring/docker-compose.yml

141 lines
3.8 KiB
YAML
Raw Normal View History

2022-02-08 17:00:27 -08:00
version: '3'
services:
grafana:
image: grafana/grafana-oss:latest
container_name: monitoring_grafana
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
2022-07-14 15:22:44 -07:00
keep-file: "true"
restart: "no"
networks:
- monitoring
- web
user: "0"
volumes:
- ${DOCKER_DATA}/grafana:/var/lib/grafana
- ./custom.ini:/etc/grafana/grafana.ini
labels:
- traefik.http.routers.grafana.rule=Host(`grafana.jafner.net`)
- traefik.http.routers.grafana.tls.certresolver=lets-encrypt
- traefik.http.routers.grafana.tls.options=tls12@file
- traefik.http.routers.grafana.middlewares=securityheaders@file
prometheus:
image: prom/prometheus:latest
container_name: monitoring_prometheus
2022-07-15 18:16:54 -07:00
user: 1000:1000
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
2022-07-14 15:22:44 -07:00
keep-file: "true"
networks:
- monitoring
- web
ports:
2022-07-15 18:27:29 -07:00
- 9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ${DOCKER_DATA}/prometheus:/prometheus
restart: "no"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
labels:
- traefik.http.routers.prometheus-monitoring.rule=Host(`prometheus.jafner.net`)
- traefik.http.routers.prometheus-monitoring.tls.certresolver=lets-encrypt
- traefik.http.routers.prometheus-monitoring.middlewares=traefik-forward-auth-privileged@file
loki:
image: grafana/loki:2.5.0
container_name: monitoring_loki
2022-07-15 00:02:56 -07:00
user: 1000:1000
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
2022-07-14 15:22:44 -07:00
keep-file: "true"
networks:
- monitoring
- web
ports:
- "3100:3100"
volumes:
2022-07-14 14:10:08 -07:00
- ${DOCKER_DATA}/loki-logs:/loki-logs
- ./loki-config.yml:/etc/loki/loki-config.yml # not sure if this works. If not, just edit the config within the data volume
restart: "no"
command: -config.file=/etc/loki/loki-config.yml
labels:
- traefik.http.routers.loki.rule=Host(`loki.jafner.net`)
- traefik.http.routers.loki.tls.certresolver=lets-encrypt
2022-07-07 23:12:57 -07:00
2022-08-08 15:41:03 -07:00
promtail:
image: grafana/promtail
container_name: monitoring_promtail
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
networks:
- monitoring
volumes:
- ./promtail-config.yml:/etc/promtail/promtail-config.yml
labels:
- traefik.enable=false
2022-08-08 15:41:03 -07:00
2022-08-01 19:07:26 -07:00
exporter-ping:
image: czerwonk/ping_exporter
container_name: monitoring_exporter-ping
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
restart: "no"
networks:
- monitoring
volumes:
2022-08-01 19:11:59 -07:00
- ./exporter-ping/config.yml:/config/config.yml
2022-08-07 14:46:51 -07:00
exporter-docker:
image: prometheusnet/docker_exporter
container_name: monitoring_exporter-docker
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
restart: "no"
networks:
- monitoring
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
2022-08-08 00:01:51 -07:00
labels:
- traefik.enable=false
2022-05-03 14:29:03 -07:00
2022-02-08 17:00:27 -08:00
networks:
monitoring:
external: true
web:
external: true