Skip to content

Commit

Permalink
[stable/2023.2] ceph: Add CephHealthDetail alerts (#1500)
Browse files Browse the repository at this point in the history
This is an automated cherry-pick of #1495
/assign mnaser
  • Loading branch information
vexxhost-bot authored Jul 4, 2024
1 parent ee7574e commit 6140515
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion roles/kube_prometheus_stack/files/jsonnet/mixins.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ local disabledAlerts = [
// * Dropped `CephNodeNetworkPacketDrops` due to noisy alerts with
// no actionable items to fix it.
'CephNodeNetworkPacketDrops',

// Superseded by CephHealthDetail* alerts
'CephHealthWarning',
'CephHealthError',
];

// NOTE(mnaser): This is the default mapping for severities:
Expand Down Expand Up @@ -55,7 +59,37 @@ local mixins = {
alertmanagerClusterLabels: 'namespace,service,cluster',
},
},
ceph: (import 'vendor/github.com/ceph/ceph/monitoring/ceph-mixin/mixin.libsonnet'),
ceph: (import 'vendor/github.com/ceph/ceph/monitoring/ceph-mixin/mixin.libsonnet') + {
prometheusAlerts+:: {
groups+: [
{
name: 'cluster health detail',
rules: [
{
alert: 'CephHealthDetailError',
'for': '5m',
expr: 'ceph_health_detail{severity="HEALTH_ERROR"} == 1',
labels: { severity: 'critical' },
annotations: {
summary: 'Ceph is in the ERROR state',
description: "Health check {{ $labels.name }} has been HEALTH_ERROR for more than 5 minutes. Please check 'ceph health detail' for more information.",
},
},
{
alert: 'CephHealthDetailWarning',
'for': '15m',
expr: 'ceph_health_detail{severity="HEALTH_WARN"} == 1',
labels: { severity: 'warning' },
annotations: {
summary: 'Ceph is in the WARNING state',
description: "Health check {{ $labels.name }} has been HEALTH_WARN for more than 15 minutes. Please check 'ceph health detail' for more information.",
},
},
],
},
],
}
},
coredns: (import 'vendor/github.com/povilasv/coredns-mixin/mixin.libsonnet') + {
_config+:: {
corednsSelector: 'job="coredns"',
Expand Down

0 comments on commit 6140515

Please sign in to comment.