264 lines
6.8 KiB
YAML
264 lines
6.8 KiB
YAML
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"
|
|
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.middlewares=authelia@file
|
|
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: monitoring_prometheus
|
|
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"
|
|
keep-file: "true"
|
|
networks:
|
|
- monitoring
|
|
- web
|
|
ports:
|
|
- 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@file
|
|
|
|
loki:
|
|
image: grafana/loki:2.5.0
|
|
container_name: monitoring_loki
|
|
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"
|
|
keep-file: "true"
|
|
networks:
|
|
- monitoring
|
|
- web
|
|
ports:
|
|
- "3100:3100"
|
|
volumes:
|
|
- ${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
|
|
|
|
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
|
|
|
|
exporter-pihole:
|
|
image: ekofr/pihole-exporter:latest
|
|
container_name: monitoring_exporter-pihole
|
|
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
|
|
env_file:
|
|
- exporter-pihole.env
|
|
labels:
|
|
- traefik.enable=false
|
|
|
|
exporter-minecraft:
|
|
image: itzg/mc-monitor # https://github.com/itzg/mc-monitor
|
|
container_name: monitoring_exporter-minecraft
|
|
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"
|
|
command: export-for-prometheus
|
|
restart: "no"
|
|
networks:
|
|
- monitoring
|
|
- mc-router
|
|
env_file:
|
|
- exporter-minecraft.env
|
|
labels:
|
|
- traefik.enable=false
|
|
|
|
exporter-plex:
|
|
image: granra/plex_exporter
|
|
container_name: monitoring_exporter-plex
|
|
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
|
|
command:
|
|
- "--plex-server=https://plex.jafner.net"
|
|
- "--token=suirW-a-z6SpqUAJjjDj"
|
|
- "--auto-discover"
|
|
labels:
|
|
- traefik.enable=false
|
|
|
|
exporter-sabnzbd:
|
|
image: msroest/sabnzbd_exporter # https://github.com/msroest/sabnzbd_exporter
|
|
container_name: monitoring_exporter-sabnzbd
|
|
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
|
|
env_file:
|
|
- exporter-sabnzbd.env
|
|
- exporter-sabnzbd_secrets.env
|
|
|
|
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:
|
|
- ./exporter-ping/config.yml:/config/config.yml
|
|
|
|
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
|
|
labels:
|
|
- traefik.enable=false
|
|
|
|
exporter-qbittorrent:
|
|
image: esanchezm/prometheus-qbittorrent-exporter
|
|
container_name: monitoring_exporter-qbittorrent
|
|
env_file:
|
|
- exporter-qbittorrent.env
|
|
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
|
|
- web
|
|
labels:
|
|
- traefik.enable=false
|
|
|
|
exporter-nvidia:
|
|
image: mindprince/nvidia_gpu_prometheus_exporter:0.1
|
|
container_name: monitoring_exporter-nvidia
|
|
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"
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
restart: "no"
|
|
networks:
|
|
- monitoring
|
|
labels:
|
|
- traefik.enable=false
|
|
|
|
networks:
|
|
monitoring:
|
|
external: true
|
|
web:
|
|
external: true
|
|
mc-router:
|
|
external: true |