Merge branch 'monitoring-alerts-ru' into 'main'

RU alerts + container tuning

See merge request g4st3r/srv-docker!11
This commit is contained in:
2026-03-07 21:19:57 +00:00
2 changed files with 8 additions and 8 deletions

View File

@@ -18,10 +18,10 @@ receivers:
{{ if eq .Labels.severity "critical" }}🔴{{ else }}⚠️{{ end }} *{{ .Labels.alertname }}* ({{ .Labels.severity }}) {{ if eq .Labels.severity "critical" }}🔴{{ else }}⚠️{{ end }} *{{ .Labels.alertname }}* ({{ .Labels.severity }})
{{ .Annotations.summary }} {{ .Annotations.summary }}
{{ .Annotations.description }} {{ .Annotations.description }}
Instance: {{ .Labels.instance }} Инстанс: {{ .Labels.instance }}
Details (Prometheus): {{ reReplaceAll "http://[^/]+" "https://prometheus.g4st3r.ru" .GeneratorURL }} Ссылка (Prometheus): {{ reReplaceAll "http://[^/]+" "https://prometheus.g4st3r.ru" .GeneratorURL }}
Details (Grafana): {{ if eq .Labels.instance "10.8.0.1:9100" }}https://grafana.g4st3r.ru/d/bffbyigsryj28c{{ else if eq .Labels.instance "node-exporter:9100" }}https://grafana.g4st3r.ru/d/affbyigukvw1sc{{ else }}https://grafana.g4st3r.ru{{ end }} Ссылка (Grafana): {{ if eq .Labels.alertname "DockerContainerDown" }}https://grafana.g4st3r.ru/d/affbyigwgb5dsb{{ else if eq .Labels.instance "10.8.0.1:9100" }}https://grafana.g4st3r.ru/d/bffbyigsryj28c{{ else if eq .Labels.instance "node-exporter:9100" }}https://grafana.g4st3r.ru/d/affbyigukvw1sc{{ else }}https://grafana.g4st3r.ru{{ end }}
Graph (PNG): {{ if eq .Labels.instance "10.8.0.1:9100" }}https://grafana.g4st3r.ru/render/d/bffbyigsryj28c?orgId=1&from=now-6h&to=now&width=1000&height=500&theme=dark{{ else if eq .Labels.instance "node-exporter:9100" }}https://grafana.g4st3r.ru/render/d/affbyigukvw1sc?orgId=1&from=now-6h&to=now&width=1000&height=500&theme=dark{{ else }}https://grafana.g4st3r.ru{{ end }} График (PNG): {{ if eq .Labels.alertname "DockerContainerDown" }}https://grafana.g4st3r.ru/render/d/affbyigwgb5dsb?orgId=1&from=now-6h&to=now&width=1000&height=500&theme=dark{{ else if eq .Labels.instance "10.8.0.1:9100" }}https://grafana.g4st3r.ru/render/d/bffbyigsryj28c?orgId=1&from=now-6h&to=now&width=1000&height=500&theme=dark{{ else if eq .Labels.instance "node-exporter:9100" }}https://grafana.g4st3r.ru/render/d/affbyigukvw1sc?orgId=1&from=now-6h&to=now&width=1000&height=500&theme=dark{{ else }}https://grafana.g4st3r.ru{{ end }}
{{ end }} {{ end }}
parse_mode: Markdown parse_mode: Markdown
disable_notifications: false disable_notifications: false

View File

@@ -83,13 +83,13 @@ groups:
description: "{{ $labels.mountpoint }} usage above 95%" description: "{{ $labels.mountpoint }} usage above 95%"
- alert: DockerContainerDown - alert: DockerContainerDown
expr: time() - container_last_seen > 120 expr: time() - container_last_seen{image!="",container!=""} > 300
for: 2m for: 5m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: "Container down" summary: "Контейнер недоступен"
description: "A container has not been seen for >2m" description: "Контейнер не виден >5 минут"
- alert: HttpEndpointDown - alert: HttpEndpointDown
expr: probe_success{job="blackbox-http"} == 0 expr: probe_success{job="blackbox-http"} == 0