blob: e91a923dcd8d87e2428baa7e5d118e95ccf9f8df [file] [log] [blame]
Mohammed Naserb8eccd22023-02-10 05:55:56 +00001# copied from https://github.com/ceph/ceph/blob/master/monitoring/ceph-mixin/prometheus_alerts.yml
2groups:
Mohammed Naser65cda132024-05-02 14:34:08 -04003 - name: "cluster health"
Mohammed Naserb8eccd22023-02-10 05:55:56 +00004 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -04005 - alert: "CephHealthError"
Mohammed Naserb8eccd22023-02-10 05:55:56 +00006 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -04007 description: "The cluster state has been HEALTH_ERROR for more than 5 minutes. Please check 'ceph health detail' for more information."
8 summary: "Ceph is in the ERROR state"
9 expr: "ceph_health_status == 2"
10 for: "5m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +000011 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -040012 oid: "1.3.6.1.4.1.50495.1.2.1.2.1"
13 severity: "critical"
14 type: "ceph_default"
15 - alert: "CephHealthWarning"
Mohammed Naserb8eccd22023-02-10 05:55:56 +000016 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -040017 description: "The cluster state has been HEALTH_WARN for more than 15 minutes. Please check 'ceph health detail' for more information."
18 summary: "Ceph is in the WARNING state"
19 expr: "ceph_health_status == 1"
20 for: "15m"
21 labels:
22 severity: "warning"
23 type: "ceph_default"
24 - name: "mon"
Mohammed Naserb8eccd22023-02-10 05:55:56 +000025 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -040026 - alert: "CephMonDownQuorumAtRisk"
Mohammed Naserb8eccd22023-02-10 05:55:56 +000027 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -040028 description: "{{ $min := query \"floor(count(ceph_mon_metadata) / 2) + 1\" | first | value }}Quorum requires a majority of monitors (x {{ $min }}) to be active. Without quorum the cluster will become inoperable, affecting all services and connected clients. The following monitors are down: {{- range query \"(ceph_mon_quorum_status == 0) + on(ceph_daemon) group_left(hostname) (ceph_mon_metadata * 0)\" }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}"
29 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-down"
30 summary: "Monitor quorum is at risk"
Mohammed Naserb8eccd22023-02-10 05:55:56 +000031 expr: |
32 (
Mohammed Naser65cda132024-05-02 14:34:08 -040033 (ceph_health_detail{name="MON_DOWN"} == 1) * on() (
34 count(ceph_mon_quorum_status == 1) == bool (floor(count(ceph_mon_metadata) / 2) + 1)
35 )
36 ) == 1
37 for: "30s"
Mohammed Naserb8eccd22023-02-10 05:55:56 +000038 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -040039 oid: "1.3.6.1.4.1.50495.1.2.1.3.1"
40 severity: "critical"
41 type: "ceph_default"
42 - alert: "CephMonDown"
Mohammed Naserb8eccd22023-02-10 05:55:56 +000043 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -040044 description: |
45 {{ $down := query "count(ceph_mon_quorum_status == 0)" | first | value }}{{ $s := "" }}{{ if gt $down 1.0 }}{{ $s = "s" }}{{ end }}You have {{ $down }} monitor{{ $s }} down. Quorum is still intact, but the loss of an additional monitor will make your cluster inoperable. The following monitors are down: {{- range query "(ceph_mon_quorum_status == 0) + on(ceph_daemon) group_left(hostname) (ceph_mon_metadata * 0)" }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}
46 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-down"
47 summary: "One or more monitors down"
48 expr: |
49 count(ceph_mon_quorum_status == 0) <= (count(ceph_mon_metadata) - floor(count(ceph_mon_metadata) / 2) + 1)
50 for: "30s"
Mohammed Naserb8eccd22023-02-10 05:55:56 +000051 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -040052 severity: "warning"
53 type: "ceph_default"
54 - alert: "CephMonDiskspaceCritical"
Mohammed Naserb8eccd22023-02-10 05:55:56 +000055 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -040056 description: "The free space available to a monitor's store is critically low. You should increase the space available to the monitor(s). The default directory is /var/lib/ceph/mon-*/data/store.db on traditional deployments, and /var/lib/rook/mon-*/data/store.db on the mon pod's worker node for Rook. Look for old, rotated versions of *.log and MANIFEST*. Do NOT touch any *.sst files. Also check any other directories under /var/lib/rook and other directories on the same filesystem, often /var/log and /var/tmp are culprits. Your monitor hosts are; {{- range query \"ceph_mon_metadata\"}} - {{ .Labels.hostname }} {{- end }}"
57 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-disk-crit"
58 summary: "Filesystem space on at least one monitor is critically low"
59 expr: "ceph_health_detail{name=\"MON_DISK_CRIT\"} == 1"
60 for: "1m"
61 labels:
62 oid: "1.3.6.1.4.1.50495.1.2.1.3.2"
63 severity: "critical"
64 type: "ceph_default"
65 - alert: "CephMonDiskspaceLow"
66 annotations:
67 description: "The space available to a monitor's store is approaching full (>70% is the default). You should increase the space available to the monitor(s). The default directory is /var/lib/ceph/mon-*/data/store.db on traditional deployments, and /var/lib/rook/mon-*/data/store.db on the mon pod's worker node for Rook. Look for old, rotated versions of *.log and MANIFEST*. Do NOT touch any *.sst files. Also check any other directories under /var/lib/rook and other directories on the same filesystem, often /var/log and /var/tmp are culprits. Your monitor hosts are; {{- range query \"ceph_mon_metadata\"}} - {{ .Labels.hostname }} {{- end }}"
68 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-disk-low"
69 summary: "Drive space on at least one monitor is approaching full"
70 expr: "ceph_health_detail{name=\"MON_DISK_LOW\"} == 1"
71 for: "5m"
72 labels:
73 severity: "warning"
74 type: "ceph_default"
75 - alert: "CephMonClockSkew"
76 annotations:
77 description: "Ceph monitors rely on closely synchronized time to maintain quorum and cluster consistency. This event indicates that the time on at least one mon has drifted too far from the lead mon. Review cluster status with ceph -s. This will show which monitors are affected. Check the time sync status on each monitor host with 'ceph time-sync-status' and the state and peers of your ntpd or chrony daemon."
78 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-clock-skew"
79 summary: "Clock skew detected among monitors"
80 expr: "ceph_health_detail{name=\"MON_CLOCK_SKEW\"} == 1"
81 for: "1m"
82 labels:
83 severity: "warning"
84 type: "ceph_default"
85 - name: "osd"
86 rules:
87 - alert: "CephOSDDownHigh"
88 annotations:
89 description: "{{ $value | humanize }}% or {{ with query \"count(ceph_osd_up == 0)\" }}{{ . | first | value }}{{ end }} of {{ with query \"count(ceph_osd_up)\" }}{{ . | first | value }}{{ end }} OSDs are down (>= 10%). The following OSDs are down: {{- range query \"(ceph_osd_up * on(ceph_daemon) group_left(hostname) ceph_osd_metadata) == 0\" }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}"
90 summary: "More than 10% of OSDs are down"
91 expr: "count(ceph_osd_up == 0) / count(ceph_osd_up) * 100 >= 10"
92 for: "5m"
93 labels:
94 oid: "1.3.6.1.4.1.50495.1.2.1.4.1"
95 severity: "critical"
96 type: "ceph_default"
97 - alert: "CephOSDHostDown"
98 annotations:
99 description: "The following OSDs are down: {{- range query \"(ceph_osd_up * on(ceph_daemon) group_left(hostname) ceph_osd_metadata) == 0\" }} - {{ .Labels.hostname }} : {{ .Labels.ceph_daemon }} {{- end }}"
100 summary: "An OSD host is offline"
101 expr: "ceph_health_detail{name=\"OSD_HOST_DOWN\"} == 1"
102 for: "5m"
103 labels:
104 oid: "1.3.6.1.4.1.50495.1.2.1.4.8"
105 severity: "warning"
106 type: "ceph_default"
107 - alert: "CephOSDDown"
108 annotations:
109 description: |
110 {{ $num := query "count(ceph_osd_up == 0)" | first | value }}{{ $s := "" }}{{ if gt $num 1.0 }}{{ $s = "s" }}{{ end }}{{ $num }} OSD{{ $s }} down for over 5mins. The following OSD{{ $s }} {{ if eq $s "" }}is{{ else }}are{{ end }} down: {{- range query "(ceph_osd_up * on(ceph_daemon) group_left(hostname) ceph_osd_metadata) == 0"}} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}
111 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-down"
112 summary: "An OSD has been marked down"
113 expr: "ceph_health_detail{name=\"OSD_DOWN\"} == 1"
114 for: "5m"
115 labels:
116 oid: "1.3.6.1.4.1.50495.1.2.1.4.2"
117 severity: "warning"
118 type: "ceph_default"
119 - alert: "CephOSDNearFull"
120 annotations:
121 description: "One or more OSDs have reached the NEARFULL threshold. Use 'ceph health detail' and 'ceph osd df' to identify the problem. To resolve, add capacity to the affected OSD's failure domain, restore down/out OSDs, or delete unwanted data."
122 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-nearfull"
123 summary: "OSD(s) running low on free space (NEARFULL)"
124 expr: "ceph_health_detail{name=\"OSD_NEARFULL\"} == 1"
125 for: "5m"
126 labels:
127 oid: "1.3.6.1.4.1.50495.1.2.1.4.3"
128 severity: "warning"
129 type: "ceph_default"
130 - alert: "CephOSDFull"
131 annotations:
132 description: "An OSD has reached the FULL threshold. Writes to pools that share the affected OSD will be blocked. Use 'ceph health detail' and 'ceph osd df' to identify the problem. To resolve, add capacity to the affected OSD's failure domain, restore down/out OSDs, or delete unwanted data."
133 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-full"
134 summary: "OSD full, writes blocked"
135 expr: "ceph_health_detail{name=\"OSD_FULL\"} > 0"
136 for: "1m"
137 labels:
138 oid: "1.3.6.1.4.1.50495.1.2.1.4.6"
139 severity: "critical"
140 type: "ceph_default"
141 - alert: "CephOSDBackfillFull"
142 annotations:
143 description: "An OSD has reached the BACKFILL FULL threshold. This will prevent rebalance operations from completing. Use 'ceph health detail' and 'ceph osd df' to identify the problem. To resolve, add capacity to the affected OSD's failure domain, restore down/out OSDs, or delete unwanted data."
144 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-backfillfull"
145 summary: "OSD(s) too full for backfill operations"
146 expr: "ceph_health_detail{name=\"OSD_BACKFILLFULL\"} > 0"
147 for: "1m"
148 labels:
149 severity: "warning"
150 type: "ceph_default"
151 - alert: "CephOSDTooManyRepairs"
152 annotations:
153 description: "Reads from an OSD have used a secondary PG to return data to the client, indicating a potential failing drive."
154 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-too-many-repairs"
155 summary: "OSD reports a high number of read errors"
156 expr: "ceph_health_detail{name=\"OSD_TOO_MANY_REPAIRS\"} == 1"
157 for: "30s"
158 labels:
159 severity: "warning"
160 type: "ceph_default"
161 - alert: "CephOSDTimeoutsPublicNetwork"
162 annotations:
163 description: "OSD heartbeats on the cluster's 'public' network (frontend) are running slow. Investigate the network for latency or loss issues. Use 'ceph health detail' to show the affected OSDs."
164 summary: "Network issues delaying OSD heartbeats (public network)"
165 expr: "ceph_health_detail{name=\"OSD_SLOW_PING_TIME_FRONT\"} == 1"
166 for: "1m"
167 labels:
168 severity: "warning"
169 type: "ceph_default"
170 - alert: "CephOSDTimeoutsClusterNetwork"
171 annotations:
172 description: "OSD heartbeats on the cluster's 'cluster' network (backend) are slow. Investigate the network for latency issues on this subnet. Use 'ceph health detail' to show the affected OSDs."
173 summary: "Network issues delaying OSD heartbeats (cluster network)"
174 expr: "ceph_health_detail{name=\"OSD_SLOW_PING_TIME_BACK\"} == 1"
175 for: "1m"
176 labels:
177 severity: "warning"
178 type: "ceph_default"
179 - alert: "CephOSDInternalDiskSizeMismatch"
180 annotations:
181 description: "One or more OSDs have an internal inconsistency between metadata and the size of the device. This could lead to the OSD(s) crashing in future. You should redeploy the affected OSDs."
182 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#bluestore-disk-size-mismatch"
183 summary: "OSD size inconsistency error"
184 expr: "ceph_health_detail{name=\"BLUESTORE_DISK_SIZE_MISMATCH\"} == 1"
185 for: "1m"
186 labels:
187 severity: "warning"
188 type: "ceph_default"
189 - alert: "CephDeviceFailurePredicted"
190 annotations:
191 description: "The device health module has determined that one or more devices will fail soon. To review device status use 'ceph device ls'. To show a specific device use 'ceph device info <dev id>'. Mark the OSD out so that data may migrate to other OSDs. Once the OSD has drained, destroy the OSD, replace the device, and redeploy the OSD."
192 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#id2"
193 summary: "Device(s) predicted to fail soon"
194 expr: "ceph_health_detail{name=\"DEVICE_HEALTH\"} == 1"
195 for: "1m"
196 labels:
197 severity: "warning"
198 type: "ceph_default"
199 - alert: "CephDeviceFailurePredictionTooHigh"
200 annotations:
201 description: "The device health module has determined that devices predicted to fail can not be remediated automatically, since too many OSDs would be removed from the cluster to ensure performance and availabililty. Prevent data integrity issues by adding new OSDs so that data may be relocated."
202 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#device-health-toomany"
203 summary: "Too many devices are predicted to fail, unable to resolve"
204 expr: "ceph_health_detail{name=\"DEVICE_HEALTH_TOOMANY\"} == 1"
205 for: "1m"
206 labels:
207 oid: "1.3.6.1.4.1.50495.1.2.1.4.7"
208 severity: "critical"
209 type: "ceph_default"
210 - alert: "CephDeviceFailureRelocationIncomplete"
211 annotations:
212 description: "The device health module has determined that one or more devices will fail soon, but the normal process of relocating the data on the device to other OSDs in the cluster is blocked. \nEnsure that the cluster has available free space. It may be necessary to add capacity to the cluster to allow data from the failing device to successfully migrate, or to enable the balancer."
213 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#device-health-in-use"
214 summary: "Device failure is predicted, but unable to relocate data"
215 expr: "ceph_health_detail{name=\"DEVICE_HEALTH_IN_USE\"} == 1"
216 for: "1m"
217 labels:
218 severity: "warning"
219 type: "ceph_default"
220 - alert: "CephOSDFlapping"
221 annotations:
222 description: "OSD {{ $labels.ceph_daemon }} on {{ $labels.hostname }} was marked down and back up {{ $value | humanize }} times once a minute for 5 minutes. This may indicate a network issue (latency, packet loss, MTU mismatch) on the cluster network, or the public network if no cluster network is deployed. Check the network stats on the listed host(s)."
223 documentation: "https://docs.ceph.com/en/latest/rados/troubleshooting/troubleshooting-osd#flapping-osds"
224 summary: "Network issues are causing OSDs to flap (mark each other down)"
225 expr: "(rate(ceph_osd_up[5m]) * on(ceph_daemon) group_left(hostname) ceph_osd_metadata) * 60 > 1"
226 labels:
227 oid: "1.3.6.1.4.1.50495.1.2.1.4.4"
228 severity: "warning"
229 type: "ceph_default"
230 - alert: "CephOSDReadErrors"
231 annotations:
232 description: "An OSD has encountered read errors, but the OSD has recovered by retrying the reads. This may indicate an issue with hardware or the kernel."
233 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#bluestore-spurious-read-errors"
234 summary: "Device read errors detected"
235 expr: "ceph_health_detail{name=\"BLUESTORE_SPURIOUS_READ_ERRORS\"} == 1"
236 for: "30s"
237 labels:
238 severity: "warning"
239 type: "ceph_default"
240 - alert: "CephPGImbalance"
241 annotations:
242 description: "OSD {{ $labels.ceph_daemon }} on {{ $labels.hostname }} deviates by more than 30% from average PG count."
243 summary: "PGs are not balanced across OSDs"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000244 expr: |
245 abs(
Mohammed Naser65cda132024-05-02 14:34:08 -0400246 ((ceph_osd_numpg > 0) - on (job) group_left avg(ceph_osd_numpg > 0) by (job)) /
247 on (job) group_left avg(ceph_osd_numpg > 0) by (job)
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000248 ) * on (ceph_daemon) group_left(hostname) ceph_osd_metadata > 0.30
Mohammed Naser65cda132024-05-02 14:34:08 -0400249 for: "5m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000250 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400251 oid: "1.3.6.1.4.1.50495.1.2.1.4.5"
252 severity: "warning"
253 type: "ceph_default"
254 - name: "mds"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000255 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -0400256 - alert: "CephFilesystemDamaged"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000257 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400258 description: "Filesystem metadata has been corrupted. Data may be inaccessible. Analyze metrics from the MDS daemon admin socket, or escalate to support."
259 documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages#cephfs-health-messages"
260 summary: "CephFS filesystem is damaged."
261 expr: "ceph_health_detail{name=\"MDS_DAMAGE\"} > 0"
262 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000263 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400264 oid: "1.3.6.1.4.1.50495.1.2.1.5.1"
265 severity: "critical"
266 type: "ceph_default"
267 - alert: "CephFilesystemOffline"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000268 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400269 description: "All MDS ranks are unavailable. The MDS daemons managing metadata are down, rendering the filesystem offline."
270 documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#mds-all-down"
271 summary: "CephFS filesystem is offline"
272 expr: "ceph_health_detail{name=\"MDS_ALL_DOWN\"} > 0"
273 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000274 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400275 oid: "1.3.6.1.4.1.50495.1.2.1.5.3"
276 severity: "critical"
277 type: "ceph_default"
278 - alert: "CephFilesystemDegraded"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000279 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400280 description: "One or more metadata daemons (MDS ranks) are failed or in a damaged state. At best the filesystem is partially available, at worst the filesystem is completely unusable."
281 documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#fs-degraded"
282 summary: "CephFS filesystem is degraded"
283 expr: "ceph_health_detail{name=\"FS_DEGRADED\"} > 0"
284 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000285 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400286 oid: "1.3.6.1.4.1.50495.1.2.1.5.4"
287 severity: "critical"
288 type: "ceph_default"
289 - alert: "CephFilesystemMDSRanksLow"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000290 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400291 description: "The filesystem's 'max_mds' setting defines the number of MDS ranks in the filesystem. The current number of active MDS daemons is less than this value."
292 documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#mds-up-less-than-max"
293 summary: "Ceph MDS daemon count is lower than configured"
294 expr: "ceph_health_detail{name=\"MDS_UP_LESS_THAN_MAX\"} > 0"
295 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000296 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400297 severity: "warning"
298 type: "ceph_default"
299 - alert: "CephFilesystemInsufficientStandby"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000300 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400301 description: "The minimum number of standby daemons required by standby_count_wanted is less than the current number of standby daemons. Adjust the standby count or increase the number of MDS daemons."
302 documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#mds-insufficient-standby"
303 summary: "Ceph filesystem standby daemons too few"
304 expr: "ceph_health_detail{name=\"MDS_INSUFFICIENT_STANDBY\"} > 0"
305 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000306 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400307 severity: "warning"
308 type: "ceph_default"
309 - alert: "CephFilesystemFailureNoStandby"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000310 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400311 description: "An MDS daemon has failed, leaving only one active rank and no available standby. Investigate the cause of the failure or add a standby MDS."
312 documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#fs-with-failed-mds"
313 summary: "MDS daemon failed, no further standby available"
314 expr: "ceph_health_detail{name=\"FS_WITH_FAILED_MDS\"} > 0"
315 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000316 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400317 oid: "1.3.6.1.4.1.50495.1.2.1.5.5"
318 severity: "critical"
319 type: "ceph_default"
320 - alert: "CephFilesystemReadOnly"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000321 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400322 description: "The filesystem has switched to READ ONLY due to an unexpected error when writing to the metadata pool. Either analyze the output from the MDS daemon admin socket, or escalate to support."
323 documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages#cephfs-health-messages"
324 summary: "CephFS filesystem in read only mode due to write error(s)"
325 expr: "ceph_health_detail{name=\"MDS_HEALTH_READ_ONLY\"} > 0"
326 for: "1m"
327 labels:
328 oid: "1.3.6.1.4.1.50495.1.2.1.5.2"
329 severity: "critical"
330 type: "ceph_default"
331 - name: "mgr"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000332 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -0400333 - alert: "CephMgrModuleCrash"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000334 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400335 description: "One or more mgr modules have crashed and have yet to be acknowledged by an administrator. A crashed module may impact functionality within the cluster. Use the 'ceph crash' command to determine which module has failed, and archive it to acknowledge the failure."
336 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#recent-mgr-module-crash"
337 summary: "A manager module has recently crashed"
338 expr: "ceph_health_detail{name=\"RECENT_MGR_MODULE_CRASH\"} == 1"
339 for: "5m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000340 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400341 oid: "1.3.6.1.4.1.50495.1.2.1.6.1"
342 severity: "critical"
343 type: "ceph_default"
344 - alert: "CephMgrPrometheusModuleInactive"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000345 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400346 description: "The mgr/prometheus module at {{ $labels.instance }} is unreachable. This could mean that the module has been disabled or the mgr daemon itself is down. Without the mgr/prometheus module metrics and alerts will no longer function. Open a shell to an admin node or toolbox pod and use 'ceph -s' to to determine whether the mgr is active. If the mgr is not active, restart it, otherwise you can determine module status with 'ceph mgr module ls'. If it is not listed as enabled, enable it with 'ceph mgr module enable prometheus'."
347 summary: "The mgr/prometheus module is not available"
348 expr: "up{job=\"ceph\"} == 0"
349 for: "1m"
350 labels:
351 oid: "1.3.6.1.4.1.50495.1.2.1.6.2"
352 severity: "critical"
353 type: "ceph_default"
354 - name: "pgs"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000355 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -0400356 - alert: "CephPGsInactive"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000357 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400358 description: "{{ $value }} PGs have been inactive for more than 5 minutes in pool {{ $labels.name }}. Inactive placement groups are not able to serve read/write requests."
359 summary: "One or more placement groups are inactive"
360 expr: "ceph_pool_metadata * on(pool_id,instance) group_left() (ceph_pg_total - ceph_pg_active) > 0"
361 for: "5m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000362 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400363 oid: "1.3.6.1.4.1.50495.1.2.1.7.1"
364 severity: "critical"
365 type: "ceph_default"
366 - alert: "CephPGsUnclean"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000367 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400368 description: "{{ $value }} PGs have been unclean for more than 15 minutes in pool {{ $labels.name }}. Unclean PGs have not recovered from a previous failure."
369 summary: "One or more placement groups are marked unclean"
370 expr: "ceph_pool_metadata * on(pool_id,instance) group_left() (ceph_pg_total - ceph_pg_clean) > 0"
371 for: "15m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000372 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400373 oid: "1.3.6.1.4.1.50495.1.2.1.7.2"
374 severity: "warning"
375 type: "ceph_default"
376 - alert: "CephPGsDamaged"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000377 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400378 description: "During data consistency checks (scrub), at least one PG has been flagged as being damaged or inconsistent. Check to see which PG is affected, and attempt a manual repair if necessary. To list problematic placement groups, use 'rados list-inconsistent-pg <pool>'. To repair PGs use the 'ceph pg repair <pg_num>' command."
379 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-damaged"
380 summary: "Placement group damaged, manual intervention needed"
381 expr: "ceph_health_detail{name=~\"PG_DAMAGED|OSD_SCRUB_ERRORS\"} == 1"
382 for: "5m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000383 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400384 oid: "1.3.6.1.4.1.50495.1.2.1.7.4"
385 severity: "critical"
386 type: "ceph_default"
387 - alert: "CephPGRecoveryAtRisk"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000388 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400389 description: "Data redundancy is at risk since one or more OSDs are at or above the 'full' threshold. Add more capacity to the cluster, restore down/out OSDs, or delete unwanted data."
390 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-recovery-full"
391 summary: "OSDs are too full for recovery"
392 expr: "ceph_health_detail{name=\"PG_RECOVERY_FULL\"} == 1"
393 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000394 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400395 oid: "1.3.6.1.4.1.50495.1.2.1.7.5"
396 severity: "critical"
397 type: "ceph_default"
398 - alert: "CephPGUnavilableBlockingIO"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000399 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400400 description: "Data availability is reduced, impacting the cluster's ability to service I/O. One or more placement groups (PGs) are in a state that blocks I/O."
401 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-availability"
402 summary: "PG is unavailable, blocking I/O"
403 expr: "((ceph_health_detail{name=\"PG_AVAILABILITY\"} == 1) - scalar(ceph_health_detail{name=\"OSD_DOWN\"})) == 1"
404 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000405 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400406 oid: "1.3.6.1.4.1.50495.1.2.1.7.3"
407 severity: "critical"
408 type: "ceph_default"
409 - alert: "CephPGBackfillAtRisk"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000410 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400411 description: "Data redundancy may be at risk due to lack of free space within the cluster. One or more OSDs have reached the 'backfillfull' threshold. Add more capacity, or delete unwanted data."
412 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-backfill-full"
413 summary: "Backfill operations are blocked due to lack of free space"
414 expr: "ceph_health_detail{name=\"PG_BACKFILL_FULL\"} == 1"
415 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000416 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400417 oid: "1.3.6.1.4.1.50495.1.2.1.7.6"
418 severity: "critical"
419 type: "ceph_default"
420 - alert: "CephPGNotScrubbed"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000421 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400422 description: "One or more PGs have not been scrubbed recently. Scrubs check metadata integrity, protecting against bit-rot. They check that metadata is consistent across data replicas. When PGs miss their scrub interval, it may indicate that the scrub window is too small, or PGs were not in a 'clean' state during the scrub window. You can manually initiate a scrub with: ceph pg scrub <pgid>"
423 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-not-scrubbed"
424 summary: "Placement group(s) have not been scrubbed"
425 expr: "ceph_health_detail{name=\"PG_NOT_SCRUBBED\"} == 1"
426 for: "5m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000427 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400428 severity: "warning"
429 type: "ceph_default"
430 - alert: "CephPGsHighPerOSD"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000431 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400432 description: "The number of placement groups per OSD is too high (exceeds the mon_max_pg_per_osd setting).\n Check that the pg_autoscaler has not been disabled for any pools with 'ceph osd pool autoscale-status', and that the profile selected is appropriate. You may also adjust the target_size_ratio of a pool to guide the autoscaler based on the expected relative size of the pool ('ceph osd pool set cephfs.cephfs.meta target_size_ratio .1') or set the pg_autoscaler mode to 'warn' and adjust pg_num appropriately for one or more pools."
433 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks/#too-many-pgs"
434 summary: "Placement groups per OSD is too high"
435 expr: "ceph_health_detail{name=\"TOO_MANY_PGS\"} == 1"
436 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000437 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400438 severity: "warning"
439 type: "ceph_default"
440 - alert: "CephPGNotDeepScrubbed"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000441 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400442 description: "One or more PGs have not been deep scrubbed recently. Deep scrubs protect against bit-rot. They compare data replicas to ensure consistency. When PGs miss their deep scrub interval, it may indicate that the window is too small or PGs were not in a 'clean' state during the deep-scrub window."
443 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-not-deep-scrubbed"
444 summary: "Placement group(s) have not been deep scrubbed"
445 expr: "ceph_health_detail{name=\"PG_NOT_DEEP_SCRUBBED\"} == 1"
446 for: "5m"
447 labels:
448 severity: "warning"
449 type: "ceph_default"
450 - name: "nodes"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000451 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -0400452 - alert: "CephNodeRootFilesystemFull"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000453 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400454 description: "Root volume is dangerously full: {{ $value | humanize }}% free."
455 summary: "Root filesystem is dangerously full"
456 expr: "node_filesystem_avail_bytes{mountpoint=\"/\"} / node_filesystem_size_bytes{mountpoint=\"/\"} * 100 < 5"
457 for: "5m"
458 labels:
459 oid: "1.3.6.1.4.1.50495.1.2.1.8.1"
460 severity: "critical"
461 type: "ceph_default"
462 - alert: "CephNodeNetworkPacketDrops"
463 annotations:
464 description: "Node {{ $labels.instance }} experiences packet drop > 0.5% or > 10 packets/s on interface {{ $labels.device }}."
465 summary: "One or more NICs reports packet drops"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000466 expr: |
467 (
Mohammed Naser65cda132024-05-02 14:34:08 -0400468 rate(node_network_receive_drop_total{device!="lo"}[1m]) +
469 rate(node_network_transmit_drop_total{device!="lo"}[1m])
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000470 ) / (
Mohammed Naser65cda132024-05-02 14:34:08 -0400471 rate(node_network_receive_packets_total{device!="lo"}[1m]) +
472 rate(node_network_transmit_packets_total{device!="lo"}[1m])
473 ) >= 0.0050000000000000001 and (
474 rate(node_network_receive_drop_total{device!="lo"}[1m]) +
475 rate(node_network_transmit_drop_total{device!="lo"}[1m])
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000476 ) >= 10
477 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400478 oid: "1.3.6.1.4.1.50495.1.2.1.8.2"
479 severity: "warning"
480 type: "ceph_default"
481 - alert: "CephNodeNetworkPacketErrors"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000482 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400483 description: "Node {{ $labels.instance }} experiences packet errors > 0.01% or > 10 packets/s on interface {{ $labels.device }}."
484 summary: "One or more NICs reports packet errors"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000485 expr: |
486 (
Mohammed Naser65cda132024-05-02 14:34:08 -0400487 rate(node_network_receive_errs_total{device!="lo"}[1m]) +
488 rate(node_network_transmit_errs_total{device!="lo"}[1m])
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000489 ) / (
Mohammed Naser65cda132024-05-02 14:34:08 -0400490 rate(node_network_receive_packets_total{device!="lo"}[1m]) +
491 rate(node_network_transmit_packets_total{device!="lo"}[1m])
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000492 ) >= 0.0001 or (
Mohammed Naser65cda132024-05-02 14:34:08 -0400493 rate(node_network_receive_errs_total{device!="lo"}[1m]) +
494 rate(node_network_transmit_errs_total{device!="lo"}[1m])
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000495 ) >= 10
496 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400497 oid: "1.3.6.1.4.1.50495.1.2.1.8.3"
498 severity: "warning"
499 type: "ceph_default"
500 - alert: "CephNodeNetworkBondDegraded"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000501 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400502 summary: "Degraded Bond on Node {{ $labels.instance }}"
503 description: "Bond {{ $labels.master }} is degraded on Node {{ $labels.instance }}."
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000504 expr: |
Mohammed Naser65cda132024-05-02 14:34:08 -0400505 node_bonding_slaves - node_bonding_active != 0
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000506 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400507 severity: "warning"
508 type: "ceph_default"
509 - alert: "CephNodeDiskspaceWarning"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000510 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400511 description: "Mountpoint {{ $labels.mountpoint }} on {{ $labels.nodename }} will be full in less than 5 days based on the 48 hour trailing fill rate."
512 summary: "Host filesystem free space is getting low"
513 expr: "predict_linear(node_filesystem_free_bytes{device=~\"/.*\"}[2d], 3600 * 24 * 5) *on(instance) group_left(nodename) node_uname_info < 0"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000514 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400515 oid: "1.3.6.1.4.1.50495.1.2.1.8.4"
516 severity: "warning"
517 type: "ceph_default"
518 - alert: "CephNodeInconsistentMTU"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000519 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400520 description: "Node {{ $labels.instance }} has a different MTU size ({{ $value }}) than the median of devices named {{ $labels.device }}."
521 summary: "MTU settings across Ceph hosts are inconsistent"
522 expr: "node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0) == scalar( max by (device) (node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0)) != quantile by (device) (.5, node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0)) )or node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0) == scalar( min by (device) (node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0)) != quantile by (device) (.5, node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0)) )"
523 labels:
524 severity: "warning"
525 type: "ceph_default"
526 - name: "pools"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000527 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -0400528 - alert: "CephPoolBackfillFull"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000529 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400530 description: "A pool is approaching the near full threshold, which will prevent recovery/backfill operations from completing. Consider adding more capacity."
531 summary: "Free space in a pool is too low for recovery/backfill"
532 expr: "ceph_health_detail{name=\"POOL_BACKFILLFULL\"} > 0"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000533 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400534 severity: "warning"
535 type: "ceph_default"
536 - alert: "CephPoolFull"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000537 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400538 description: "A pool has reached its MAX quota, or OSDs supporting the pool have reached the FULL threshold. Until this is resolved, writes to the pool will be blocked. Pool Breakdown (top 5) {{- range query \"topk(5, sort_desc(ceph_pool_percent_used * on(pool_id) group_right ceph_pool_metadata))\" }} - {{ .Labels.name }} at {{ .Value }}% {{- end }} Increase the pool's quota, or add capacity to the cluster first then increase the pool's quota (e.g. ceph osd pool set quota <pool_name> max_bytes <bytes>)"
539 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pool-full"
540 summary: "Pool is full - writes are blocked"
541 expr: "ceph_health_detail{name=\"POOL_FULL\"} > 0"
542 for: "1m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000543 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400544 oid: "1.3.6.1.4.1.50495.1.2.1.9.1"
545 severity: "critical"
546 type: "ceph_default"
547 - alert: "CephPoolNearFull"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000548 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400549 description: "A pool has exceeded the warning (percent full) threshold, or OSDs supporting the pool have reached the NEARFULL threshold. Writes may continue, but you are at risk of the pool going read-only if more capacity isn't made available. Determine the affected pool with 'ceph df detail', looking at QUOTA BYTES and STORED. Increase the pool's quota, or add capacity to the cluster first then increase the pool's quota (e.g. ceph osd pool set quota <pool_name> max_bytes <bytes>). Also ensure that the balancer is active."
550 summary: "One or more Ceph pools are nearly full"
551 expr: "ceph_health_detail{name=\"POOL_NEAR_FULL\"} > 0"
552 for: "5m"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000553 labels:
Mohammed Naser65cda132024-05-02 14:34:08 -0400554 severity: "warning"
555 type: "ceph_default"
556 - name: "healthchecks"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000557 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -0400558 - alert: "CephSlowOps"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000559 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400560 description: "{{ $value }} OSD requests are taking too long to process (osd_op_complaint_time exceeded)"
561 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#slow-ops"
562 summary: "OSD operations are slow to complete"
563 expr: "ceph_healthcheck_slow_ops > 0"
564 for: "30s"
565 labels:
566 severity: "warning"
567 type: "ceph_default"
568 - alert: "CephDaemonSlowOps"
569 for: "30s"
570 expr: "ceph_daemon_health_metrics{type=\"SLOW_OPS\"} > 0"
571 labels:
572 severity: 'warning'
573 type: 'ceph_default'
574 annotations:
575 summary: "{{ $labels.ceph_daemon }} operations are slow to complete"
576 description: "{{ $labels.ceph_daemon }} operations are taking too long to process (complaint time exceeded)"
577 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#slow-ops"
578 - name: "rados"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000579 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -0400580 - alert: "CephObjectMissing"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000581 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400582 description: "The latest version of a RADOS object can not be found, even though all OSDs are up. I/O requests for this object from clients will block (hang). Resolving this issue may require the object to be rolled back to a prior version manually, and manually verified."
583 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#object-unfound"
584 summary: "Object(s) marked UNFOUND"
585 expr: "(ceph_health_detail{name=\"OBJECT_UNFOUND\"} == 1) * on() (count(ceph_osd_up == 1) == bool count(ceph_osd_metadata)) == 1"
586 for: "30s"
587 labels:
588 oid: "1.3.6.1.4.1.50495.1.2.1.10.1"
589 severity: "critical"
590 type: "ceph_default"
591 - name: "generic"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000592 rules:
Mohammed Naser65cda132024-05-02 14:34:08 -0400593 - alert: "CephDaemonCrash"
Mohammed Naserb8eccd22023-02-10 05:55:56 +0000594 annotations:
Mohammed Naser65cda132024-05-02 14:34:08 -0400595 description: "One or more daemons have crashed recently, and need to be acknowledged. This notification ensures that software crashes do not go unseen. To acknowledge a crash, use the 'ceph crash archive <id>' command."
596 documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks/#recent-crash"
597 summary: "One or more Ceph daemons have crashed, and are pending acknowledgement"
598 expr: "ceph_health_detail{name=\"RECENT_CRASH\"} == 1"
599 for: "1m"
600 labels:
601 oid: "1.3.6.1.4.1.50495.1.2.1.1.2"
602 severity: "critical"
603 type: "ceph_default"