feat: add test alert group with low thresholds for notification testing
All checks were successful
terraform-dev / validate (push) Successful in 6s
terraform-dev / plan (push) Successful in 12s
terraform-dev / apply (push) Has been skipped

This commit is contained in:
Alexandr
2026-04-03 11:45:40 +03:00
parent 1fa74832a0
commit e95827b11f
4 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,21 @@
name: "DEV ADIBROV - TEST CPU > 2%"
expression: |
(
1 - avg by(instance) (rate(node_cpu_seconds_total{job="node_exporter", mode="idle"}[1m]))
) * 100
threshold: 2
for: "1m"
condition_type: "gt"
need_reduce: true
reducer_type: "max"
no_data_state: "OK"
exec_err_state: "OK"
labels:
service: "test"
severity: "info"
status: "test"
team: "infra"
summary: |
[TEST] CPU {{ printf "%.1f" $values.B.Value }}% на {{ $labels.instance }}
description: |
Тестовый алерт — срабатывает при CPU > 2%. Используется для проверки доставки уведомлений.

View File

@ -0,0 +1,19 @@
name: "DEV ADIBROV - TEST Go Goroutines"
expression: |
go_goroutines{job="prometheus"}
threshold: 10
for: "1m"
condition_type: "gt"
need_reduce: true
reducer_type: "max"
no_data_state: "OK"
exec_err_state: "OK"
labels:
service: "test"
severity: "info"
status: "test"
team: "infra"
summary: |
[TEST] Goroutines prometheus: {{ printf "%.0f" $values.B.Value }}
description: |
Тестовый алерт — горутин в prometheus больше 10 (норма ~100+). Всегда файрится, используется для проверки resolve.

View File

@ -0,0 +1,21 @@
name: "DEV ADIBROV - TEST Memory > 20%"
expression: |
(
1 - (node_memory_MemAvailable_bytes{job="node_exporter"} / node_memory_MemTotal_bytes{job="node_exporter"})
) * 100
threshold: 20
for: "1m"
condition_type: "gt"
need_reduce: true
reducer_type: "max"
no_data_state: "OK"
exec_err_state: "OK"
labels:
service: "test"
severity: "info"
status: "test"
team: "infra"
summary: |
[TEST] Память {{ printf "%.1f" $values.B.Value }}% на {{ $labels.instance }}
description: |
Тестовый алерт — срабатывает при использовании памяти > 20%. Используется для проверки доставки уведомлений.