Initialize observability stack with local monitoring and server134 deployment
This commit is contained in:
@@ -0,0 +1,153 @@
|
||||
name: observability
|
||||
|
||||
services:
|
||||
victoriametrics:
|
||||
image: victoriametrics/victoria-metrics:${VM_VERSION}
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- -storageDataPath=/storage
|
||||
- -retentionPeriod=${VM_RETENTION:-400d}
|
||||
- -httpListenAddr=:8428
|
||||
ports:
|
||||
- "${INGEST_BIND_IP}:8428:8428"
|
||||
volumes:
|
||||
- ./data/victoriametrics:/storage
|
||||
networks: [observability]
|
||||
mem_limit: 1536m
|
||||
cpus: 1.0
|
||||
security_opt: [no-new-privileges:true]
|
||||
|
||||
victorialogs:
|
||||
image: victoriametrics/victoria-logs:${VL_VERSION}
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- -storageDataPath=/storage
|
||||
- -retentionPeriod=${VL_RETENTION:-30d}
|
||||
- -httpListenAddr=:9428
|
||||
ports:
|
||||
- "${INGEST_BIND_IP}:9428:9428"
|
||||
volumes:
|
||||
- ./data/victorialogs:/storage
|
||||
networks: [observability]
|
||||
mem_limit: 1024m
|
||||
cpus: 0.75
|
||||
security_opt: [no-new-privileges:true]
|
||||
|
||||
tempo:
|
||||
image: grafana/tempo:${TEMPO_VERSION}
|
||||
restart: unless-stopped
|
||||
command: [-config.file=/etc/tempo/tempo.yml]
|
||||
ports:
|
||||
- "${DEBUG_BIND_IP}:3200:3200"
|
||||
- "${INGEST_BIND_IP}:4317:4317"
|
||||
- "${INGEST_BIND_IP}:4318:4318"
|
||||
volumes:
|
||||
- ./config/tempo/tempo.yml:/etc/tempo/tempo.yml:ro
|
||||
- ./data/tempo:/var/tempo
|
||||
networks: [observability]
|
||||
mem_limit: 1024m
|
||||
cpus: 0.75
|
||||
security_opt: [no-new-privileges:true]
|
||||
|
||||
alertmanager:
|
||||
image: prom/alertmanager:${ALERTMANAGER_VERSION}
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- --config.file=/etc/alertmanager/alertmanager.yml
|
||||
- --storage.path=/alertmanager
|
||||
- --web.listen-address=:9093
|
||||
ports:
|
||||
- "${UI_BIND_IP}:9093:9093"
|
||||
volumes:
|
||||
- ./config/alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro
|
||||
- ./data/alertmanager:/alertmanager
|
||||
networks: [observability]
|
||||
mem_limit: 256m
|
||||
cpus: 0.25
|
||||
security_opt: [no-new-privileges:true]
|
||||
|
||||
vmalert:
|
||||
image: victoriametrics/vmalert:${VM_VERSION}
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- -datasource.url=http://victoriametrics:8428
|
||||
- -remoteRead.url=http://victoriametrics:8428
|
||||
- -remoteWrite.url=http://victoriametrics:8428
|
||||
- -notifier.url=http://alertmanager:9093
|
||||
- -rule=/etc/vmalert/*.yml
|
||||
- -httpListenAddr=:8880
|
||||
ports:
|
||||
- "${DEBUG_BIND_IP}:8880:8880"
|
||||
volumes:
|
||||
- ./config/vmalert:/etc/vmalert:ro
|
||||
depends_on: [victoriametrics, alertmanager]
|
||||
networks: [observability]
|
||||
mem_limit: 256m
|
||||
cpus: 0.25
|
||||
security_opt: [no-new-privileges:true]
|
||||
|
||||
node-exporter:
|
||||
image: prom/node-exporter:${NODE_EXPORTER_VERSION}
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- --path.procfs=/host/proc
|
||||
- --path.sysfs=/host/sys
|
||||
- --path.rootfs=/rootfs
|
||||
- --collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)
|
||||
pid: host
|
||||
ports:
|
||||
- "${DEBUG_BIND_IP}:9100:9100"
|
||||
volumes:
|
||||
- /proc:/host/proc:ro
|
||||
- /sys:/host/sys:ro
|
||||
- /:/rootfs:ro,rslave
|
||||
networks: [observability]
|
||||
mem_limit: 128m
|
||||
cpus: 0.20
|
||||
security_opt: [no-new-privileges:true]
|
||||
|
||||
vmagent:
|
||||
image: victoriametrics/vmagent:${VM_VERSION}
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- -promscrape.config=/etc/vmagent/prometheus.yml
|
||||
- -remoteWrite.url=http://victoriametrics:8428/api/v1/write
|
||||
- -remoteWrite.tmpDataPath=/buffer
|
||||
- -httpListenAddr=:8429
|
||||
ports:
|
||||
- "${DEBUG_BIND_IP}:8429:8429"
|
||||
volumes:
|
||||
- ${VMAGENT_CONFIG:-./config/vmagent/prometheus.yml}:/etc/vmagent/prometheus.yml:ro
|
||||
- ./data/vmagent:/buffer
|
||||
depends_on: [victoriametrics, node-exporter]
|
||||
networks: [observability]
|
||||
mem_limit: 384m
|
||||
cpus: 0.35
|
||||
security_opt: [no-new-privileges:true]
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:${GRAFANA_VERSION}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER}
|
||||
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD}
|
||||
GF_USERS_ALLOW_SIGN_UP: "false"
|
||||
GF_AUTH_ANONYMOUS_ENABLED: "false"
|
||||
GF_PLUGINS_PREINSTALL_SYNC: victoriametrics-logs-datasource@0.32.0
|
||||
GF_PLUGINS_PREINSTALL_AUTO_UPDATE: "false"
|
||||
GF_METRICS_ENABLED: "true"
|
||||
ports:
|
||||
- "${UI_BIND_IP}:${GRAFANA_PORT:-3000}:3000"
|
||||
volumes:
|
||||
- ./config/grafana/provisioning:/etc/grafana/provisioning:ro
|
||||
- ./config/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
||||
- ./data/grafana:/var/lib/grafana
|
||||
depends_on: [victoriametrics, victorialogs, tempo]
|
||||
networks: [observability]
|
||||
mem_limit: 768m
|
||||
cpus: 0.50
|
||||
security_opt: [no-new-privileges:true]
|
||||
|
||||
networks:
|
||||
observability:
|
||||
name: observability
|
||||
Reference in New Issue
Block a user