Стек мониторинга: Prometheus + Alertmanager + Grafana + node_exporter + cAdvisor
Самодостаточный docker compose стек с деплоем через deploy.sh, bootstrap-установкой с нуля и конфигурацией через .env. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
commit
74b6f92cb8
15 changed files with 17242 additions and 0 deletions
43
prometheus/prometheus.yml.tpl
Normal file
43
prometheus/prometheus.yml.tpl
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# Шаблон: deploy.sh рендерит его в rendered/prometheus.yml.
|
||||
# __ПЛЕЙСХОЛДЕРЫ__ подставляются из .env; строки с префиксом #AUTH#
|
||||
# включаются только при непустом METRICS_PASSWORD.
|
||||
|
||||
global:
|
||||
scrape_interval: 30s
|
||||
evaluation_interval: 30s
|
||||
external_labels:
|
||||
server: '__SERVER_NAME__'
|
||||
|
||||
rule_files:
|
||||
- /etc/prometheus/rules/*.yml
|
||||
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets: ['alertmanager:9093']
|
||||
#AUTH# basic_auth:
|
||||
#AUTH# username: '__METRICS_USER__'
|
||||
#AUTH# password_file: /etc/prometheus/auth/password
|
||||
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
#AUTH# basic_auth:
|
||||
#AUTH# username: '__METRICS_USER__'
|
||||
#AUTH# password_file: /etc/prometheus/auth/password
|
||||
|
||||
# node_exporter работает в host-сети и слушает BIND_IP
|
||||
- job_name: node
|
||||
static_configs:
|
||||
- targets: ['__BIND_IP__:__NODE_EXPORTER_PORT__']
|
||||
#AUTH# basic_auth:
|
||||
#AUTH# username: '__METRICS_USER__'
|
||||
#AUTH# password_file: /etc/prometheus/auth/password
|
||||
|
||||
# cAdvisor доступен только по внутренней compose-сети, без auth
|
||||
- job_name: cadvisor
|
||||
static_configs:
|
||||
- targets: ['cadvisor:8080']
|
||||
|
||||
# Сюда добавляются удалённые серверы (scrape по tailnet) — см. README
|
||||
Loading…
Add table
Add a link
Reference in a new issue