forked from ceph/ceph-mixins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
absent_alerts.libsonnet
64 lines (64 loc) · 2.1 KB
/
absent_alerts.libsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
prometheusAlerts+:: {
groups+: [
{
name: 'ceph-mgr-status',
rules: [
{
alert: 'CephMgrIsAbsent',
expr: |||
up{%(cephExporterSelector)s} == 0
||| % $._config,
'for': $._config.mgrIsAbsentAlertTime,
labels: {
severity: 'critical',
},
annotations: {
message: 'Storage metrics collector service not available anymore.',
description: 'Ceph Manager has disappeared from Prometheus target discovery.',
storage_type: $._config.storageType,
severity_level: 'critical',
},
},
{
alert: 'CephMgrIsMissingReplicas',
expr: |||
sum(up{%(cephExporterSelector)s}) by (namespace) < %(cephMgrCount)d
||| % $._config,
'for': $._config.mgrMissingReplicasAlertTime,
labels: {
severity: 'warning',
},
annotations: {
message: "Storage metrics collector service doesn't have required no of replicas.",
description: 'Ceph Manager is missing replicas.',
storage_type: $._config.storageType,
severity_level: 'warning',
},
},
],
},
{
name: 'ceph-mds-status',
rules: [
{
alert: 'CephMdsMissingReplicas',
expr: |||
sum(ceph_mds_metadata{%(cephExporterSelector)s} == 1) by (namespace) < %(cephMdsCount)d
||| % $._config,
'for': $._config.mdsMissingReplicasAlertTime,
labels: {
severity: 'warning',
},
annotations: {
message: 'Insufficient replicas for storage metadata service.',
description: 'Minimum required replicas for storage metadata service not available. Might affect the working of storage cluster.',
storage_type: $._config.storageType,
severity_level: 'warning',
},
},
],
},
],
},
}