сервис_victoriametrics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_victoriametrics [2025/03/28 12:50]
val [Уведомления]
сервис_victoriametrics [2025/03/29 09:32] (current)
val [Уведомления]
Line 56: Line 56:
  
 kube1:~/vm# helm show values vm/​victoria-metrics-alert > vm-alert-values.yaml kube1:~/vm# helm show values vm/​victoria-metrics-alert > vm-alert-values.yaml
 +
 +$ wget -qO - https://​raw.githubusercontent.com/​samber/​awesome-prometheus-alerts/​master/​dist/​rules/​host-and-hardware/​node-exporter.yml | sed '​s/​^/ ​   /'
 +
 +$ wget -qO - https://​raw.githubusercontent.com/​samber/​awesome-prometheus-alerts/​master/​dist/​rules/​kubernetes/​kubestate-exporter.yml | sed '​s/​^/ ​   /'
  
 kube1:~/vm# cat vm-alert-values.yaml kube1:~/vm# cat vm-alert-values.yaml
Line 75: Line 79:
 #      groups: [] #      groups: []
       groups:       groups:
-      - name: node_exporter_alerts+      - name: NodeExporter
 ...    ...   
-      - name: vm_k8s_alerts+      - name: KubestateExporter
         rules:         rules:
         - alert: KubernetesContainerOomKiller         - alert: KubernetesContainerOomKiller
Line 166: Line 170:
  
 Builder->​ Filter: kubernetes.pod_name = my-debian Builder->​ Filter: kubernetes.pod_name = my-debian
 +</​code>​
 +
 +====== Черновик ======
 +
 +<​code>​
 +        - alert: CriticalCPU
 +          expr: sum by (kubernetes_io_hostname) (rate (container_cpu_usage_seconds_total[1m])) / sum (machine_cpu_cores) * 100 > 40
 +          for: 1m
 +          labels:
 +            severity: "​critical"​
 +          annotations:​
 +            summary: "​CriticalCPU {{ $labels.instance }}"
 +
 +        - alert: CriticalFS
 +          expr: container_fs_usage_bytes{device=~"​^/​dev/​[sv]d[a-z][1-9]$"​} / container_fs_limit_bytes * 100 > 80
 +          for: 1m
 +          labels:
 +            severity: "​critical"​
 +          annotations:​
 +            summary: "​CriticalFS {{ $labels.instance }}"
 +
 +        - alert: CriticalMEM
 +          expr: sum by (kubernetes_io_hostname) (container_memory_working_set_bytes) / sum (machine_memory_bytes) * 100 > 80
 +          for: 1m
 +          labels:
 +            severity: "​critical"​
 +          annotations:​
 +            summary: "​CriticalMEM {{ $labels.instance }}"
 </​code>​ </​code>​
сервис_victoriametrics.1743155431.txt.gz · Last modified: 2025/03/28 12:50 by val