Add Assignment 7 monitoring, tested alerts, and incident evidence
This commit is contained in:
parent
131d605c5e
commit
6605394d7a
@@ -0,0 +1,79 @@
|
||||
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
|
||||
Reference in New Issue
Block a user