Files
cozystack/packages/system/monitoring/alerts/general.yaml
Andrei Kvapil f642698921 Preapare release v0.0.1
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-02-08 12:04:32 +01:00

58 lines
2.1 KiB
YAML

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMRule
metadata:
name: alerts-general
namespace: cozy-monitoring
spec:
groups:
- name: coreos.general
labels:
alertname: foo
rules:
- alert: DeadMansSwitch
expr: vector(1)
labels:
severity_level: "4"
annotations:
description: This is a DeadMansSwitch meant to ensure that the entire Alerting
pipeline is functional.
summary: Alerting DeadMansSwitch
- record: fd_utilization
expr: process_open_fds / process_max_fds
- alert: FdExhaustionClose
expr: max(predict_linear(fd_utilization{pod!=""}[1h], 3600 * 4)) BY (job, namespace, pod) > 1
for: 10m
labels:
severity_level: "4"
annotations:
description: '{{ $labels.job }}: {{ $labels.namespace }}/{{ $labels.pod }} instance
will exhaust in file/socket descriptors within the next 4 hours'
summary: file descriptors soon exhausted
- alert: FdExhaustionClose
expr: max(predict_linear(fd_utilization{pod=""}[1h], 3600 * 4)) BY (job, instance) > 1
for: 10m
labels:
severity_level: "4"
annotations:
description: '{{ $labels.job }}: {{ $labels.instance }} instance
will exhaust in file/socket descriptors within the next 4 hours'
summary: file descriptors soon exhausted
- alert: FdExhaustionClose
expr: max(predict_linear(fd_utilization{pod!=""}[10m], 3600)) BY (job, namespace, pod) > 1
for: 10m
labels:
severity_level: "3"
annotations:
description: '{{ $labels.job }}: {{ $labels.namespace }}/{{ $labels.pod }} instance
will exhaust in file/socket descriptors within the next hour'
summary: file descriptors soon exhausted
- alert: FdExhaustionClose
expr: max(predict_linear(fd_utilization{pod=""}[10m], 3600)) BY (job, instance) > 1
for: 10m
labels:
severity_level: "3"
annotations:
description: '{{ $labels.job }}: {{ $labels.instance }} instance
will exhaust in file/socket descriptors within the next hour'
summary: file descriptors soon exhausted