2 Commits

Author SHA1 Message Date
g4st3r
6dd1745649 Use public domain in alert links 2026-03-07 21:08:25 +00:00
g4st3r
7f91660cd0 Alert formatting and swap threshold 2026-03-07 21:06:24 +00:00
2 changed files with 6 additions and 4 deletions

View File

@@ -15,9 +15,11 @@ receivers:
chat_id: -1003779247128 chat_id: -1003779247128
message: |- message: |-
{{ range .Alerts }} {{ range .Alerts }}
*{{ .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 }}
Details: {{ reReplaceAll "http://[^/]+" "https://prometheus.g4st3r.ru" .GeneratorURL }}
{{ end }} {{ end }}
parse_mode: Markdown parse_mode: Markdown
disable_notifications: false disable_notifications: false

View File

@@ -47,13 +47,13 @@ groups:
description: "MemAvailable < 8%" description: "MemAvailable < 8%"
- alert: SwapUsageHigh - alert: SwapUsageHigh
expr: (1 - (node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes)) > 0.30 expr: (1 - (node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes)) > 0.50
for: 15m for: 20m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: "Swap usage high on {{ $labels.instance }}" summary: "Swap usage high on {{ $labels.instance }}"
description: "Swap usage > 30%" description: "Swap usage > 50%"
- alert: DiskFull - alert: DiskFull
expr: (node_filesystem_avail_bytes{fstype!~"tmpfs|overlay"} / node_filesystem_size_bytes{fstype!~"tmpfs|overlay"}) < 0.10 expr: (node_filesystem_avail_bytes{fstype!~"tmpfs|overlay"} / node_filesystem_size_bytes{fstype!~"tmpfs|overlay"}) < 0.10