This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
shoarma/ansible/roles/prometheus/docker-stack.yml.j2
2023-07-23 15:27:31 +02:00

81 lines
2.8 KiB
Django/Jinja

# vi: ft=yaml
version: "3"
networks:
traefik:
external: true
volumes:
data:
driver_opts:
type: "nfs"
o: "addr=192.168.30.10,nolock,soft,rw"
device: ":/mnt/data/prometheus/data"
services:
prometheus:
image: quay.io/prometheus/prometheus
networks:
- traefik
volumes:
- type: volume
source: data
target: /prometheus
volume:
nocopy: true
command:
- '--alertmanager.notification-queue-capacity=10000'
- '--alertmanager.timeout='
- '--config.file=/etc/prometheus/prometheus.yml'
- '--enable-feature='
- '--log.format=logfmt'
- '--log.level=info'
- '--query.lookback-delta=5m'
- '--query.max-concurrency=20'
- '--query.max-samples=50000000'
- '--query.timeout=2m'
- '--rules.alert.for-grace-period=10m'
- '--rules.alert.for-outage-tolerance=1h'
- '--rules.alert.resend-delay=1m'
- '--scrape.adjust-timestamps'
- '--scrape.discovery-reload-interval=5s'
- '--scrape.timestamp-tolerance=2ms'
- '--storage.remote.flush-deadline=1m'
- '--storage.remote.read-concurrent-limit=10'
- '--storage.remote.read-max-bytes-in-frame=1048576'
- '--storage.remote.read-sample-limit=50000000'
- '--storage.tsdb.allow-overlapping-blocks'
- '--storage.tsdb.head-chunks-write-queue-size=0'
- '--storage.tsdb.max-block-chunk-segment-size=0B'
- '--storage.tsdb.max-block-duration=1d12h'
- '--storage.tsdb.min-block-duration=2h'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention=0s'
- '--storage.tsdb.retention.size=0B'
- '--storage.tsdb.retention.time=0s'
- '--storage.tsdb.samples-per-chunk=120'
- '--storage.tsdb.wal-compression'
- '--storage.tsdb.wal-segment-size=0B'
- '--web.config.file='
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--web.cors.origin=.*'
- '--web.enable-remote-write-receiver'
- '--web.external-url='
- '--web.listen-address=0.0.0.0:9090'
- '--web.max-connections=512'
- '--web.page-title=Prometheus Time Series Collection and Processing Server'
- '--web.read-timeout=5m'
- '--web.route-prefix=/'
- '--web.user-assets='
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.prometheus.entrypoints=localsecure
- traefik.http.routers.prometheus.rule=Host(`metrics.kun.is`)
- traefik.http.routers.prometheus.tls=true
- traefik.http.routers.prometheus.tls.certresolver=letsencrypt
- traefik.http.routers.prometheus.service=prometheus
- traefik.http.services.prometheus.loadbalancer.server.port=9090
- traefik.docker.network=traefik