Sanitized mirror from private repository - 2026-04-20 01:32:01 UTC
This commit is contained in:
151
hosts/synology/calypso/prometheus.yml
Normal file
151
hosts/synology/calypso/prometheus.yml
Normal file
@@ -0,0 +1,151 @@
|
||||
# Prometheus - Metrics database
|
||||
# Port: 9090
|
||||
# Time-series metrics and alerting
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
command:
|
||||
- '--storage.tsdb.retention.time=60d'
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
container_name: Prometheus
|
||||
hostname: prometheus-docker
|
||||
networks:
|
||||
- prometheus-net
|
||||
mem_limit: 1g
|
||||
cpu_shares: 768
|
||||
security_opt:
|
||||
- no-new-privileges=true
|
||||
user: 1026:100
|
||||
healthcheck:
|
||||
test: wget --no-verbose --tries=1 --spider http://localhost:9090/ || exit 1
|
||||
ports:
|
||||
- 12090:9090
|
||||
volumes:
|
||||
- /volume1/docker/prometheus/prometheus:/prometheus:rw
|
||||
- /volume1/docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
restart: on-failure:5
|
||||
|
||||
node-exporter:
|
||||
image: prom/node-exporter:latest
|
||||
command:
|
||||
- --collector.disable-defaults
|
||||
- --collector.stat
|
||||
- --collector.time
|
||||
- --collector.cpu
|
||||
- --collector.loadavg
|
||||
- --collector.hwmon
|
||||
- --collector.meminfo
|
||||
- --collector.diskstats
|
||||
container_name: Prometheus-Node
|
||||
hostname: prometheus-node
|
||||
networks:
|
||||
- prometheus-net
|
||||
mem_limit: 256m
|
||||
mem_reservation: 64m
|
||||
cpu_shares: 512
|
||||
security_opt:
|
||||
- no-new-privileges=true
|
||||
read_only: true
|
||||
user: 1026:100
|
||||
healthcheck:
|
||||
test: wget --no-verbose --tries=1 --spider http://localhost:9100/
|
||||
restart: on-failure:5
|
||||
|
||||
snmp-exporter:
|
||||
image: prom/snmp-exporter:latest
|
||||
command:
|
||||
- "--config.file=/etc/snmp_exporter/snmp.yml"
|
||||
container_name: Prometheus-SNMP
|
||||
hostname: prometheus-snmp
|
||||
networks:
|
||||
- prometheus-net
|
||||
mem_limit: 256m
|
||||
mem_reservation: 64m
|
||||
cpu_shares: 512
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
read_only: true
|
||||
user: 1026:100
|
||||
healthcheck:
|
||||
test: wget --no-verbose --tries=1 --spider http://localhost:9116/ || exit 1
|
||||
volumes:
|
||||
- /volume1/docker/prometheus/snmp:/etc/snmp_exporter/:ro
|
||||
restart: on-failure:5
|
||||
|
||||
cadvisor:
|
||||
image: gcr.io/cadvisor/cadvisor:latest
|
||||
command:
|
||||
- '--docker_only=true'
|
||||
container_name: Prometheus-cAdvisor
|
||||
hostname: prometheus-cadvisor
|
||||
networks:
|
||||
- prometheus-net
|
||||
mem_limit: 256m
|
||||
mem_reservation: 64m
|
||||
cpu_shares: 512
|
||||
security_opt:
|
||||
- no-new-privileges=true
|
||||
read_only: true
|
||||
volumes:
|
||||
- /:/rootfs:ro
|
||||
- /var/run:/var/run:ro
|
||||
- /sys:/sys:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
restart: on-failure:5
|
||||
|
||||
blackbox-exporter:
|
||||
image: prom/blackbox-exporter
|
||||
container_name: blackbox-exporter
|
||||
networks:
|
||||
- prometheus-net
|
||||
ports:
|
||||
- 9115:9115
|
||||
restart: unless-stopped
|
||||
|
||||
speedtest-exporter:
|
||||
image: miguelndecarvalho/speedtest-exporter
|
||||
container_name: speedtest-exporter
|
||||
networks:
|
||||
- prometheus-net
|
||||
ports:
|
||||
- 9798:9798
|
||||
restart: unless-stopped
|
||||
|
||||
watchtower:
|
||||
image: containrrr/watchtower:latest
|
||||
container_name: WATCHTOWER
|
||||
hostname: watchtower
|
||||
networks:
|
||||
- prometheus-net
|
||||
mem_limit: 128m
|
||||
mem_reservation: 50m
|
||||
cpu_shares: 256
|
||||
security_opt:
|
||||
- no-new-privileges=true
|
||||
read_only: true
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
TZ: America/Los_Angeles
|
||||
WATCHTOWER_CLEANUP: true
|
||||
WATCHTOWER_REMOVE_VOLUMES: false
|
||||
DOCKER_API_VERSION: 1.43
|
||||
WATCHTOWER_INCLUDE_RESTARTING: true
|
||||
WATCHTOWER_INCLUDE_STOPPED: false
|
||||
WATCHTOWER_SCHEDULE: "0 0 */2 * * *"
|
||||
WATCHTOWER_LABEL_ENABLE: false
|
||||
WATCHTOWER_ROLLING_RESTART: true
|
||||
WATCHTOWER_TIMEOUT: 30s
|
||||
WATCHTOWER_HTTP_API_METRICS: true
|
||||
WATCHTOWER_HTTP_API_TOKEN: ${WATCHTOWER_HTTP_API_TOKEN}
|
||||
restart: on-failure:5
|
||||
|
||||
networks:
|
||||
prometheus-net:
|
||||
name: prometheus-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.51.0/24
|
||||
Reference in New Issue
Block a user