iac/docker/grafana/docker-compose.yml

218 lines
5.3 KiB
YAML
Raw Normal View History

2024-10-13 22:09:56 -04:00
services:
prometheus:
image: prom/prometheus:v2.54.1
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: unless-stopped
volumes:
- /docker/appdata/prometheus:/etc/prometheus
- prom_data:/prometheus
2024-10-14 22:21:35 -04:00
networks:
- grafana
2024-10-13 22:09:56 -04:00
grafana:
image: grafana/grafana:11.2.2
container_name: grafana
ports:
- 3000:3000
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=mafyuh
- GF_SECURITY_ADMIN_PASSWORD=$GF_SECURITY_ADMIN_PASSWORD
2024-10-20 00:34:55 -04:00
- GF_AUTH_GENERIC_OAUTH_ENABLED=true
- GF_AUTH_GENERIC_OAUTH_NAME=authentik
- GF_AUTH_GENERIC_OAUTH_CLIENT_ID=$GF_AUTH_GENERIC_OAUTH_CLIENT_ID
- GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET=$GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET
- GF_AUTH_GENERIC_OAUTH_SCOPES="openid profile email"
- GF_AUTH_GENERIC_OAUTH_AUTH_URL=$AUTHENTIK_URL/application/o/authorize/
- GF_AUTH_GENERIC_OAUTH_TOKEN_URL=$AUTHENTIK_URL/application/o/token/
- GF_AUTH_GENERIC_OAUTH_API_URL=$AUTHENTIK_URL/application/o/userinfo/
- GF_AUTH_SIGNOUT_REDIRECT_URL=$AUTHENTIK_URL/application/o/grafana/end-session/
- GF_AUTH_OAUTH_AUTO_LOGIN=true
2024-10-20 00:41:11 -04:00
- GF_SERVER_ROOT_URL=$GF_SERVER_ROOT_URL
2024-10-14 22:26:22 -04:00
user: "1000"
2024-10-13 22:09:56 -04:00
volumes:
2024-10-14 22:24:05 -04:00
- /docker/appdata/grafana:/var/lib/grafana
2024-10-14 22:21:35 -04:00
networks:
- grafana
2024-10-13 22:09:56 -04:00
2024-10-14 22:11:29 -04:00
loki:
image: grafana/loki:3.2.1
2024-10-14 22:11:29 -04:00
container_name: loki
volumes:
- /docker/appdata/loki:/etc/loki
ports:
- "3100:3100"
restart: unless-stopped
command: -config.file=/etc/loki/loki-config.yml
2024-10-14 22:21:35 -04:00
networks:
- grafana
2024-10-14 22:11:29 -04:00
promtail:
image: grafana/promtail:3.2.1
2024-10-14 22:11:29 -04:00
container_name: promtail
volumes:
- /var/log:/var/log
- /docker/appdata/promtail:/etc/promtail
restart: unless-stopped
command: -config.file=/etc/promtail/promtail-config.yml
2024-10-14 22:21:35 -04:00
networks:
- grafana
2024-10-14 22:11:29 -04:00
2024-10-17 00:07:25 -04:00
alertmanager:
image: prom/alertmanager:v0.27.0
restart: unless-stopped
volumes:
- /docker/appdata/alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml
ports:
- 9093:9093
networks:
- grafana
## Exporters
2024-10-14 01:00:11 -04:00
snmp-exporter:
image: prom/snmp-exporter:v0.26.0
2024-10-15 12:26:54 -04:00
container_name: snmp-exporter
2024-10-14 01:00:11 -04:00
volumes:
2024-10-14 01:01:45 -04:00
- /docker/appdata/snmp:/etc/snmp_exporter
command: --config.file=/etc/snmp-exporter/snmp.yml
2024-10-14 22:21:35 -04:00
networks:
- grafana
2024-10-14 01:00:11 -04:00
2024-10-13 22:50:36 -04:00
node_exporter:
image: quay.io/prometheus/node-exporter:v1.8.2
container_name: node_exporter
command: "--path.rootfs=/host"
pid: host
restart: unless-stopped
volumes:
- /:/host:ro,rslave
2024-10-14 22:21:35 -04:00
networks:
- grafana
2024-10-13 22:50:36 -04:00
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.50.0
2024-10-13 22:50:36 -04:00
container_name: cadvisor
volumes:
- /:/rootfs:ro
- /run:/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
devices:
- /dev/kmsg
privileged: true
restart: unless-stopped
2024-10-14 22:21:35 -04:00
networks:
- grafana
2024-10-13 22:50:36 -04:00
2024-10-14 00:20:02 -04:00
sonarr-exporter:
image: ghcr.io/onedr0p/exportarr:v2.0
container_name: sonarr-exporter
command: ["sonarr"]
environment:
PORT: 9707
URL: $SONARR_URL
APIKEY: $SONARR_API
ports:
- "9707:9707"
restart: unless-stopped
2024-10-15 12:30:40 -04:00
networks:
- grafana
2024-10-14 00:20:02 -04:00
radarr-exporter:
image: ghcr.io/onedr0p/exportarr:v2.0
container_name: radarr-exporter
command: ["radarr"]
environment:
PORT: 9708
URL: $RADARR_URL
APIKEY: $RADARR_API
ports:
- "9708:9708"
restart: unless-stopped
2024-10-15 12:30:40 -04:00
networks:
- grafana
2024-10-14 00:20:02 -04:00
prowlarr-exporter:
image: ghcr.io/onedr0p/exportarr:v2.0
container_name: prowlarr-exporter
command: ["prowlarr"]
environment:
PORT: 9710
URL: $PROWLARR_URL
APIKEY: $PROWLARR_API
PROWLARR__BACKFILL: true
ports:
- "9710:9710"
restart: unless-stopped
2024-10-15 12:30:40 -04:00
networks:
- grafana
2024-10-14 00:20:02 -04:00
sabnzbd-exporter:
image: ghcr.io/onedr0p/exportarr:v2.0
container_name: sabnzbd-exporter
command: ["sabnzbd"]
environment:
PORT: 9711
URL: $SAB_URL
APIKEY: $SAB_API
ports:
- "9711:9711"
restart: unless-stopped
2024-10-15 12:30:40 -04:00
networks:
- grafana
2024-10-14 00:20:02 -04:00
bazarr-exporter:
image: ghcr.io/onedr0p/exportarr:v2.0
container_name: bazarr-exporter
command: ["bazarr"]
environment:
PORT: 9712
URL: $BAZARR_URL
APIKEY: $BAZARR_API
ports:
- "9712:9712"
restart: unless-stopped
2024-10-15 12:30:40 -04:00
networks:
- grafana
2024-10-14 00:20:02 -04:00
2024-10-17 00:07:25 -04:00
speedtest-exporter:
image: ghcr.io/miguelndecarvalho/speedtest-exporter:v3.5.4
container_name: speedtest-exporter
ports:
- 9798:9798
restart: unless-stopped
networks:
- grafana
2024-10-19 21:12:25 -04:00
blackbox-exporter:
2024-10-19 21:16:27 -04:00
command: --config.file=/config/blackbox.yml
container_name: blackbox-exporter
image: quay.io/prometheus/blackbox-exporter:v0.25.0
volumes:
- /docker/appdata/blackbox/config:/config
ports:
- 9115:9115
2024-10-19 21:32:11 -04:00
networks:
- grafana
2024-10-19 21:12:25 -04:00
2024-10-19 23:31:55 -04:00
graphite-exporter:
command: --graphite.mapping-config=/tmp/graphite_mapping.conf
image: prom/graphite-exporter
container_name: graphite-exporter
volumes:
- /docker/appdata/graphite-exporter/graphite_mapping.conf:/tmp/graphite_mapping.conf
ports:
- 9109:9109/udp
- 9109:9109
- 9108:9108
networks:
- grafana
2024-10-14 22:21:35 -04:00
networks:
grafana:
2024-10-13 22:09:56 -04:00
volumes:
prom_data: