Files
Codex (authorized Assignment 5 implementation) 6605394d7a
myfileagent-python-ci/pipeline/head This commit looks good
myfileagent-python-ci/pipeline/pr-main This commit looks good
Add Assignment 7 monitoring, tested alerts, and incident evidence
2026-10-28 17:51:31 +00:00

80 lines
2.2 KiB
YAML

name: myfileagent-monitoring
services:
prometheus:
image: prom/prometheus:v3.15.1
restart: unless-stopped
mem_limit: 160m
memswap_limit: 160m
cpus: 0.35
pids_limit: 128
environment:
GOMEMLIMIT: 120MiB
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=7d
- --storage.tsdb.retention.size=512MB
- --query.max-concurrency=2
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
networks: [monitoring]
grafana:
image: grafana/grafana:13.2.4
restart: unless-stopped
cpus: 0.35
pids_limit: 128
environment:
GF_SERVER_ROOT_URL: https://metrics.myfileagent.tech
GF_AUTH_ANONYMOUS_ENABLED: "false"
GF_USERS_ALLOW_SIGN_UP: "false"
GF_SECURITY_ADMIN_PASSWORD__FILE: /run/secrets/grafana_admin_password
GF_ANALYTICS_REPORTING_ENABLED: "false"
GF_ANALYTICS_CHECK_FOR_UPDATES: "false"
secrets: [grafana_admin_password]
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning:ro
networks: [monitoring, proxy]
node-exporter:
image: quay.io/prometheus/node-exporter:v1.12.1
restart: unless-stopped
mem_limit: 32m
memswap_limit: 32m
cpus: 0.15
pids_limit: 64
pid: host
command:
- --path.rootfs=/host
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --collector.disable-defaults
- --collector.cpu
- --collector.meminfo
- --collector.filesystem
volumes:
- /:/host:ro,rslave
networks: [monitoring]
blackbox-exporter:
image: quay.io/prometheus/blackbox-exporter:v0.29.1
restart: unless-stopped
mem_limit: 32m
memswap_limit: 32m
cpus: 0.15
pids_limit: 64
command: [--config.file=/config/blackbox.yml]
volumes:
- ./blackbox/blackbox.yml:/config/blackbox.yml:ro
networks: [monitoring]
networks:
monitoring:
proxy:
external: true
name: myfileagent-gitea_gitea-private
volumes:
prometheus_data:
grafana_data:
secrets:
grafana_admin_password:
file: /home/codex/myfileagent-gitea/secrets/grafana-admin-password