Initial commit

This commit is contained in:
2025-10-28 01:39:22 +03:00
commit 8d1473935a
23 changed files with 870 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
groups:
- name: general
rules:
- alert: InstanceDown
expr: up == 0
for: 1m
labels:
severity: critical
annotations:
summary: "Endpoint {{ $labels.instance }} недоступен"
description: "Таргет job={{ $labels.job }} на хосте {{ $labels.instance }} не отвечает более 1 минуты."

View File

@@ -0,0 +1,15 @@
global:
resolve_timeout: 5m
route:
receiver: 'default'
group_by: ['alertname', 'job']
group_wait: 10s
group_interval: 5m
repeat_interval: 1h
receivers:
- name: 'default'
webhook_configs:
- url: 'http://host.docker.internal:5001/alerts'
send_resolved: true

28
monitoring/prometheus.yml Normal file
View File

@@ -0,0 +1,28 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'nginx'
static_configs:
- targets: ['nginx_exporter:9113']
- job_name: 'php-fpm'
static_configs:
- targets: ['php_fpm_exporter:9253']
- job_name: 'postgres'
static_configs:
- targets: ['postgres_exporter:9187']
- job_name: 'memcached'
static_configs:
- targets: ['memcached_exporter:9150']
alerting:
alertmanagers:
- static_configs:
- targets: ['alertmanager:9093']
rule_files:
- /etc/prometheus/alert.rules.yml