diff options
Diffstat (limited to 'monitoring')
-rw-r--r-- | monitoring/ceph-mixin/prometheus_alerts.libsonnet | 102 | ||||
-rw-r--r-- | monitoring/ceph-mixin/prometheus_alerts.yml | 226 | ||||
-rw-r--r-- | monitoring/ceph-mixin/tests_alerts/test_alerts.yml | 1190 | ||||
-rw-r--r-- | monitoring/ceph-mixin/tox.ini | 1 |
4 files changed, 771 insertions, 748 deletions
diff --git a/monitoring/ceph-mixin/prometheus_alerts.libsonnet b/monitoring/ceph-mixin/prometheus_alerts.libsonnet index fa2899b22c1..cde1a736f8c 100644 --- a/monitoring/ceph-mixin/prometheus_alerts.libsonnet +++ b/monitoring/ceph-mixin/prometheus_alerts.libsonnet @@ -45,8 +45,8 @@ 'for': '30s', expr: ||| ( - (ceph_health_detail{name="MON_DOWN"} == 1) * on() ( - count(ceph_mon_quorum_status == 1) == bool (floor(count(ceph_mon_metadata) / 2) + 1) + (ceph_health_detail{name="MON_DOWN"} == 1) * on() group_right(cluster) ( + count(ceph_mon_quorum_status == 1) by(cluster)== bool (floor(count(ceph_mon_metadata) by(cluster) / 2) + 1) ) ) == 1 |||, @@ -54,22 +54,20 @@ annotations: { documentation: 'https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-down', summary: 'Monitor quorum is at risk%(cluster)s' % $.MultiClusterSummary(), - 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 }}', + description: '{{ $min := printf "floor(count(ceph_mon_metadata{cluster=\'%s\'}) / 2) + 1" .Labels.cluster | query | 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 printf "(ceph_mon_quorum_status{cluster=\'%s\'} == 0) + on(cluster,ceph_daemon) group_left(hostname) (ceph_mon_metadata * 0)" .Labels.cluster | query }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}', }, }, { alert: 'CephMonDown', 'for': '30s', expr: ||| - count(ceph_mon_quorum_status == 0) <= (count(ceph_mon_metadata) - floor(count(ceph_mon_metadata) / 2) + 1) + (count by (cluster) (ceph_mon_quorum_status == 0)) <= (count by (cluster) (ceph_mon_metadata) - floor((count by (cluster) (ceph_mon_metadata) / 2 + 1))) |||, labels: { severity: 'warning', type: 'ceph_default' }, annotations: { documentation: 'https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-down', summary: 'One or more monitors down%(cluster)s' % $.MultiClusterSummary(), - description: ||| - {{ $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 }} - |||, + description: '{{ $down := printf "count(ceph_mon_quorum_status{cluster=\'%s\'} == 0)" .Labels.cluster | query | 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 printf "(ceph_mon_quorum_status{cluster=\'%s\'} == 0) + on(cluster,ceph_daemon) group_left(hostname) (ceph_mon_metadata * 0)" .Labels.cluster | query }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}', }, }, { @@ -112,11 +110,11 @@ rules: [ { alert: 'CephOSDDownHigh', - expr: 'count(ceph_osd_up == 0) / count(ceph_osd_up) * 100 >= 10', + expr: 'count by (cluster) (ceph_osd_up == 0) / count by (cluster) (ceph_osd_up) * 100 >= 10', labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.4.1' }, annotations: { summary: 'More than 10%% of OSDs are down%(cluster)s' % $.MultiClusterSummary(), - 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 }}', + description: '{{ $value | humanize }}% or {{ with printf "count (ceph_osd_up{cluster=\'%s\'} == 0)" .Labels.cluster | query }}{{ . | first | value }}{{ end }} of {{ with printf "count (ceph_osd_up{cluster=\'%s\'})" .Labels.cluster | query }}{{ . | first | value }}{{ end }} OSDs are down (>= 10%). The following OSDs are down: {{- range printf "(ceph_osd_up{cluster=\'%s\'} * on(cluster, ceph_daemon) group_left(hostname) ceph_osd_metadata) == 0" .Labels.cluster | query }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}', }, }, { @@ -126,7 +124,7 @@ labels: { severity: 'warning', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.4.8' }, annotations: { summary: 'An OSD host is offline%(cluster)s' % $.MultiClusterSummary(), - 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 }}', + description: 'The following OSDs are down: {{- range printf "(ceph_osd_up{cluster=\'%s\'} * on(cluster,ceph_daemon) group_left(hostname) ceph_osd_metadata) == 0" .Labels.cluster | query }} - {{ .Labels.hostname }} : {{ .Labels.ceph_daemon }} {{- end }}', }, }, { @@ -137,9 +135,7 @@ annotations: { documentation: 'https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-down', summary: 'An OSD has been marked down%(cluster)s' % $.MultiClusterSummary(), - description: ||| - {{ $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 }} - |||, + description: '{{ $num := printf "count(ceph_osd_up{cluster=\'%s\'} == 0) " .Labels.cluster | query | 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 printf "(ceph_osd_up{cluster=\'%s\'} * on(cluster,ceph_daemon) group_left(hostname) ceph_osd_metadata) == 0" .Labels.cluster | query }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}', }, }, { @@ -235,7 +231,7 @@ labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.4.7' }, annotations: { documentation: 'https://docs.ceph.com/en/latest/rados/operations/health-checks#device-health-toomany', - summary: 'Too many devices are predicted to fail, unable to resolve%(cluster)s' % $.MultiClusterSummary(), + summary: 'Too many devices are predicted to fail%(cluster)s, unable to resolve' % $.MultiClusterSummary(), 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 availability. Prevent data integrity issues by adding new OSDs so that data may be relocated.', }, }, @@ -298,7 +294,7 @@ labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.5.1' }, annotations: { documentation: 'https://docs.ceph.com/en/latest/cephfs/health-messages#cephfs-health-messages', - summary: 'CephFS filesystem is damaged%(cluster)s.' % $.MultiClusterSummary(), + summary: 'CephFS filesystem is damaged%(cluster)s' % $.MultiClusterSummary(), description: 'Filesystem metadata has been corrupted. Data may be inaccessible. Analyze metrics from the MDS daemon admin socket, or escalate to support.', }, }, @@ -390,7 +386,7 @@ expr: 'up{job="ceph"} == 0', labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.6.2' }, annotations: { - summary: 'The mgr/prometheus module is not available%(cluster)s' % $.MultiClusterSummary(), + summary: 'The mgr/prometheus module is not available', 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'.", }, }, @@ -507,7 +503,7 @@ expr: 'node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"} * 100 < 5', labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.8.1' }, annotations: { - summary: 'Root filesystem is dangerously full%(cluster)s' % $.MultiClusterSummary(), + summary: 'Root filesystem is dangerously full', description: 'Root volume is dangerously full: {{ $value | humanize }}% free.', }, }, @@ -527,7 +523,7 @@ ||| % $._config, labels: { severity: 'warning', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.8.2' }, annotations: { - summary: 'One or more NICs reports packet drops%(cluster)s' % $.MultiClusterSummary(), + summary: 'One or more NICs reports packet drops', description: 'Node {{ $labels.instance }} experiences packet drop > %(CephNodeNetworkPacketDropsThreshold)s%% or > %(CephNodeNetworkPacketDropsPerSec)s packets/s on interface {{ $labels.device }}.' % { CephNodeNetworkPacketDropsThreshold: $._config.CephNodeNetworkPacketDropsThreshold * 100, CephNodeNetworkPacketDropsPerSec: $._config.CephNodeNetworkPacketDropsPerSec }, }, }, @@ -564,7 +560,7 @@ }, { alert: 'CephNodeDiskspaceWarning', - expr: 'predict_linear(node_filesystem_free_bytes{device=~"/.*"}[2d], 3600 * 24 * 5) *on(instance) group_left(nodename) node_uname_info < 0', + expr: 'predict_linear(node_filesystem_free_bytes{device=~"/.*"}[2d], 3600 * 24 * 5) * on(cluster, instance) group_left(nodename) node_uname_info < 0', labels: { severity: 'warning', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.8.4' }, annotations: { summary: 'Host filesystem free space is getting low%(cluster)s' % $.MultiClusterSummary(), @@ -573,7 +569,7 @@ }, { alert: 'CephNodeInconsistentMTU', - 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)) )', + expr: 'node_network_mtu_bytes * (node_network_up{device!="lo"} > 0) == scalar( max by (cluster,device) (node_network_mtu_bytes * (node_network_up{device!="lo"} > 0)) != quantile by (cluster,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 (cluster,device) (node_network_mtu_bytes * (node_network_up{device!="lo"} > 0)) != quantile by (cluster,device) (.5, node_network_mtu_bytes * (node_network_up{device!="lo"} > 0)) )', labels: { severity: 'warning', type: 'ceph_default' }, annotations: { summary: 'MTU settings across Ceph hosts are inconsistent%(cluster)s' % $.MultiClusterSummary(), @@ -611,7 +607,7 @@ annotations: { documentation: 'https://docs.ceph.com/en/latest/rados/operations/health-checks#pool-full', summary: 'Pool is full - writes are blocked%(cluster)s' % $.MultiClusterSummary(), - 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>)", + 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 printf \"topk(5, sort_desc(ceph_pool_percent_used{cluster='%s'} * on(cluster,pool_id) group_right ceph_pool_metadata))\" .Labels.cluster | query }} - {{ .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>)", }, }, { @@ -647,7 +643,7 @@ labels: { severity: 'warning', type: 'ceph_default' }, annotations: { documentation: 'https://docs.ceph.com/en/latest/rados/operations/health-checks#slow-ops', - summary: '{{ $labels.ceph_daemon }} operations are slow to complete', + summary: '{{ $labels.ceph_daemon }} operations are slow to complete%(cluster)s' % $.MultiClusterSummary(), description: '{{ $labels.ceph_daemon }} operations are taking too long to process (complaint time exceeded)', }, }, @@ -763,7 +759,7 @@ expr: 'absent(up{job="ceph"})', labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.12.1' }, annotations: { - summary: 'The scrape job for Ceph is missing from Prometheus%(cluster)s' % $.MultiClusterSummary(), + summary: 'The scrape job for Ceph is missing from Prometheus', description: "The prometheus job that scrapes from Ceph is no longer defined, this will effectively mean you'll have no metrics or alerts for the cluster. Please review the job definitions in the prometheus.yml file of the prometheus instance.", }, }, @@ -775,7 +771,7 @@ { alert: 'CephObjectMissing', 'for': '30s', - expr: '(ceph_health_detail{name="OBJECT_UNFOUND"} == 1) * on() (count(ceph_osd_up == 1) == bool count(ceph_osd_metadata)) == 1', + expr: '(ceph_health_detail{name="OBJECT_UNFOUND"} == 1) * on() group_right(cluster) (count(ceph_osd_up == 1) by (cluster) == bool count(ceph_osd_metadata) by(cluster)) == 1', labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.10.1' }, annotations: { documentation: 'https://docs.ceph.com/en/latest/rados/operations/health-checks#object-unfound', @@ -807,31 +803,31 @@ { alert: 'CephRBDMirrorImagesPerDaemonHigh', 'for': '1m', - expr: 'sum by (ceph_daemon, namespace) (ceph_rbd_mirror_snapshot_image_snapshots) > %(CephRBDMirrorImagesPerDaemonThreshold)s' % $._config, + expr: 'sum by (cluster, ceph_daemon, namespace) (ceph_rbd_mirror_snapshot_image_snapshots) > %(CephRBDMirrorImagesPerDaemonThreshold)s' % $._config, labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.10.2' }, annotations: { - summary: 'Number of image replications are now above %(CephRBDMirrorImagesPerDaemonThreshold)s' % $._config, - description: 'Number of image replications per daemon is not suppossed to go beyond threshold %(CephRBDMirrorImagesPerDaemonThreshold)s' % $._config, + summary: 'Number of image replications are now above %(CephRBDMirrorImagesPerDaemonThreshold)s%(cluster)s' % [$._config.CephRBDMirrorImagesPerDaemonThreshold, $.MultiClusterSummary()], + description: 'Number of image replications per daemon is not supposed to go beyond threshold %(CephRBDMirrorImagesPerDaemonThreshold)s' % $._config, }, }, { alert: 'CephRBDMirrorImagesNotInSync', 'for': '1m', - expr: 'sum by (ceph_daemon, image, namespace, pool) (topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0', + expr: 'sum by (cluster, ceph_daemon, image, namespace, pool) (topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0', labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.10.3' }, annotations: { - summary: 'Some of the RBD mirror images are not in sync with the remote counter parts.', + summary: 'Some of the RBD mirror images are not in sync with the remote counter parts%(cluster)s' % $.MultiClusterSummary(), description: 'Both local and remote RBD mirror images should be in sync.', }, }, { alert: 'CephRBDMirrorImagesNotInSyncVeryHigh', 'for': '1m', - expr: 'count by (ceph_daemon) ((topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0) > (sum by (ceph_daemon) (ceph_rbd_mirror_snapshot_snapshots)*.1)', + expr: 'count by (ceph_daemon, cluster) ((topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0) > (sum by (ceph_daemon, cluster) (ceph_rbd_mirror_snapshot_snapshots)*.1)', labels: { severity: 'critical', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.10.4' }, annotations: { - summary: 'Number of unsynchronized images are very high.', - description: 'More than 10% of the images have synchronization problems', + summary: 'Number of unsynchronized images are very high%(cluster)s' % $.MultiClusterSummary(), + description: 'More than 10% of the images have synchronization problems.', }, }, { @@ -840,7 +836,7 @@ expr: 'rate(ceph_rbd_mirror_journal_replay_bytes[30m]) > %.2f' % [$._config.CephRBDMirrorImageTransferBandwidthThreshold], labels: { severity: 'warning', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.10.5' }, annotations: { - summary: 'The replication network usage has been increased over %d%s in the last 30 minutes. Review the number of images being replicated. This alert will be cleaned automatically after 30 minutes' % [$._config.CephRBDMirrorImageTransferBandwidthThreshold * 100, '%'], + summary: 'The replication network usage%(cluster)s has been increased over %d%s in the last 30 minutes. Review the number of images being replicated. This alert will be cleaned automatically after 30 minutes' % [$.MultiClusterSummary(), $._config.CephRBDMirrorImageTransferBandwidthThreshold * 100, '%'], description: 'Detected a heavy increase in bandwidth for rbd replications (over %d%s) in the last 30 min. This might not be a problem, but it is good to review the number of images being replicated simultaneously' % [$._config.CephRBDMirrorImageTransferBandwidthThreshold * 100, '%'], }, }, @@ -852,50 +848,50 @@ { alert: 'NVMeoFSubsystemNamespaceLimit', 'for': '1m', - expr: '(count by(nqn) (ceph_nvmeof_subsystem_namespace_metadata)) >= ceph_nvmeof_subsystem_namespace_limit', + expr: '(count by(nqn, cluster) (ceph_nvmeof_subsystem_namespace_metadata)) >= ceph_nvmeof_subsystem_namespace_limit', labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: '{{ $labels.nqn }} subsystem has reached its maximum number of namespaces %(cluster)s' % $.MultiClusterSummary(), + summary: '{{ $labels.nqn }} subsystem has reached its maximum number of namespaces%(cluster)s' % $.MultiClusterSummary(), description: 'Subsystems have a max namespace limit defined at creation time. This alert means that no more namespaces can be added to {{ $labels.nqn }}', }, }, { alert: 'NVMeoFTooManyGateways', 'for': '1m', - expr: 'count(ceph_nvmeof_gateway_info) > %.2f' % [$._config.NVMeoFMaxGatewaysPerCluster], + expr: 'count(ceph_nvmeof_gateway_info) by (cluster) > %.2f' % [$._config.NVMeoFMaxGatewaysPerCluster], labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'Max supported gateways exceeded %(cluster)s' % $.MultiClusterSummary(), + summary: 'Max supported gateways exceeded%(cluster)s' % $.MultiClusterSummary(), description: 'You may create many gateways, but %(NVMeoFMaxGatewaysPerCluster)d is the tested limit' % $._config, }, }, { alert: 'NVMeoFMaxGatewayGroupSize', 'for': '1m', - expr: 'count by(group) (ceph_nvmeof_gateway_info) > %.2f' % [$._config.NVMeoFMaxGatewaysPerGroup], + expr: 'count(ceph_nvmeof_gateway_info) by (cluster,group) > %.2f' % [$._config.NVMeoFMaxGatewaysPerGroup], labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'Max gateways within a gateway group ({{ $labels.group }}) exceeded %(cluster)s' % $.MultiClusterSummary(), + summary: 'Max gateways within a gateway group ({{ $labels.group }}) exceeded%(cluster)s' % $.MultiClusterSummary(), description: 'You may create many gateways in a gateway group, but %(NVMeoFMaxGatewaysPerGroup)d is the tested limit' % $._config, }, }, { alert: 'NVMeoFSingleGatewayGroup', 'for': '5m', - expr: 'count by(group) (ceph_nvmeof_gateway_info) == 1', + expr: 'count(ceph_nvmeof_gateway_info) by(cluster,group) == 1', labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'The gateway group {{ $labels.group }} consists of a single gateway - HA is not possible %(cluster)s' % $.MultiClusterSummary(), + summary: 'The gateway group {{ $labels.group }} consists of a single gateway - HA is not possible%(cluster)s' % $.MultiClusterSummary(), description: 'Although a single member gateway group is valid, it should only be used for test purposes', }, }, { alert: 'NVMeoFHighGatewayCPU', 'for': '10m', - expr: 'label_replace(avg by(instance) (rate(ceph_nvmeof_reactor_seconds_total{mode="busy"}[1m])),"instance","$1","instance","(.*):.*") > %.2f' % [$._config.NVMeoFHighGatewayCPU], + expr: 'label_replace(avg by(instance, cluster) (rate(ceph_nvmeof_reactor_seconds_total{mode="busy"}[1m])),"instance","$1","instance","(.*):.*") > %.2f' % [$._config.NVMeoFHighGatewayCPU], labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'CPU used by {{ $labels.instance }} NVMe-oF Gateway is high %(cluster)s' % $.MultiClusterSummary(), + summary: 'CPU used by {{ $labels.instance }} NVMe-oF Gateway is high%(cluster)s' % $.MultiClusterSummary(), description: 'Typically, high CPU may indicate degraded performance. Consider increasing the number of reactor cores', }, }, @@ -905,27 +901,27 @@ expr: 'ceph_nvmeof_subsystem_metadata{allow_any_host="yes"}', labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'Subsystem {{ $labels.nqn }} has been defined without host level security %(cluster)s' % $.MultiClusterSummary(), + summary: 'Subsystem {{ $labels.nqn }} has been defined without host level security%(cluster)s' % $.MultiClusterSummary(), description: 'It is good practice to ensure subsystems use host security to reduce the risk of unexpected data loss', }, }, { alert: 'NVMeoFTooManySubsystems', 'for': '1m', - expr: 'count by(gateway_host) (label_replace(ceph_nvmeof_subsystem_metadata,"gateway_host","$1","instance","(.*):.*")) > %.2f' % [$._config.NVMeoFMaxSubsystemsPerGateway], + expr: 'count by(gateway_host, cluster) (label_replace(ceph_nvmeof_subsystem_metadata,"gateway_host","$1","instance","(.*):.*")) > %.2f' % [$._config.NVMeoFMaxSubsystemsPerGateway], labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'The number of subsystems defined to the gateway exceeds supported values %(cluster)s' % $.MultiClusterSummary(), + summary: 'The number of subsystems defined to the gateway exceeds supported values%(cluster)s' % $.MultiClusterSummary(), description: 'Although you may continue to create subsystems in {{ $labels.gateway_host }}, the configuration may not be supported', }, }, { alert: 'NVMeoFVersionMismatch', 'for': '1h', - expr: 'count(count by(version) (ceph_nvmeof_gateway_info)) > 1', + expr: 'count(count(ceph_nvmeof_gateway_info) by (cluster, version)) by (cluster) > 1', labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'The cluster has different NVMe-oF gateway releases active %(cluster)s' % $.MultiClusterSummary(), + summary: 'Too many different NVMe-oF gateway releases active%(cluster)s' % $.MultiClusterSummary(), description: 'This may indicate an issue with deployment. Check cephadm logs', }, }, @@ -935,17 +931,17 @@ expr: 'ceph_nvmeof_subsystem_host_count > %.2f' % [$._config.NVMeoFHighClientCount], labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'The number of clients connected to {{ $labels.nqn }} is too high %(cluster)s' % $.MultiClusterSummary(), + summary: 'The number of clients connected to {{ $labels.nqn }} is too high%(cluster)s' % $.MultiClusterSummary(), description: 'The supported limit for clients connecting to a subsystem is %(NVMeoFHighClientCount)d' % $._config, }, }, { alert: 'NVMeoFHighHostCPU', 'for': '10m', - expr: '100-((100*(avg by(host) (label_replace(rate(node_cpu_seconds_total{mode="idle"}[5m]),"host","$1","instance","(.*):.*")) * on(host) group_right label_replace(ceph_nvmeof_gateway_info,"host","$1","instance","(.*):.*")))) >= %.2f' % [$._config.NVMeoFHighHostCPU], + expr: '100-((100*(avg by(cluster,host) (label_replace(rate(node_cpu_seconds_total{mode="idle"}[5m]),"host","$1","instance","(.*):.*")) * on(cluster, host) group_right label_replace(ceph_nvmeof_gateway_info,"host","$1","instance","(.*):.*")))) >= %.2f' % [$._config.NVMeoFHighHostCPU], labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'The CPU is high ({{ $value }}%%) on NVMeoF Gateway host ({{ $labels.host }}) %(cluster)s' % $.MultiClusterSummary(), + summary: 'The CPU is high ({{ $value }}%%) on NVMeoF Gateway host ({{ $labels.host }})%(cluster)s' % $.MultiClusterSummary(), description: 'High CPU on a gateway host can lead to CPU contention and performance degradation', }, }, @@ -955,7 +951,7 @@ expr: 'ceph_nvmeof_subsystem_listener_iface_info{operstate="down"}', labels: { severity: 'warning', type: 'ceph_default', oid: '1.3.6.1.4.1.50495.1.2.1.14.1' }, annotations: { - summary: 'Network interface {{ $labels.device }} is down %(cluster)s' % $.MultiClusterSummary(), + summary: 'Network interface {{ $labels.device }} is down%(cluster)s' % $.MultiClusterSummary(), description: 'A NIC used by one or more subsystems is in a down state', }, }, @@ -965,7 +961,7 @@ expr: 'ceph_nvmeof_subsystem_listener_iface_info{duplex!="full"}', labels: { severity: 'warning', type: 'ceph_default' }, annotations: { - summary: 'Network interface {{ $labels.device }} is not running in full duplex mode %(cluster)s' % $.MultiClusterSummary(), + summary: 'Network interface {{ $labels.device }} is not running in full duplex mode%(cluster)s' % $.MultiClusterSummary(), description: 'Until this is resolved, performance from the gateway will be degraded', }, }, diff --git a/monitoring/ceph-mixin/prometheus_alerts.yml b/monitoring/ceph-mixin/prometheus_alerts.yml index 84452e5845a..ba6a6ded0a3 100644 --- a/monitoring/ceph-mixin/prometheus_alerts.yml +++ b/monitoring/ceph-mixin/prometheus_alerts.yml @@ -3,8 +3,8 @@ groups: rules: - alert: "CephHealthError" annotations: - description: "The cluster state has been HEALTH_ERROR for more than 5 minutes. Please check 'ceph health detail' for more information." - summary: "Ceph is in the ERROR state" + description: "The cluster state has been HEALTH_ERROR for more than 5 minutes on cluster {{ $labels.cluster }}. Please check 'ceph health detail' for more information." + summary: "Ceph is in the ERROR state on cluster {{ $labels.cluster }}" expr: "ceph_health_status == 2" for: "5m" labels: @@ -13,8 +13,8 @@ groups: type: "ceph_default" - alert: "CephHealthWarning" annotations: - description: "The cluster state has been HEALTH_WARN for more than 15 minutes. Please check 'ceph health detail' for more information." - summary: "Ceph is in the WARNING state" + description: "The cluster state has been HEALTH_WARN for more than 15 minutes on cluster {{ $labels.cluster }}. Please check 'ceph health detail' for more information." + summary: "Ceph is in the WARNING state on cluster {{ $labels.cluster }}" expr: "ceph_health_status == 1" for: "15m" labels: @@ -24,13 +24,13 @@ groups: rules: - alert: "CephMonDownQuorumAtRisk" annotations: - 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 }}" + description: "{{ $min := printf \"floor(count(ceph_mon_metadata{cluster='%s'}) / 2) + 1\" .Labels.cluster | query | 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 printf \"(ceph_mon_quorum_status{cluster='%s'} == 0) + on(cluster,ceph_daemon) group_left(hostname) (ceph_mon_metadata * 0)\" .Labels.cluster | query }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}" documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-down" - summary: "Monitor quorum is at risk" + summary: "Monitor quorum is at risk on cluster {{ $labels.cluster }}" expr: | ( - (ceph_health_detail{name="MON_DOWN"} == 1) * on() ( - count(ceph_mon_quorum_status == 1) == bool (floor(count(ceph_mon_metadata) / 2) + 1) + (ceph_health_detail{name="MON_DOWN"} == 1) * on() group_right(cluster) ( + count(ceph_mon_quorum_status == 1) by(cluster)== bool (floor(count(ceph_mon_metadata) by(cluster) / 2) + 1) ) ) == 1 for: "30s" @@ -40,12 +40,11 @@ groups: type: "ceph_default" - alert: "CephMonDown" annotations: - description: | - {{ $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 }} + description: "{{ $down := printf \"count(ceph_mon_quorum_status{cluster='%s'} == 0)\" .Labels.cluster | query | 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 printf \"(ceph_mon_quorum_status{cluster='%s'} == 0) + on(cluster,ceph_daemon) group_left(hostname) (ceph_mon_metadata * 0)\" .Labels.cluster | query }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}" documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-down" - summary: "One or more monitors down" + summary: "One or more monitors down on cluster {{ $labels.cluster }}" expr: | - count(ceph_mon_quorum_status == 0) <= (count(ceph_mon_metadata) - floor(count(ceph_mon_metadata) / 2) + 1) + (count by (cluster) (ceph_mon_quorum_status == 0)) <= (count by (cluster) (ceph_mon_metadata) - floor((count by (cluster) (ceph_mon_metadata) / 2 + 1))) for: "30s" labels: severity: "warning" @@ -54,7 +53,7 @@ groups: annotations: 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 }}" documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-disk-crit" - summary: "Filesystem space on at least one monitor is critically low" + summary: "Filesystem space on at least one monitor is critically low on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"MON_DISK_CRIT\"} == 1" for: "1m" labels: @@ -65,7 +64,7 @@ groups: annotations: 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 }}" documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-disk-low" - summary: "Drive space on at least one monitor is approaching full" + summary: "Drive space on at least one monitor is approaching full on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"MON_DISK_LOW\"} == 1" for: "5m" labels: @@ -75,7 +74,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-clock-skew" - summary: "Clock skew detected among monitors" + summary: "Clock skew detected among monitors on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"MON_CLOCK_SKEW\"} == 1" for: "1m" labels: @@ -85,17 +84,17 @@ groups: rules: - alert: "CephOSDDownHigh" annotations: - 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 }}" - summary: "More than 10% of OSDs are down" - expr: "count(ceph_osd_up == 0) / count(ceph_osd_up) * 100 >= 10" + description: "{{ $value | humanize }}% or {{ with printf \"count (ceph_osd_up{cluster='%s'} == 0)\" .Labels.cluster | query }}{{ . | first | value }}{{ end }} of {{ with printf \"count (ceph_osd_up{cluster='%s'})\" .Labels.cluster | query }}{{ . | first | value }}{{ end }} OSDs are down (>= 10%). The following OSDs are down: {{- range printf \"(ceph_osd_up{cluster='%s'} * on(cluster, ceph_daemon) group_left(hostname) ceph_osd_metadata) == 0\" .Labels.cluster | query }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}" + summary: "More than 10% of OSDs are down on cluster {{ $labels.cluster }}" + expr: "count by (cluster) (ceph_osd_up == 0) / count by (cluster) (ceph_osd_up) * 100 >= 10" labels: oid: "1.3.6.1.4.1.50495.1.2.1.4.1" severity: "critical" type: "ceph_default" - alert: "CephOSDHostDown" annotations: - 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 }}" - summary: "An OSD host is offline" + description: "The following OSDs are down: {{- range printf \"(ceph_osd_up{cluster='%s'} * on(cluster,ceph_daemon) group_left(hostname) ceph_osd_metadata) == 0\" .Labels.cluster | query }} - {{ .Labels.hostname }} : {{ .Labels.ceph_daemon }} {{- end }}" + summary: "An OSD host is offline on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"OSD_HOST_DOWN\"} == 1" for: "5m" labels: @@ -104,10 +103,9 @@ groups: type: "ceph_default" - alert: "CephOSDDown" annotations: - description: | - {{ $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 }} + description: "{{ $num := printf \"count(ceph_osd_up{cluster='%s'} == 0) \" .Labels.cluster | query | 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 printf \"(ceph_osd_up{cluster='%s'} * on(cluster,ceph_daemon) group_left(hostname) ceph_osd_metadata) == 0\" .Labels.cluster | query }} - {{ .Labels.ceph_daemon }} on {{ .Labels.hostname }} {{- end }}" documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-down" - summary: "An OSD has been marked down" + summary: "An OSD has been marked down on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"OSD_DOWN\"} == 1" for: "5m" labels: @@ -118,7 +116,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-nearfull" - summary: "OSD(s) running low on free space (NEARFULL)" + summary: "OSD(s) running low on free space (NEARFULL) on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"OSD_NEARFULL\"} == 1" for: "5m" labels: @@ -129,7 +127,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-full" - summary: "OSD full, writes blocked" + summary: "OSD full, writes blocked on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"OSD_FULL\"} > 0" for: "1m" labels: @@ -140,7 +138,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-backfillfull" - summary: "OSD(s) too full for backfill operations" + summary: "OSD(s) too full for backfill operations on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"OSD_BACKFILLFULL\"} > 0" for: "1m" labels: @@ -150,7 +148,7 @@ groups: annotations: description: "Reads from an OSD have used a secondary PG to return data to the client, indicating a potential failing drive." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-too-many-repairs" - summary: "OSD reports a high number of read errors" + summary: "OSD reports a high number of read errors on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"OSD_TOO_MANY_REPAIRS\"} == 1" for: "30s" labels: @@ -159,7 +157,7 @@ groups: - alert: "CephOSDTimeoutsPublicNetwork" annotations: 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." - summary: "Network issues delaying OSD heartbeats (public network)" + summary: "Network issues delaying OSD heartbeats (public network) on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"OSD_SLOW_PING_TIME_FRONT\"} == 1" for: "1m" labels: @@ -168,7 +166,7 @@ groups: - alert: "CephOSDTimeoutsClusterNetwork" annotations: 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." - summary: "Network issues delaying OSD heartbeats (cluster network)" + summary: "Network issues delaying OSD heartbeats (cluster network) on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"OSD_SLOW_PING_TIME_BACK\"} == 1" for: "1m" labels: @@ -178,7 +176,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#bluestore-disk-size-mismatch" - summary: "OSD size inconsistency error" + summary: "OSD size inconsistency error on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"BLUESTORE_DISK_SIZE_MISMATCH\"} == 1" for: "1m" labels: @@ -188,7 +186,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#id2" - summary: "Device(s) predicted to fail soon" + summary: "Device(s) predicted to fail soon on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"DEVICE_HEALTH\"} == 1" for: "1m" labels: @@ -198,7 +196,7 @@ groups: annotations: 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 availability. Prevent data integrity issues by adding new OSDs so that data may be relocated." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#device-health-toomany" - summary: "Too many devices are predicted to fail, unable to resolve" + summary: "Too many devices are predicted to fail on cluster {{ $labels.cluster }}, unable to resolve" expr: "ceph_health_detail{name=\"DEVICE_HEALTH_TOOMANY\"} == 1" for: "1m" labels: @@ -209,7 +207,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#device-health-in-use" - summary: "Device failure is predicted, but unable to relocate data" + summary: "Device failure is predicted, but unable to relocate data on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"DEVICE_HEALTH_IN_USE\"} == 1" for: "1m" labels: @@ -219,8 +217,8 @@ groups: annotations: 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)." documentation: "https://docs.ceph.com/en/latest/rados/troubleshooting/troubleshooting-osd#flapping-osds" - summary: "Network issues are causing OSDs to flap (mark each other down)" - expr: "(rate(ceph_osd_up[5m]) * on(ceph_daemon) group_left(hostname) ceph_osd_metadata) * 60 > 1" + summary: "Network issues are causing OSDs to flap (mark each other down) on cluster {{ $labels.cluster }}" + expr: "(rate(ceph_osd_up[5m]) * on(cluster,ceph_daemon) group_left(hostname) ceph_osd_metadata) * 60 > 1" labels: oid: "1.3.6.1.4.1.50495.1.2.1.4.4" severity: "warning" @@ -229,7 +227,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#bluestore-spurious-read-errors" - summary: "Device read errors detected" + summary: "Device read errors detected on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"BLUESTORE_SPURIOUS_READ_ERRORS\"} == 1" for: "30s" labels: @@ -238,12 +236,12 @@ groups: - alert: "CephPGImbalance" annotations: description: "OSD {{ $labels.ceph_daemon }} on {{ $labels.hostname }} deviates by more than 30% from average PG count." - summary: "PGs are not balanced across OSDs" + summary: "PGs are not balanced across OSDs on cluster {{ $labels.cluster }}" expr: | abs( - ((ceph_osd_numpg > 0) - on (job) group_left avg(ceph_osd_numpg > 0) by (job)) / + ((ceph_osd_numpg > 0) - on (cluster,job) group_left avg(ceph_osd_numpg > 0) by (cluster,job)) / on (job) group_left avg(ceph_osd_numpg > 0) by (job) - ) * on (ceph_daemon) group_left(hostname) ceph_osd_metadata > 0.30 + ) * on (cluster,ceph_daemon) group_left(hostname) ceph_osd_metadata > 0.30 for: "5m" labels: oid: "1.3.6.1.4.1.50495.1.2.1.4.5" @@ -255,7 +253,7 @@ groups: annotations: description: "Filesystem metadata has been corrupted. Data may be inaccessible. Analyze metrics from the MDS daemon admin socket, or escalate to support." documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages#cephfs-health-messages" - summary: "CephFS filesystem is damaged." + summary: "CephFS filesystem is damaged on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"MDS_DAMAGE\"} > 0" for: "1m" labels: @@ -266,7 +264,7 @@ groups: annotations: description: "All MDS ranks are unavailable. The MDS daemons managing metadata are down, rendering the filesystem offline." documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#mds-all-down" - summary: "CephFS filesystem is offline" + summary: "CephFS filesystem is offline on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"MDS_ALL_DOWN\"} > 0" for: "1m" labels: @@ -277,7 +275,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#fs-degraded" - summary: "CephFS filesystem is degraded" + summary: "CephFS filesystem is degraded on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"FS_DEGRADED\"} > 0" for: "1m" labels: @@ -288,7 +286,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#mds-up-less-than-max" - summary: "Ceph MDS daemon count is lower than configured" + summary: "Ceph MDS daemon count is lower than configured on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"MDS_UP_LESS_THAN_MAX\"} > 0" for: "1m" labels: @@ -298,7 +296,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#mds-insufficient-standby" - summary: "Ceph filesystem standby daemons too few" + summary: "Ceph filesystem standby daemons too few on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"MDS_INSUFFICIENT_STANDBY\"} > 0" for: "1m" labels: @@ -308,7 +306,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages/#fs-with-failed-mds" - summary: "MDS daemon failed, no further standby available" + summary: "MDS daemon failed, no further standby available on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"FS_WITH_FAILED_MDS\"} > 0" for: "1m" labels: @@ -319,7 +317,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/cephfs/health-messages#cephfs-health-messages" - summary: "CephFS filesystem in read only mode due to write error(s)" + summary: "CephFS filesystem in read only mode due to write error(s) on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"MDS_HEALTH_READ_ONLY\"} > 0" for: "1m" labels: @@ -332,7 +330,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#recent-mgr-module-crash" - summary: "A manager module has recently crashed" + summary: "A manager module has recently crashed on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"RECENT_MGR_MODULE_CRASH\"} == 1" for: "5m" labels: @@ -354,8 +352,8 @@ groups: - alert: "CephPGsInactive" annotations: 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." - summary: "One or more placement groups are inactive" - expr: "ceph_pool_metadata * on(pool_id,instance) group_left() (ceph_pg_total - ceph_pg_active) > 0" + summary: "One or more placement groups are inactive on cluster {{ $labels.cluster }}" + expr: "ceph_pool_metadata * on(cluster,pool_id,instance) group_left() (ceph_pg_total - ceph_pg_active) > 0" for: "5m" labels: oid: "1.3.6.1.4.1.50495.1.2.1.7.1" @@ -364,8 +362,8 @@ groups: - alert: "CephPGsUnclean" annotations: description: "{{ $value }} PGs have been unclean for more than 15 minutes in pool {{ $labels.name }}. Unclean PGs have not recovered from a previous failure." - summary: "One or more placement groups are marked unclean" - expr: "ceph_pool_metadata * on(pool_id,instance) group_left() (ceph_pg_total - ceph_pg_clean) > 0" + summary: "One or more placement groups are marked unclean on cluster {{ $labels.cluster }}" + expr: "ceph_pool_metadata * on(cluster,pool_id,instance) group_left() (ceph_pg_total - ceph_pg_clean) > 0" for: "15m" labels: oid: "1.3.6.1.4.1.50495.1.2.1.7.2" @@ -375,7 +373,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-damaged" - summary: "Placement group damaged, manual intervention needed" + summary: "Placement group damaged, manual intervention needed on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=~\"PG_DAMAGED|OSD_SCRUB_ERRORS\"} == 1" for: "5m" labels: @@ -386,7 +384,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-recovery-full" - summary: "OSDs are too full for recovery" + summary: "OSDs are too full for recovery on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"PG_RECOVERY_FULL\"} == 1" for: "1m" labels: @@ -397,7 +395,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-availability" - summary: "PG is unavailable, blocking I/O" + summary: "PG is unavailable on cluster {{ $labels.cluster }}, blocking I/O" expr: "((ceph_health_detail{name=\"PG_AVAILABILITY\"} == 1) - scalar(ceph_health_detail{name=\"OSD_DOWN\"})) == 1" for: "1m" labels: @@ -408,7 +406,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-backfill-full" - summary: "Backfill operations are blocked due to lack of free space" + summary: "Backfill operations are blocked due to lack of free space on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"PG_BACKFILL_FULL\"} == 1" for: "1m" labels: @@ -419,7 +417,7 @@ groups: annotations: 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>" documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-not-scrubbed" - summary: "Placement group(s) have not been scrubbed" + summary: "Placement group(s) have not been scrubbed on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"PG_NOT_SCRUBBED\"} == 1" for: "5m" labels: @@ -429,7 +427,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks/#too-many-pgs" - summary: "Placement groups per OSD is too high" + summary: "Placement groups per OSD is too high on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"TOO_MANY_PGS\"} == 1" for: "1m" labels: @@ -439,7 +437,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-not-deep-scrubbed" - summary: "Placement group(s) have not been deep scrubbed" + summary: "Placement group(s) have not been deep scrubbed on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"PG_NOT_DEEP_SCRUBBED\"} == 1" for: "5m" labels: @@ -479,7 +477,7 @@ groups: - alert: "CephNodeNetworkPacketErrors" annotations: description: "Node {{ $labels.instance }} experiences packet errors > 0.01% or > 10 packets/s on interface {{ $labels.device }}." - summary: "One or more NICs reports packet errors" + summary: "One or more NICs reports packet errors on cluster {{ $labels.cluster }}" expr: | ( rate(node_network_receive_errs_total{device!="lo"}[1m]) + @@ -498,7 +496,7 @@ groups: - alert: "CephNodeNetworkBondDegraded" annotations: description: "Bond {{ $labels.master }} is degraded on Node {{ $labels.instance }}." - summary: "Degraded Bond on Node {{ $labels.instance }}" + summary: "Degraded Bond on Node {{ $labels.instance }} on cluster {{ $labels.cluster }}" expr: | node_bonding_slaves - node_bonding_active != 0 labels: @@ -507,8 +505,8 @@ groups: - alert: "CephNodeDiskspaceWarning" annotations: description: "Mountpoint {{ $labels.mountpoint }} on {{ $labels.nodename }} will be full in less than 5 days based on the 48 hour trailing fill rate." - summary: "Host filesystem free space is getting low" - expr: "predict_linear(node_filesystem_free_bytes{device=~\"/.*\"}[2d], 3600 * 24 * 5) *on(instance) group_left(nodename) node_uname_info < 0" + summary: "Host filesystem free space is getting low on cluster {{ $labels.cluster }}" + expr: "predict_linear(node_filesystem_free_bytes{device=~\"/.*\"}[2d], 3600 * 24 * 5) * on(cluster, instance) group_left(nodename) node_uname_info < 0" labels: oid: "1.3.6.1.4.1.50495.1.2.1.8.4" severity: "warning" @@ -516,8 +514,8 @@ groups: - alert: "CephNodeInconsistentMTU" annotations: description: "Node {{ $labels.instance }} has a different MTU size ({{ $value }}) than the median of devices named {{ $labels.device }}." - summary: "MTU settings across Ceph hosts are inconsistent" - 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)) )" + summary: "MTU settings across Ceph hosts are inconsistent on cluster {{ $labels.cluster }}" + expr: "node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0) == scalar( max by (cluster,device) (node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0)) != quantile by (cluster,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 (cluster,device) (node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0)) != quantile by (cluster,device) (.5, node_network_mtu_bytes * (node_network_up{device!=\"lo\"} > 0)) )" labels: severity: "warning" type: "ceph_default" @@ -526,8 +524,8 @@ groups: - alert: "CephPoolGrowthWarning" annotations: description: "Pool '{{ $labels.name }}' will be full in less than 5 days assuming the average fill-up rate of the past 48 hours." - summary: "Pool growth rate may soon exceed capacity" - expr: "(predict_linear(ceph_pool_percent_used[2d], 3600 * 24 * 5) * on(pool_id, instance) group_right() ceph_pool_metadata) >= 95" + summary: "Pool growth rate may soon exceed capacity on cluster {{ $labels.cluster }}" + expr: "(predict_linear(ceph_pool_percent_used[2d], 3600 * 24 * 5) * on(cluster,pool_id, instance) group_right() ceph_pool_metadata) >= 95" labels: oid: "1.3.6.1.4.1.50495.1.2.1.9.2" severity: "warning" @@ -535,16 +533,16 @@ groups: - alert: "CephPoolBackfillFull" annotations: description: "A pool is approaching the near full threshold, which will prevent recovery/backfill operations from completing. Consider adding more capacity." - summary: "Free space in a pool is too low for recovery/backfill" + summary: "Free space in a pool is too low for recovery/backfill on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"POOL_BACKFILLFULL\"} > 0" labels: severity: "warning" type: "ceph_default" - alert: "CephPoolFull" annotations: - 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>)" + 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 printf \"topk(5, sort_desc(ceph_pool_percent_used{cluster='%s'} * on(cluster,pool_id) group_right ceph_pool_metadata))\" .Labels.cluster | query }} - {{ .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>)" documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#pool-full" - summary: "Pool is full - writes are blocked" + summary: "Pool is full - writes are blocked on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"POOL_FULL\"} > 0" for: "1m" labels: @@ -554,7 +552,7 @@ groups: - alert: "CephPoolNearFull" annotations: 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." - summary: "One or more Ceph pools are nearly full" + summary: "One or more Ceph pools are nearly full on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"POOL_NEAR_FULL\"} > 0" for: "5m" labels: @@ -566,7 +564,7 @@ groups: annotations: description: "{{ $value }} OSD requests are taking too long to process (osd_op_complaint_time exceeded)" documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#slow-ops" - summary: "OSD operations are slow to complete" + summary: "OSD operations are slow to complete on cluster {{ $labels.cluster }}" expr: "ceph_healthcheck_slow_ops > 0" for: "30s" labels: @@ -576,7 +574,7 @@ groups: annotations: description: "{{ $labels.ceph_daemon }} operations are taking too long to process (complaint time exceeded)" documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#slow-ops" - summary: "{{ $labels.ceph_daemon }} operations are slow to complete" + summary: "{{ $labels.ceph_daemon }} operations are slow to complete on cluster {{ $labels.cluster }}" expr: "ceph_daemon_health_metrics{type=\"SLOW_OPS\"} > 0" for: "30s" labels: @@ -587,7 +585,7 @@ groups: - alert: "CephadmUpgradeFailed" annotations: description: "The cephadm cluster upgrade process has failed. The cluster remains in an undetermined state. Please review the cephadm logs, to understand the nature of the issue" - summary: "Ceph version upgrade has failed" + summary: "Ceph version upgrade has failed on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"UPGRADE_EXCEPTION\"} > 0" for: "30s" labels: @@ -597,7 +595,7 @@ groups: - alert: "CephadmDaemonFailed" annotations: description: "A daemon managed by cephadm is no longer active. Determine, which daemon is down with 'ceph health detail'. you may start daemons with the 'ceph orch daemon start <daemon_id>'" - summary: "A ceph daemon managed by cephadm is down" + summary: "A ceph daemon managed by cephadm is down on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"CEPHADM_FAILED_DAEMON\"} > 0" for: "30s" labels: @@ -608,7 +606,7 @@ groups: annotations: description: "Cluster management has been paused manually. This will prevent the orchestrator from service management and reconciliation. If this is not intentional, resume cephadm operations with 'ceph orch resume'" documentation: "https://docs.ceph.com/en/latest/cephadm/operations#cephadm-paused" - summary: "Orchestration tasks via cephadm are PAUSED" + summary: "Orchestration tasks via cephadm are PAUSED on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"CEPHADM_PAUSED\"} > 0" for: "1m" labels: @@ -619,7 +617,7 @@ groups: - alert: "HardwareStorageError" annotations: description: "Some storage devices are in error. Check `ceph health detail`." - summary: "Storage devices error(s) detected" + summary: "Storage devices error(s) detected on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"HARDWARE_STORAGE\"} > 0" for: "30s" labels: @@ -629,7 +627,7 @@ groups: - alert: "HardwareMemoryError" annotations: description: "DIMM error(s) detected. Check `ceph health detail`." - summary: "DIMM error(s) detected" + summary: "DIMM error(s) detected on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"HARDWARE_MEMORY\"} > 0" for: "30s" labels: @@ -639,7 +637,7 @@ groups: - alert: "HardwareProcessorError" annotations: description: "Processor error(s) detected. Check `ceph health detail`." - summary: "Processor error(s) detected" + summary: "Processor error(s) detected on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"HARDWARE_PROCESSOR\"} > 0" for: "30s" labels: @@ -649,7 +647,7 @@ groups: - alert: "HardwareNetworkError" annotations: description: "Network error(s) detected. Check `ceph health detail`." - summary: "Network error(s) detected" + summary: "Network error(s) detected on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"HARDWARE_NETWORK\"} > 0" for: "30s" labels: @@ -659,7 +657,7 @@ groups: - alert: "HardwarePowerError" annotations: description: "Power supply error(s) detected. Check `ceph health detail`." - summary: "Power supply error(s) detected" + summary: "Power supply error(s) detected on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"HARDWARE_POWER\"} > 0" for: "30s" labels: @@ -669,7 +667,7 @@ groups: - alert: "HardwareFanError" annotations: description: "Fan error(s) detected. Check `ceph health detail`." - summary: "Fan error(s) detected" + summary: "Fan error(s) detected on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"HARDWARE_FANS\"} > 0" for: "30s" labels: @@ -694,8 +692,8 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks#object-unfound" - summary: "Object(s) marked UNFOUND" - expr: "(ceph_health_detail{name=\"OBJECT_UNFOUND\"} == 1) * on() (count(ceph_osd_up == 1) == bool count(ceph_osd_metadata)) == 1" + summary: "Object(s) marked UNFOUND on cluster {{ $labels.cluster }}" + expr: "(ceph_health_detail{name=\"OBJECT_UNFOUND\"} == 1) * on() group_right(cluster) (count(ceph_osd_up == 1) by (cluster) == bool count(ceph_osd_metadata) by(cluster)) == 1" for: "30s" labels: oid: "1.3.6.1.4.1.50495.1.2.1.10.1" @@ -707,7 +705,7 @@ groups: annotations: 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." documentation: "https://docs.ceph.com/en/latest/rados/operations/health-checks/#recent-crash" - summary: "One or more Ceph daemons have crashed, and are pending acknowledgement" + summary: "One or more Ceph daemons have crashed, and are pending acknowledgement on cluster {{ $labels.cluster }}" expr: "ceph_health_detail{name=\"RECENT_CRASH\"} == 1" for: "1m" labels: @@ -718,9 +716,9 @@ groups: rules: - alert: "CephRBDMirrorImagesPerDaemonHigh" annotations: - description: "Number of image replications per daemon is not suppossed to go beyond threshold 100" - summary: "Number of image replications are now above 100" - expr: "sum by (ceph_daemon, namespace) (ceph_rbd_mirror_snapshot_image_snapshots) > 100" + description: "Number of image replications per daemon is not supposed to go beyond threshold 100" + summary: "Number of image replications are now above 100 on cluster {{ $labels.cluster }}" + expr: "sum by (cluster, ceph_daemon, namespace) (ceph_rbd_mirror_snapshot_image_snapshots) > 100" for: "1m" labels: oid: "1.3.6.1.4.1.50495.1.2.1.10.2" @@ -729,8 +727,8 @@ groups: - alert: "CephRBDMirrorImagesNotInSync" annotations: description: "Both local and remote RBD mirror images should be in sync." - summary: "Some of the RBD mirror images are not in sync with the remote counter parts." - expr: "sum by (ceph_daemon, image, namespace, pool) (topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0" + summary: "Some of the RBD mirror images are not in sync with the remote counter parts on cluster {{ $labels.cluster }}" + expr: "sum by (cluster, ceph_daemon, image, namespace, pool) (topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0" for: "1m" labels: oid: "1.3.6.1.4.1.50495.1.2.1.10.3" @@ -738,9 +736,9 @@ groups: type: "ceph_default" - alert: "CephRBDMirrorImagesNotInSyncVeryHigh" annotations: - description: "More than 10% of the images have synchronization problems" - summary: "Number of unsynchronized images are very high." - expr: "count by (ceph_daemon) ((topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0) > (sum by (ceph_daemon) (ceph_rbd_mirror_snapshot_snapshots)*.1)" + description: "More than 10% of the images have synchronization problems." + summary: "Number of unsynchronized images are very high on cluster {{ $labels.cluster }}" + expr: "count by (ceph_daemon, cluster) ((topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0) > (sum by (ceph_daemon, cluster) (ceph_rbd_mirror_snapshot_snapshots)*.1)" for: "1m" labels: oid: "1.3.6.1.4.1.50495.1.2.1.10.4" @@ -749,7 +747,7 @@ groups: - alert: "CephRBDMirrorImageTransferBandwidthHigh" annotations: description: "Detected a heavy increase in bandwidth for rbd replications (over 80%) in the last 30 min. This might not be a problem, but it is good to review the number of images being replicated simultaneously" - summary: "The replication network usage has been increased over 80% in the last 30 minutes. Review the number of images being replicated. This alert will be cleaned automatically after 30 minutes" + summary: "The replication network usage on cluster {{ $labels.cluster }} has been increased over 80% in the last 30 minutes. Review the number of images being replicated. This alert will be cleaned automatically after 30 minutes" expr: "rate(ceph_rbd_mirror_journal_replay_bytes[30m]) > 0.80" for: "1m" labels: @@ -761,8 +759,8 @@ groups: - alert: "NVMeoFSubsystemNamespaceLimit" annotations: description: "Subsystems have a max namespace limit defined at creation time. This alert means that no more namespaces can be added to {{ $labels.nqn }}" - summary: "{{ $labels.nqn }} subsystem has reached its maximum number of namespaces " - expr: "(count by(nqn) (ceph_nvmeof_subsystem_namespace_metadata)) >= ceph_nvmeof_subsystem_namespace_limit" + summary: "{{ $labels.nqn }} subsystem has reached its maximum number of namespaces on cluster {{ $labels.cluster }}" + expr: "(count by(nqn, cluster) (ceph_nvmeof_subsystem_namespace_metadata)) >= ceph_nvmeof_subsystem_namespace_limit" for: "1m" labels: severity: "warning" @@ -770,17 +768,17 @@ groups: - alert: "NVMeoFTooManyGateways" annotations: description: "You may create many gateways, but 4 is the tested limit" - summary: "Max supported gateways exceeded " - expr: "count(ceph_nvmeof_gateway_info) > 4.00" + summary: "Max supported gateways exceeded on cluster {{ $labels.cluster }}" + expr: "count(ceph_nvmeof_gateway_info) by (cluster) > 4.00" for: "1m" labels: severity: "warning" type: "ceph_default" - alert: "NVMeoFMaxGatewayGroupSize" annotations: - description: "You may create many gateways in a gateway group, but 2 is the tested limit" - summary: "Max gateways within a gateway group ({{ $labels.group }}) exceeded " - expr: "count by(group) (ceph_nvmeof_gateway_info) > 2.00" + description: "You may create many gateways in a gateway group, but 4 is the tested limit" + summary: "Max gateways within a gateway group ({{ $labels.group }}) exceeded on cluster {{ $labels.cluster }}" + expr: "count(ceph_nvmeof_gateway_info) by (cluster,group) > 4.00" for: "1m" labels: severity: "warning" @@ -788,8 +786,8 @@ groups: - alert: "NVMeoFSingleGatewayGroup" annotations: description: "Although a single member gateway group is valid, it should only be used for test purposes" - summary: "The gateway group {{ $labels.group }} consists of a single gateway - HA is not possible " - expr: "count by(group) (ceph_nvmeof_gateway_info) == 1" + summary: "The gateway group {{ $labels.group }} consists of a single gateway - HA is not possible on cluster {{ $labels.cluster }}" + expr: "count(ceph_nvmeof_gateway_info) by(cluster,group) == 1" for: "5m" labels: severity: "warning" @@ -797,8 +795,8 @@ groups: - alert: "NVMeoFHighGatewayCPU" annotations: description: "Typically, high CPU may indicate degraded performance. Consider increasing the number of reactor cores" - summary: "CPU used by {{ $labels.instance }} NVMe-oF Gateway is high " - expr: "label_replace(avg by(instance) (rate(ceph_nvmeof_reactor_seconds_total{mode=\"busy\"}[1m])),\"instance\",\"$1\",\"instance\",\"(.*):.*\") > 80.00" + summary: "CPU used by {{ $labels.instance }} NVMe-oF Gateway is high on cluster {{ $labels.cluster }}" + expr: "label_replace(avg by(instance, cluster) (rate(ceph_nvmeof_reactor_seconds_total{mode=\"busy\"}[1m])),\"instance\",\"$1\",\"instance\",\"(.*):.*\") > 80.00" for: "10m" labels: severity: "warning" @@ -806,7 +804,7 @@ groups: - alert: "NVMeoFGatewayOpenSecurity" annotations: description: "It is good practice to ensure subsystems use host security to reduce the risk of unexpected data loss" - summary: "Subsystem {{ $labels.nqn }} has been defined without host level security " + summary: "Subsystem {{ $labels.nqn }} has been defined without host level security on cluster {{ $labels.cluster }}" expr: "ceph_nvmeof_subsystem_metadata{allow_any_host=\"yes\"}" for: "5m" labels: @@ -815,8 +813,8 @@ groups: - alert: "NVMeoFTooManySubsystems" annotations: description: "Although you may continue to create subsystems in {{ $labels.gateway_host }}, the configuration may not be supported" - summary: "The number of subsystems defined to the gateway exceeds supported values " - expr: "count by(gateway_host) (label_replace(ceph_nvmeof_subsystem_metadata,\"gateway_host\",\"$1\",\"instance\",\"(.*):.*\")) > 16.00" + summary: "The number of subsystems defined to the gateway exceeds supported values on cluster {{ $labels.cluster }}" + expr: "count by(gateway_host, cluster) (label_replace(ceph_nvmeof_subsystem_metadata,\"gateway_host\",\"$1\",\"instance\",\"(.*):.*\")) > 16.00" for: "1m" labels: severity: "warning" @@ -824,8 +822,8 @@ groups: - alert: "NVMeoFVersionMismatch" annotations: description: "This may indicate an issue with deployment. Check cephadm logs" - summary: "The cluster has different NVMe-oF gateway releases active " - expr: "count(count by(version) (ceph_nvmeof_gateway_info)) > 1" + summary: "Too many different NVMe-oF gateway releases active on cluster {{ $labels.cluster }}" + expr: "count(count(ceph_nvmeof_gateway_info) by (cluster, version)) by (cluster) > 1" for: "1h" labels: severity: "warning" @@ -833,7 +831,7 @@ groups: - alert: "NVMeoFHighClientCount" annotations: description: "The supported limit for clients connecting to a subsystem is 32" - summary: "The number of clients connected to {{ $labels.nqn }} is too high " + summary: "The number of clients connected to {{ $labels.nqn }} is too high on cluster {{ $labels.cluster }}" expr: "ceph_nvmeof_subsystem_host_count > 32.00" for: "1m" labels: @@ -842,8 +840,8 @@ groups: - alert: "NVMeoFHighHostCPU" annotations: description: "High CPU on a gateway host can lead to CPU contention and performance degradation" - summary: "The CPU is high ({{ $value }}%) on NVMeoF Gateway host ({{ $labels.host }}) " - expr: "100-((100*(avg by(host) (label_replace(rate(node_cpu_seconds_total{mode=\"idle\"}[5m]),\"host\",\"$1\",\"instance\",\"(.*):.*\")) * on(host) group_right label_replace(ceph_nvmeof_gateway_info,\"host\",\"$1\",\"instance\",\"(.*):.*\")))) >= 80.00" + summary: "The CPU is high ({{ $value }}%) on NVMeoF Gateway host ({{ $labels.host }}) on cluster {{ $labels.cluster }}" + expr: "100-((100*(avg by(cluster,host) (label_replace(rate(node_cpu_seconds_total{mode=\"idle\"}[5m]),\"host\",\"$1\",\"instance\",\"(.*):.*\")) * on(cluster, host) group_right label_replace(ceph_nvmeof_gateway_info,\"host\",\"$1\",\"instance\",\"(.*):.*\")))) >= 80.00" for: "10m" labels: severity: "warning" @@ -851,7 +849,7 @@ groups: - alert: "NVMeoFInterfaceDown" annotations: description: "A NIC used by one or more subsystems is in a down state" - summary: "Network interface {{ $labels.device }} is down " + summary: "Network interface {{ $labels.device }} is down on cluster {{ $labels.cluster }}" expr: "ceph_nvmeof_subsystem_listener_iface_info{operstate=\"down\"}" for: "30s" labels: @@ -861,7 +859,7 @@ groups: - alert: "NVMeoFInterfaceDuplex" annotations: description: "Until this is resolved, performance from the gateway will be degraded" - summary: "Network interface {{ $labels.device }} is not running in full duplex mode " + summary: "Network interface {{ $labels.device }} is not running in full duplex mode on cluster {{ $labels.cluster }}" expr: "ceph_nvmeof_subsystem_listener_iface_info{duplex!=\"full\"}" for: "30s" labels: diff --git a/monitoring/ceph-mixin/tests_alerts/test_alerts.yml b/monitoring/ceph-mixin/tests_alerts/test_alerts.yml index 40d6f4d0983..a269ff74227 100644 --- a/monitoring/ceph-mixin/tests_alerts/test_alerts.yml +++ b/monitoring/ceph-mixin/tests_alerts/test_alerts.yml @@ -5,13 +5,13 @@ tests: # health error - interval: 5m input_series: - - series: 'ceph_health_status{instance="ceph:9283",job="ceph"}' + - series: 'ceph_health_status{instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '2 2 2 2 2 2 2' promql_expr_test: - expr: ceph_health_status == 2 eval_time: 5m exp_samples: - - labels: 'ceph_health_status{instance="ceph:9283",job="ceph"}' + - labels: 'ceph_health_status{instance="ceph:9283",job="ceph",cluster="mycluster"}' value: 2 alert_rule_test: - eval_time: 1m @@ -25,20 +25,21 @@ tests: oid: 1.3.6.1.4.1.50495.1.2.1.2.1 type: ceph_default severity: critical + cluster: mycluster exp_annotations: - summary: Ceph is in the ERROR state - description: The cluster state has been HEALTH_ERROR for more than 5 minutes. Please check 'ceph health detail' for more information. + summary: Ceph is in the ERROR state on cluster mycluster + description: The cluster state has been HEALTH_ERROR for more than 5 minutes on cluster mycluster. Please check 'ceph health detail' for more information. # health warning - interval: 5m input_series: - - series: 'ceph_health_status{instance="ceph:9283",job="ceph"}' + - series: 'ceph_health_status{instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_status == 1 eval_time: 15m exp_samples: - - labels: 'ceph_health_status{instance="ceph:9283",job="ceph"}' + - labels: 'ceph_health_status{instance="ceph:9283",job="ceph",cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 10m @@ -51,45 +52,46 @@ tests: job: ceph type: ceph_default severity: warning + cluster: mycluster exp_annotations: - summary: Ceph is in the WARNING state - description: The cluster state has been HEALTH_WARN for more than 15 minutes. Please check 'ceph health detail' for more information. + summary: Ceph is in the WARNING state on cluster mycluster + description: The cluster state has been HEALTH_WARN for more than 15 minutes on cluster mycluster. Please check 'ceph health detail' for more information. # 10% OSDs down - interval: 1m input_series: - - series: 'ceph_osd_up{ceph_daemon="osd.0",instance="ceph:9283",job="ceph"}' + - series: 'ceph_osd_up{ceph_daemon="osd.0",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'ceph_osd_up{ceph_daemon="osd.1",instance="ceph:9283",job="ceph"}' + - series: 'ceph_osd_up{ceph_daemon="osd.1",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '0 0 0 0 0' - - series: 'ceph_osd_up{ceph_daemon="osd.2",instance="ceph:9283",job="ceph"}' + - series: 'ceph_osd_up{ceph_daemon="osd.2",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '1 1 1 1 1' - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.0", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", + cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",cluster="mycluster",objectstore="bluestore", + public_addr="172.20.0.2"}' values: '1 1 1 1 1' - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.1", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", + cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",cluster="mycluster",objectstore="bluestore", + public_addr="172.20.0.2"}' values: '1 1 1 1 1' - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.2", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", + cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",cluster="mycluster",objectstore="bluestore", + public_addr="172.20.0.2"}' values: '1 1 1 1 1' promql_expr_test: - - expr: count(ceph_osd_up == 0) / count(ceph_osd_up) * 100 >= 10 + - expr: count by (cluster) (ceph_osd_up == 0) / count by (cluster) (ceph_osd_up) * 100 >= 10 eval_time: 1m exp_samples: - - labels: '{}' + - labels: '{cluster="mycluster" }' value: 3.333333333333333E+01 alert_rule_test: - eval_time: 1m @@ -99,39 +101,40 @@ tests: oid: 1.3.6.1.4.1.50495.1.2.1.4.1 type: ceph_default severity: critical + cluster: mycluster exp_annotations: - summary: More than 10% of OSDs are down + summary: More than 10% of OSDs are down on cluster mycluster description: "33.33% or 1 of 3 OSDs are down (>= 10%). The following OSDs are down: - osd.1 on ceph" # flapping OSD - interval: 1s input_series: - - series: 'ceph_osd_up{ceph_daemon="osd.0",instance="ceph:9283",job="ceph"}' + - series: 'ceph_osd_up{ceph_daemon="osd.0",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '1+1x100' - - series: 'ceph_osd_up{ceph_daemon="osd.1",instance="ceph:9283",job="ceph"}' + - series: 'ceph_osd_up{ceph_daemon="osd.1",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '1+0x100' - - series: 'ceph_osd_up{ceph_daemon="osd.2",instance="ceph:9283",job="ceph"}' + - series: 'ceph_osd_up{ceph_daemon="osd.2",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '1+0x100' - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.0", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", + cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", + public_addr="172.20.0.2",cluster="mycluster"}' values: '1 1 1 1 1 1' - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.1", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", + cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", + public_addr="172.20.0.2",cluster="mycluster"}' values: '1 1 1 1 1 1' - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.2", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", + cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", + public_addr="172.20.0.2",cluster="mycluster"}' values: '1 1 1 1 1 1' promql_expr_test: - expr: | @@ -142,7 +145,7 @@ tests: eval_time: 1m exp_samples: - labels: '{ceph_daemon="osd.0", hostname="ceph", instance="ceph:9283", - job="ceph"}' + job="ceph",cluster="mycluster"}' value: 1.2200000000000001E+01 alert_rule_test: - eval_time: 5m @@ -155,54 +158,39 @@ tests: job: ceph oid: 1.3.6.1.4.1.50495.1.2.1.4.4 severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/troubleshooting/troubleshooting-osd#flapping-osds - summary: Network issues are causing OSDs to flap (mark each other down) + summary: Network issues are causing OSDs to flap (mark each other down) on cluster mycluster description: "OSD osd.0 on ceph was marked down and back up 20.1 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)." # high pg count deviation - interval: 1m input_series: - - series: 'ceph_osd_numpg{ceph_daemon="osd.0",instance="ceph:9283", - job="ceph"}' + - series: 'ceph_osd_numpg{ceph_daemon="osd.0",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '100 100 100 100 100 160' - - series: 'ceph_osd_numpg{ceph_daemon="osd.1",instance="ceph:9283", - job="ceph"}' + - series: 'ceph_osd_numpg{ceph_daemon="osd.1",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '100 100 100 100 100 320' - - series: 'ceph_osd_numpg{ceph_daemon="osd.2",instance="ceph:9283", - job="ceph"}' + - series: 'ceph_osd_numpg{ceph_daemon="osd.2",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '100 100 100 100 100 160' - - series: 'ceph_osd_numpg{ceph_daemon="osd.3",instance="ceph:9283", - job="ceph"}' + - series: 'ceph_osd_numpg{ceph_daemon="osd.3",instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '100 100 100 100 100 160' - - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.0", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.0",ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)",cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore",public_addr="172.20.0.2",cluster="mycluster"}' values: '1 1 1 1 1 1' - - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.1", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.1",ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)",cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore",public_addr="172.20.0.2",cluster="mycluster"}' values: '1 1 1 1 1 1' - - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.2", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.2",ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)",cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore",public_addr="172.20.0.2",cluster="mycluster"}' values: '1 1 1 1 1 1' - - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.3", - ceph_version="ceph version 17.0.0-189-g3558fd72 - (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)", - cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", - hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore", - public_addr="172.20.0.2"}' + - series: 'ceph_osd_metadata{back_iface="eth0",ceph_daemon="osd.3",ceph_version="ceph version 17.0.0-189-g3558fd72 + (3558fd7291855971aa6481a2ade468ad61fbb346) pacific (dev)",cluster_addr="172.20.0.2",device_class="hdd",front_iface="eth0", + hostname="ceph",instance="ceph:9283",job="ceph",objectstore="bluestore",public_addr="172.20.0.2",cluster="mycluster"}' values: '1 1 1 1 1 1' promql_expr_test: - expr: | @@ -215,8 +203,7 @@ tests: eval_time: 5m exp_samples: - - labels: '{ceph_daemon="osd.1", hostname="ceph", instance="ceph:9283", - job="ceph"}' + - labels: '{ceph_daemon="osd.1", hostname="ceph", instance="ceph:9283",job="ceph",cluster="mycluster"}' value: 6E-01 alert_rule_test: - eval_time: 10m @@ -229,44 +216,40 @@ tests: job: ceph oid: 1.3.6.1.4.1.50495.1.2.1.4.5 severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: PGs are not balanced across OSDs + summary: PGs are not balanced across OSDs on cluster mycluster description: "OSD osd.1 on ceph deviates by more than 30% from average PG count." # pgs inactive - interval: 1m input_series: - - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="device_health_metrics",pool_id="1"}' + - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph",cluster="mycluster",name="device_health_metrics",pool_id="1"}' values: '1 1 1 1 1 1 1 1' - - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="device_health_metrics",pool_id="2"}' + - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph",cluster="mycluster",name="device_health_metrics",pool_id="2"}' values: '1 1 1 1 1 1 1 1' - - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="device_health_metrics",pool_id="3"}' + - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph",cluster="mycluster",name="device_health_metrics",pool_id="3"}' values: '1 1 1 1 1 1 1 1' - - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",pool_id="1"}' + - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="1"}' values: '1 1 1 1 1 1 1 1' - - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",pool_id="2"}' + - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="2"}' values: '32 32 32 32 32 32 32 32' - - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",pool_id="3"}' + - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="3"}' values: '33 32 32 32 32 33 33 32' - - series: 'ceph_pg_active{instance="ceph:9283",job="ceph",pool_id="1"}' + - series: 'ceph_pg_active{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="1"}' values: '1 1 1 1 1 1 1 1 1' - - series: 'ceph_pg_active{instance="ceph:9283",job="ceph",pool_id="2"}' + - series: 'ceph_pg_active{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="2"}' values: '32 32 32 32 32 32 32 32' - - series: 'ceph_pg_active{instance="ceph:9283",job="ceph",pool_id="3"}' + - series: 'ceph_pg_active{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="3"}' values: '32 32 32 32 32 32 32 32' promql_expr_test: - expr: ceph_pool_metadata * on(pool_id,instance) group_left() (ceph_pg_total - ceph_pg_active) > 0 eval_time: 5m exp_samples: - - labels: '{instance="ceph:9283", job="ceph", - name="device_health_metrics", - pool_id="3"}' - value: 1 + - labels: '{instance="ceph:9283", job="ceph",cluster="mycluster",name="device_health_metrics",pool_id="3"}' + value: 1 alert_rule_test: - eval_time: 5m alertname: CephPGsInactive @@ -278,46 +261,39 @@ tests: oid: 1.3.6.1.4.1.50495.1.2.1.7.1 pool_id: 3 severity: critical + cluster: mycluster type: ceph_default exp_annotations: - summary: One or more placement groups are inactive + summary: One or more placement groups are inactive on cluster mycluster description: "1 PGs have been inactive for more than 5 minutes in pool device_health_metrics. Inactive placement groups are not able to serve read/write requests." #pgs unclean - interval: 1m input_series: - - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="device_health_metrics",pool_id="1"}' + - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph",cluster="mycluster",name="device_health_metrics",pool_id="1"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="device_health_metrics",pool_id="2"}' + - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph",cluster="mycluster",name="device_health_metrics",pool_id="2"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="device_health_metrics",pool_id="3"}' + - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph",cluster="mycluster",name="device_health_metrics",pool_id="3"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",pool_id="1"}' + - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="1"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",pool_id="2"}' - values: '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - 32 32 32' - - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",pool_id="3"}' - values: '33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 - 33 33' - - series: 'ceph_pg_clean{instance="ceph:9283",job="ceph",pool_id="1"}' + - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="2"}' + values: '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + - series: 'ceph_pg_total{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="3"}' + values: '33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33' + - series: 'ceph_pg_clean{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="1"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_pg_clean{instance="ceph:9283",job="ceph",pool_id="2"}' - values: '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - 32 32' - - series: 'ceph_pg_clean{instance="ceph:9283",job="ceph",pool_id="3"}' - values: '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - 32 32' + - series: 'ceph_pg_clean{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="2"}' + values: '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + - series: 'ceph_pg_clean{instance="ceph:9283",job="ceph",cluster="mycluster",pool_id="3"}' + values: '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' promql_expr_test: - expr: ceph_pool_metadata * on(pool_id,instance) group_left() (ceph_pg_total - ceph_pg_clean) > 0 eval_time: 15m exp_samples: - - labels: '{instance="ceph:9283", job="ceph", - name="device_health_metrics", pool_id="3"}' + - labels: '{instance="ceph:9283", job="ceph",cluster="mycluster",name="device_health_metrics", pool_id="3"}' value: 1 alert_rule_test: - eval_time: 16m @@ -330,32 +306,33 @@ tests: oid: 1.3.6.1.4.1.50495.1.2.1.7.2 pool_id: 3 severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: One or more placement groups are marked unclean + summary: One or more placement groups are marked unclean on cluster mycluster description: "1 PGs have been unclean for more than 15 minutes in pool device_health_metrics. Unclean PGs have not recovered from a previous failure." # root volume full - interval: 1m input_series: - series: 'node_filesystem_avail_bytes{device="/dev/mapper/fedora_localhost - --live-home",fstype="ext4",instance="node-exporter",job="node-exporter", - mountpoint="/"}' + --live-home",fstype="ext4",instance="node-exporter",job="node-exporter", + mountpoint="/"}' values: '35336400896 35336400896 35336400896 35336400896 35336400896 - 3525385519.104 3533640089' + 3525385519.104 3533640089' - series: 'node_filesystem_size_bytes{device="/dev/mapper/fedora_localhost - --live-home",fstype="ext4",instance="node-exporter",job="node-exporter", - mountpoint="/"}' + --live-home",fstype="ext4",instance="node-exporter",job="node-exporter", + mountpoint="/"}' values: '73445531648 73445531648 73445531648 73445531648 73445531648 - 73445531648 73445531648' + 73445531648 73445531648' promql_expr_test: - expr: node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"} * 100 < 5 eval_time: 5m exp_samples: - labels: '{device="/dev/mapper/fedora_localhost --live-home", - fstype="ext4", instance="node-exporter", job="node-exporter", - mountpoint="/"}' + fstype="ext4", instance="node-exporter", job="node-exporter", + mountpoint="/"}' value: 4.8E+00 alert_rule_test: - eval_time: 10m @@ -377,17 +354,13 @@ tests: # network packets dropped - interval: 1m input_series: - - series: 'node_network_receive_drop_total{device="eth0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_network_receive_drop_total{device="eth0",instance="node-exporter",job="node-exporter"}' values: '0+600x10' - - series: 'node_network_transmit_drop_total{device="eth0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_network_transmit_drop_total{device="eth0",instance="node-exporter",job="node-exporter"}' values: '0+600x10' - - series: 'node_network_receive_packets_total{device="eth0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_network_receive_packets_total{device="eth0",instance="node-exporter",job="node-exporter"}' values: '0+750x10' - - series: 'node_network_transmit_packets_total{device="eth0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_network_transmit_packets_total{device="eth0",instance="node-exporter",job="node-exporter"}' values: '0+750x10' promql_expr_test: - expr: | @@ -404,8 +377,7 @@ tests: eval_time: 5m exp_samples: - - labels: '{device="eth0", instance="node-exporter", - job="node-exporter"}' + - labels: '{device="eth0", instance="node-exporter",job="node-exporter"}' value: 8E-1 alert_rule_test: - eval_time: 5m @@ -425,17 +397,13 @@ tests: # network packets errors - interval: 1m input_series: - - series: 'node_network_receive_errs_total{device="eth0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_network_receive_errs_total{device="eth0",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '0+600x10' - - series: 'node_network_transmit_errs_total{device="eth0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_network_transmit_errs_total{device="eth0",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '0+600x10' - - series: 'node_network_transmit_packets_total{device="eth0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_network_transmit_packets_total{device="eth0",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '0+750x10' - - series: 'node_network_receive_packets_total{device="eth0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_network_receive_packets_total{device="eth0",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '0+750x10' promql_expr_test: - expr: | @@ -452,8 +420,7 @@ tests: eval_time: 5m exp_samples: - - labels: '{device="eth0", instance="node-exporter", - job="node-exporter"}' + - labels: '{device="eth0", instance="node-exporter",job="node-exporter",cluster="mycluster"}' value: 8E-01 alert_rule_test: - eval_time: 5m @@ -466,26 +433,24 @@ tests: oid: 1.3.6.1.4.1.50495.1.2.1.8.3 severity: warning type: ceph_default - exp_annotations: - summary: One or more NICs reports packet errors + cluster: mycluster + exp_annotations: + summary: One or more NICs reports packet errors on cluster mycluster description: "Node node-exporter experiences packet errors > 0.01% or > 10 packets/s on interface eth0." # Bond is missing a peer - interval: 1m input_series: - - series: 'node_bonding_active{master="bond0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_bonding_active{master="bond0",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '3' - - series: 'node_bonding_slaves{master="bond0", - instance="node-exporter",job="node-exporter"}' + - series: 'node_bonding_slaves{master="bond0",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '4' promql_expr_test: - expr: | node_bonding_slaves - node_bonding_active != 0 eval_time: 5m exp_samples: - - labels: '{master="bond0", instance="node-exporter", - job="node-exporter"}' + - labels: '{master="bond0", instance="node-exporter",job="node-exporter",cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 5m @@ -497,23 +462,22 @@ tests: job: node-exporter severity: warning type: ceph_default + cluster: mycluster exp_annotations: - summary: Degraded Bond on Node node-exporter + summary: Degraded Bond on Node node-exporter on cluster mycluster description: "Bond bond0 is degraded on Node node-exporter." # Node Storage disk space filling up - interval: 1m # 20GB = 21474836480, 256MB = 268435456 input_series: - - series: 'node_filesystem_free_bytes{device="/dev/mapper/vg-root", - fstype="xfs",instance="node-1",mountpoint="/rootfs"}' + - series: 'node_filesystem_free_bytes{device="/dev/mapper/vg-root",fstype="xfs",instance="node-1",mountpoint="/rootfs",cluster="mycluster"}' values: '21474836480-268435456x48' - - series: 'node_filesystem_free_bytes{device="/dev/mapper/vg-root", - fstype="xfs",instance="node-2",mountpoint="/rootfs"}' + - series: 'node_filesystem_free_bytes{device="/dev/mapper/vg-root",fstype="xfs",instance="node-2",mountpoint="/rootfs",cluster="mycluster"}' values: '21474836480+0x48' - - series: 'node_uname_info{instance="node-1", nodename="node-1.unittests.com"}' + - series: 'node_uname_info{instance="node-1", nodename="node-1.unittests.com",cluster="mycluster"}' values: 1+0x48 - - series: 'node_uname_info{instance="node-2", nodename="node-2.unittests.com"}' + - series: 'node_uname_info{instance="node-2", nodename="node-2.unittests.com",cluster="mycluster"}' values: 1+0x48 promql_expr_test: - expr: | @@ -521,8 +485,7 @@ tests: on(instance) group_left(nodename) node_uname_info < 0 eval_time: 5m exp_samples: - - labels: '{device="/dev/mapper/vg-root",instance="node-1",fstype="xfs", - mountpoint="/rootfs",nodename="node-1.unittests.com"}' + - labels: '{device="/dev/mapper/vg-root",instance="node-1",fstype="xfs",mountpoint="/rootfs",nodename="node-1.unittests.com",cluster="mycluster"}' value: -1.912602624E+12 alert_rule_test: - eval_time: 5m @@ -537,72 +500,60 @@ tests: instance: node-1 mountpoint: /rootfs nodename: node-1.unittests.com + cluster: mycluster exp_annotations: - summary: Host filesystem free space is getting low + summary: Host filesystem free space is getting low on cluster mycluster description: "Mountpoint /rootfs on node-1.unittests.com will be full in less than 5 days based on the 48 hour trailing fill rate." + # MTU Mismatch - interval: 1m input_series: - - series: 'node_network_mtu_bytes{device="eth0",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_mtu_bytes{device="eth0",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '1500 1500 1500 1500 1500' - - series: 'node_network_mtu_bytes{device="eth1",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_mtu_bytes{device="eth1",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '1500 1500 1500 1500 1500' - - series: 'node_network_mtu_bytes{device="eth2",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_mtu_bytes{device="eth2",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '1500 1500 1500 1500 1500' - - series: 'node_network_mtu_bytes{device="eth3",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_mtu_bytes{device="eth3",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '1500 1500 1500 1500 1500' - - series: 'node_network_mtu_bytes{device="eth4",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_mtu_bytes{device="eth4",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '9000 9000 9000 9000 9000' - - series: 'node_network_mtu_bytes{device="eth4",instance="hostname1", - job="node-exporter"}' + - series: 'node_network_mtu_bytes{device="eth4",instance="hostname1",job="node-exporter",cluster="mycluster"}' values: '2200 2200 2200 2200 2200' - - series: 'node_network_mtu_bytes{device="eth4",instance="hostname2", - job="node-exporter"}' + - series: 'node_network_mtu_bytes{device="eth4",instance="hostname2",job="node-exporter",cluster="mycluster"}' values: '2400 2400 2400 2400 2400' - - series: 'node_network_up{device="eth0",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_up{device="eth0",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '0 0 0 0 0' - - series: 'node_network_up{device="eth1",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_up{device="eth1",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '0 0 0 0 0' - - series: 'node_network_up{device="eth2",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_up{device="eth2",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'node_network_up{device="eth3",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_up{device="eth3",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'node_network_up{device="eth4",instance="node-exporter", - job="node-exporter"}' + - series: 'node_network_up{device="eth4",instance="node-exporter",job="node-exporter",cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'node_network_up{device="eth4",instance="hostname1", - job="node-exporter"}' + - series: 'node_network_up{device="eth4",instance="hostname1",job="node-exporter",cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'node_network_up{device="eth4",instance="hostname2", - job="node-exporter"}' + - series: 'node_network_up{device="eth4",instance="hostname2",job="node-exporter",cluster="mycluster"}' values: '0 0 0 0 0' promql_expr_test: - 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)) + max by (cluster,device) (node_network_mtu_bytes * (node_network_up{device!="lo"} > 0)) != + quantile by (cluster,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)) + min by (cluster,device) (node_network_mtu_bytes * (node_network_up{device!="lo"} > 0)) != + quantile by (cluster,device) (.5, node_network_mtu_bytes * (node_network_up{device!="lo"} > 0)) ) eval_time: 1m exp_samples: - - labels: '{device="eth4", instance="node-exporter", job="node-exporter"}' + - labels: '{device="eth4", instance="node-exporter", job="node-exporter", cluster="mycluster"}' value: 9000 - - labels: '{device="eth4", instance="hostname1", job="node-exporter"}' + - labels: '{device="eth4", instance="hostname1", job="node-exporter", cluster="mycluster"}' value: 2200 alert_rule_test: - eval_time: 1m @@ -614,8 +565,9 @@ tests: job: node-exporter severity: warning type: ceph_default + cluster: "mycluster" exp_annotations: - summary: MTU settings across Ceph hosts are inconsistent + summary: MTU settings across Ceph hosts are inconsistent on cluster mycluster description: "Node hostname1 has a different MTU size (2200) than the median of devices named eth4." - exp_labels: device: eth4 @@ -623,51 +575,52 @@ tests: job: node-exporter severity: warning type: ceph_default + cluster: "mycluster" exp_annotations: - summary: MTU settings across Ceph hosts are inconsistent + summary: MTU settings across Ceph hosts are inconsistent on cluster mycluster description: "Node node-exporter has a different MTU size (9000) than the median of devices named eth4." # pool full, data series has 6 but using topk(5) so to ensure the # results are working as expected - interval: 1m input_series: - - series: 'ceph_health_detail{name="POOL_FULL"}' + - series: 'ceph_health_detail{name="POOL_FULL", cluster="mycluster"}' values: '0 0 0 1 1 1 1 1 1 1 1' - - series: 'ceph_pool_percent_used{pool_id="1"}' + - series: 'ceph_pool_percent_used{pool_id="1", cluster="mycluster"}' values: '32+0x10' - - series: 'ceph_pool_percent_used{pool_id="2"}' + - series: 'ceph_pool_percent_used{pool_id="2", cluster="mycluster"}' values: '96+0x10' - - series: 'ceph_pool_percent_used{pool_id="3"}' + - series: 'ceph_pool_percent_used{pool_id="3", cluster="mycluster"}' values: '90+0x10' - - series: 'ceph_pool_percent_used{pool_id="4"}' + - series: 'ceph_pool_percent_used{pool_id="4", cluster="mycluster"}' values: '72+0x10' - - series: 'ceph_pool_percent_used{pool_id="5"}' + - series: 'ceph_pool_percent_used{pool_id="5", cluster="mycluster"}' values: '19+0x10' - - series: 'ceph_pool_percent_used{pool_id="6"}' + - series: 'ceph_pool_percent_used{pool_id="6", cluster="mycluster"}' values: '10+0x10' - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="cephfs_data",pool_id="1"}' + name="cephfs_data",pool_id="1", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1' - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="rbd",pool_id="2"}' + name="rbd",pool_id="2", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1' - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="iscsi",pool_id="3"}' + name="iscsi",pool_id="3", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1' - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="default.rgw.index",pool_id="4"}' + name="default.rgw.index",pool_id="4", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1' - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="default.rgw.log",pool_id="5"}' + name="default.rgw.log",pool_id="5", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1' - series: 'ceph_pool_metadata{instance="ceph:9283",job="ceph", - name="dummy",pool_id="6"}' + name="dummy",pool_id="6", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="POOL_FULL"} > 0 eval_time: 5m exp_samples: - - labels: '{__name__="ceph_health_detail", name="POOL_FULL"}' + - labels: '{__name__="ceph_health_detail", name="POOL_FULL", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -678,23 +631,24 @@ tests: - exp_labels: name: POOL_FULL severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.9.1 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#pool-full - summary: Pool is full - writes are blocked + summary: Pool is full - writes are blocked on cluster mycluster 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) - rbd at 96% - iscsi at 90% - default.rgw.index at 72% - cephfs_data at 32% - default.rgw.log at 19% 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>)" + # slow OSD ops - interval : 1m input_series: - - series: 'ceph_healthcheck_slow_ops{instance="ceph:9283",job="ceph"}' + - series: 'ceph_healthcheck_slow_ops{instance="ceph:9283",job="ceph",cluster="mycluster"}' values: '1+0x120' promql_expr_test: - expr: ceph_healthcheck_slow_ops > 0 eval_time: 1m exp_samples: - - labels: '{__name__="ceph_healthcheck_slow_ops", instance="ceph:9283", - job="ceph"}' + - labels: '{__name__="ceph_healthcheck_slow_ops", instance="ceph:9283",job="ceph",cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 20m @@ -704,23 +658,23 @@ tests: instance: ceph:9283 job: ceph severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#slow-ops - summary: OSD operations are slow to complete + summary: OSD operations are slow to complete on cluster mycluster description: "1 OSD requests are taking too long to process (osd_op_complaint_time exceeded)" # slow daemon ops - interval : 1m input_series: - - series: 'ceph_daemon_health_metrics{ceph_daemon="osd.1", instance="ceph:9283",job="ceph", type="SLOW_OPS"}' + - series: 'ceph_daemon_health_metrics{ceph_daemon="osd.1", instance="ceph:9283", job="ceph", type="SLOW_OPS", cluster="mycluster"}' values: '1+0x120' promql_expr_test: - expr: 'ceph_daemon_health_metrics{type="SLOW_OPS"} > 0' eval_time: 1m exp_samples: - - labels: '{__name__="ceph_daemon_health_metrics", ceph_daemon="osd.1",instance="ceph:9283", - job="ceph", type="SLOW_OPS"}' + - labels: '{__name__="ceph_daemon_health_metrics", ceph_daemon="osd.1", instance="ceph:9283", cluster="mycluster",job="ceph", type="SLOW_OPS"}' value: 1 alert_rule_test: - eval_time: 20m @@ -731,22 +685,23 @@ tests: ceph_daemon: "osd.1" job: ceph severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#slow-ops - summary: osd.1 operations are slow to complete + summary: osd.1 operations are slow to complete on cluster mycluster description: "osd.1 operations are taking too long to process (complaint time exceeded)" # CEPHADM orchestrator alert triggers - interval: 30s input_series: - - series: 'ceph_health_detail{name="UPGRADE_EXCEPTION"}' + - series: 'ceph_health_detail{name="UPGRADE_EXCEPTION", cluster="mycluster"}' values: '1+0x40' promql_expr_test: - expr: ceph_health_detail{name="UPGRADE_EXCEPTION"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="UPGRADE_EXCEPTION"}' + - labels: '{__name__="ceph_health_detail", name="UPGRADE_EXCEPTION", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -757,20 +712,21 @@ tests: - exp_labels: name: UPGRADE_EXCEPTION severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.11.2 exp_annotations: - summary: Ceph version upgrade has failed + summary: Ceph version upgrade has failed on cluster mycluster description: "The cephadm cluster upgrade process has failed. The cluster remains in an undetermined state. Please review the cephadm logs, to understand the nature of the issue" - interval: 30s input_series: - - series: 'ceph_health_detail{name="CEPHADM_FAILED_DAEMON"}' + - series: 'ceph_health_detail{name="CEPHADM_FAILED_DAEMON", cluster="mycluster"}' values: '1+0x40' promql_expr_test: - expr: ceph_health_detail{name="CEPHADM_FAILED_DAEMON"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="CEPHADM_FAILED_DAEMON"}' + - labels: '{__name__="ceph_health_detail", name="CEPHADM_FAILED_DAEMON", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -781,20 +737,21 @@ tests: - exp_labels: name: CEPHADM_FAILED_DAEMON severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.11.1 exp_annotations: - summary: A ceph daemon managed by cephadm is down + summary: A ceph daemon managed by cephadm is down on cluster mycluster description: "A daemon managed by cephadm is no longer active. Determine, which daemon is down with 'ceph health detail'. you may start daemons with the 'ceph orch daemon start <daemon_id>'" - interval: 1m input_series: - - series: 'ceph_health_detail{name="CEPHADM_PAUSED"}' + - series: 'ceph_health_detail{name="CEPHADM_PAUSED", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="CEPHADM_PAUSED"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="CEPHADM_PAUSED"}' + - labels: '{__name__="ceph_health_detail", name="CEPHADM_PAUSED", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -805,21 +762,23 @@ tests: - exp_labels: name: CEPHADM_PAUSED severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/cephadm/operations#cephadm-paused - summary: Orchestration tasks via cephadm are PAUSED + summary: Orchestration tasks via cephadm are PAUSED on cluster mycluster description: "Cluster management has been paused manually. This will prevent the orchestrator from service management and reconciliation. If this is not intentional, resume cephadm operations with 'ceph orch resume'" + # MDS - interval: 1m input_series: - - series: 'ceph_health_detail{name="MDS_DAMAGE"}' + - series: 'ceph_health_detail{name="MDS_DAMAGE", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="MDS_DAMAGE"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="MDS_DAMAGE"}' + - labels: '{__name__="ceph_health_detail", name="MDS_DAMAGE", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -830,21 +789,22 @@ tests: - exp_labels: name: MDS_DAMAGE severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.5.1 exp_annotations: documentation: https://docs.ceph.com/en/latest/cephfs/health-messages#cephfs-health-messages - summary: CephFS filesystem is damaged. + summary: CephFS filesystem is damaged on cluster mycluster description: "Filesystem metadata has been corrupted. Data may be inaccessible. Analyze metrics from the MDS daemon admin socket, or escalate to support." - interval: 1m input_series: - - series: 'ceph_health_detail{name="MDS_HEALTH_READ_ONLY"}' + - series: 'ceph_health_detail{name="MDS_HEALTH_READ_ONLY", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="MDS_HEALTH_READ_ONLY"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="MDS_HEALTH_READ_ONLY"}' + - labels: '{__name__="ceph_health_detail", name="MDS_HEALTH_READ_ONLY", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -855,21 +815,22 @@ tests: - exp_labels: name: MDS_HEALTH_READ_ONLY severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.5.2 exp_annotations: documentation: https://docs.ceph.com/en/latest/cephfs/health-messages#cephfs-health-messages - summary: CephFS filesystem in read only mode due to write error(s) + summary: CephFS filesystem in read only mode due to write error(s) on cluster mycluster 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." - interval: 1m input_series: - - series: 'ceph_health_detail{name="MDS_ALL_DOWN"}' + - series: 'ceph_health_detail{name="MDS_ALL_DOWN", cluster="mycluster"}' values: '0 0 1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="MDS_ALL_DOWN"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="MDS_ALL_DOWN"}' + - labels: '{__name__="ceph_health_detail", name="MDS_ALL_DOWN", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -880,21 +841,22 @@ tests: - exp_labels: name: MDS_ALL_DOWN severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.5.3 exp_annotations: documentation: https://docs.ceph.com/en/latest/cephfs/health-messages/#mds-all-down - summary: CephFS filesystem is offline + summary: CephFS filesystem is offline on cluster mycluster description: "All MDS ranks are unavailable. The MDS daemons managing metadata are down, rendering the filesystem offline." - interval: 1m input_series: - - series: 'ceph_health_detail{name="FS_DEGRADED"}' + - series: 'ceph_health_detail{name="FS_DEGRADED", cluster="mycluster"}' values: '0 0 1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="FS_DEGRADED"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="FS_DEGRADED"}' + - labels: '{__name__="ceph_health_detail", name="FS_DEGRADED", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -905,21 +867,22 @@ tests: - exp_labels: name: FS_DEGRADED severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.5.4 exp_annotations: documentation: https://docs.ceph.com/en/latest/cephfs/health-messages/#fs-degraded - summary: CephFS filesystem is degraded + summary: CephFS filesystem is degraded on cluster mycluster 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." - interval: 1m input_series: - - series: 'ceph_health_detail{name="MDS_INSUFFICIENT_STANDBY"}' + - series: 'ceph_health_detail{name="MDS_INSUFFICIENT_STANDBY", cluster="mycluster"}' values: '0 0 1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="MDS_INSUFFICIENT_STANDBY"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="MDS_INSUFFICIENT_STANDBY"}' + - labels: '{__name__="ceph_health_detail", name="MDS_INSUFFICIENT_STANDBY", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -930,20 +893,21 @@ tests: - exp_labels: name: MDS_INSUFFICIENT_STANDBY severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/cephfs/health-messages/#mds-insufficient-standby - summary: Ceph filesystem standby daemons too few + summary: Ceph filesystem standby daemons too few on cluster mycluster 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." - interval: 1m input_series: - - series: 'ceph_health_detail{name="FS_WITH_FAILED_MDS"}' + - series: 'ceph_health_detail{name="FS_WITH_FAILED_MDS", cluster="mycluster"}' values: '0 0 1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="FS_WITH_FAILED_MDS"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="FS_WITH_FAILED_MDS"}' + - labels: '{__name__="ceph_health_detail", name="FS_WITH_FAILED_MDS", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -954,21 +918,22 @@ tests: - exp_labels: name: FS_WITH_FAILED_MDS severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.5.5 exp_annotations: documentation: https://docs.ceph.com/en/latest/cephfs/health-messages/#fs-with-failed-mds - summary: MDS daemon failed, no further standby available + summary: MDS daemon failed, no further standby available on cluster mycluster 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." - interval: 1m input_series: - - series: 'ceph_health_detail{name="MDS_UP_LESS_THAN_MAX"}' + - series: 'ceph_health_detail{name="MDS_UP_LESS_THAN_MAX", cluster="mycluster"}' values: '0 0 1 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="MDS_UP_LESS_THAN_MAX"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="MDS_UP_LESS_THAN_MAX"}' + - labels: '{__name__="ceph_health_detail", name="MDS_UP_LESS_THAN_MAX", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -979,10 +944,11 @@ tests: - exp_labels: name: MDS_UP_LESS_THAN_MAX severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/cephfs/health-messages/#mds-up-less-than-max - summary: Ceph MDS daemon count is lower than configured + summary: Ceph MDS daemon count is lower than configured on cluster mycluster 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." # MGR - interval: 1m @@ -1012,13 +978,13 @@ tests: description: "The mgr/prometheus module at ceph-mgr:9283 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'." - interval: 1m input_series: - - series: 'ceph_health_detail{name="RECENT_MGR_MODULE_CRASH"}' + - series: 'ceph_health_detail{name="RECENT_MGR_MODULE_CRASH", cluster="mycluster"}' values: '0+0x2 1+0x20' promql_expr_test: - expr: ceph_health_detail{name="RECENT_MGR_MODULE_CRASH"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="RECENT_MGR_MODULE_CRASH"}' + - labels: '{__name__="ceph_health_detail", name="RECENT_MGR_MODULE_CRASH", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1029,24 +995,26 @@ tests: - exp_labels: name: RECENT_MGR_MODULE_CRASH severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.6.1 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#recent-mgr-module-crash - summary: A manager module has recently crashed + summary: A manager module has recently crashed on cluster mycluster 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." + # MON - interval: 1m input_series: - - series: 'ceph_health_detail{name="MON_DISK_CRIT"}' + - series: 'ceph_health_detail{name="MON_DISK_CRIT", cluster="mycluster"}' values: '0+0x2 1+0x10' - - series: 'ceph_mon_metadata{ceph_daemon="mon.a", hostname="ceph-mon-a"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.a", hostname="ceph-mon-a", cluster="mycluster"}' values: '1+0x13' promql_expr_test: - expr: ceph_health_detail{name="MON_DISK_CRIT"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="MON_DISK_CRIT"}' + - labels: '{__name__="ceph_health_detail", name="MON_DISK_CRIT", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1057,23 +1025,24 @@ tests: - exp_labels: name: "MON_DISK_CRIT" severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.3.2 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-disk-crit - summary: Filesystem space on at least one monitor is critically low + summary: Filesystem space on at least one monitor is critically low on cluster mycluster 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; - ceph-mon-a" - interval: 1m input_series: - - series: 'ceph_health_detail{name="MON_DISK_LOW"}' + - series: 'ceph_health_detail{name="MON_DISK_LOW", cluster="mycluster"}' values: '0+0x2 1+0x10' - - series: 'ceph_mon_metadata{ceph_daemon="mon.a", hostname="ceph-mon-a"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.a", hostname="ceph-mon-a", cluster="mycluster"}' values: '1+0x13' promql_expr_test: - expr: ceph_health_detail{name="MON_DISK_LOW"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="MON_DISK_LOW"}' + - labels: '{__name__="ceph_health_detail", name="MON_DISK_LOW", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1084,20 +1053,21 @@ tests: - exp_labels: name: "MON_DISK_LOW" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-disk-low - summary: Drive space on at least one monitor is approaching full + summary: Drive space on at least one monitor is approaching full on cluster mycluster 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; - ceph-mon-a" - interval: 1m input_series: - - series: 'ceph_health_detail{name="MON_CLOCK_SKEW"}' + - series: 'ceph_health_detail{name="MON_CLOCK_SKEW", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="MON_CLOCK_SKEW"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="MON_CLOCK_SKEW"}' + - labels: '{__name__="ceph_health_detail", name="MON_CLOCK_SKEW", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1108,34 +1078,35 @@ tests: - exp_labels: name: "MON_CLOCK_SKEW" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-clock-skew - summary: Clock skew detected among monitors + summary: Clock skew detected among monitors on cluster mycluster 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." # Check 3 mons one down, quorum at risk - interval: 1m input_series: - - series: 'ceph_health_detail{name="MON_DOWN"}' + - series: 'ceph_health_detail{name="MON_DOWN", cluster="mycluster"}' values: '0+0x2 1+0x12' - - series: 'ceph_mon_quorum_status{ceph_daemon="mon.a"}' + - series: 'ceph_mon_quorum_status{ceph_daemon="mon.a", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_quorum_status{ceph_daemon="mon.b"}' + - series: 'ceph_mon_quorum_status{ceph_daemon="mon.b", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_quorum_status{ceph_daemon="mon.c"}' + - series: 'ceph_mon_quorum_status{ceph_daemon="mon.c", cluster="mycluster"}' values: '1+0x2 0+0x12' - - series: 'ceph_mon_metadata{ceph_daemon="mon.a", hostname="ceph-mon-1"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.a", hostname="ceph-mon-1", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_metadata{ceph_daemon="mon.b", hostname="ceph-mon-2"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.b", hostname="ceph-mon-2", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_metadata{ceph_daemon="mon.c", hostname="ceph-mon-3"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.c", hostname="ceph-mon-3", cluster="mycluster"}' values: '1+0x14' promql_expr_test: - - expr: ((ceph_health_detail{name="MON_DOWN"} == 1) * on() (count(ceph_mon_quorum_status == 1) == bool (floor(count(ceph_mon_metadata) / 2) + 1))) == 1 + - expr: ((ceph_health_detail{name="MON_DOWN"} == 1) * on() group_right(cluster) (count(ceph_mon_quorum_status == 1) by (cluster) == bool (floor(count(ceph_mon_metadata) by (cluster) / 2) + 1))) == 1 eval_time: 3m exp_samples: - - labels: '{}' + - labels: '{cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1146,40 +1117,41 @@ tests: exp_alerts: - exp_labels: severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.3.1 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-down - summary: Monitor quorum is at risk + summary: Monitor quorum is at risk on cluster mycluster description: "Quorum requires a majority of monitors (x 2) to be active. Without quorum the cluster will become inoperable, affecting all services and connected clients. The following monitors are down: - mon.c on ceph-mon-3" # check 5 mons, 1 down - warning only - interval: 1m input_series: - - series: 'ceph_mon_quorum_status{ceph_daemon="mon.a"}' + - series: 'ceph_mon_quorum_status{ceph_daemon="mon.a", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_quorum_status{ceph_daemon="mon.b"}' + - series: 'ceph_mon_quorum_status{ceph_daemon="mon.b", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_quorum_status{ceph_daemon="mon.c"}' + - series: 'ceph_mon_quorum_status{ceph_daemon="mon.c", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_quorum_status{ceph_daemon="mon.d"}' + - series: 'ceph_mon_quorum_status{ceph_daemon="mon.d", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_quorum_status{ceph_daemon="mon.e"}' + - series: 'ceph_mon_quorum_status{ceph_daemon="mon.e", cluster="mycluster"}' values: '1+0x2 0+0x12' - - series: 'ceph_mon_metadata{ceph_daemon="mon.a", hostname="ceph-mon-1"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.a", hostname="ceph-mon-1", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_metadata{ceph_daemon="mon.b", hostname="ceph-mon-2"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.b", hostname="ceph-mon-2", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_metadata{ceph_daemon="mon.c", hostname="ceph-mon-3"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.c", hostname="ceph-mon-3", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_metadata{ceph_daemon="mon.d", hostname="ceph-mon-4"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.d", hostname="ceph-mon-4", cluster="mycluster"}' values: '1+0x14' - - series: 'ceph_mon_metadata{ceph_daemon="mon.e", hostname="ceph-mon-5"}' + - series: 'ceph_mon_metadata{ceph_daemon="mon.e", hostname="ceph-mon-5", cluster="mycluster"}' values: '1+0x14' promql_expr_test: - - expr: (count(ceph_mon_quorum_status == 0) <= (count(ceph_mon_metadata) - floor(count(ceph_mon_metadata) / 2) + 1)) + - expr: (count by (cluster) (ceph_mon_quorum_status == 0)) <= (count by (cluster) (ceph_mon_metadata) - floor((count by (cluster) (ceph_mon_metadata) / 2 + 1))) eval_time: 3m exp_samples: - - labels: '{}' + - labels: '{cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1189,21 +1161,23 @@ tests: exp_alerts: - exp_labels: severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#mon-down - summary: One or more monitors down - description: "You have 1 monitor down. Quorum is still intact, but the loss of an additional monitor will make your cluster inoperable. The following monitors are down: - mon.e on ceph-mon-5\n" + summary: One or more monitors down on cluster mycluster + description: "You have 1 monitor down. Quorum is still intact, but the loss of an additional monitor will make your cluster inoperable. The following monitors are down: - mon.e on ceph-mon-5" + # Device Health - interval: 1m input_series: - - series: 'ceph_health_detail{name="DEVICE_HEALTH"}' + - series: 'ceph_health_detail{name="DEVICE_HEALTH", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="DEVICE_HEALTH"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="DEVICE_HEALTH"}' + - labels: '{__name__="ceph_health_detail", name="DEVICE_HEALTH", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1214,20 +1188,21 @@ tests: - exp_labels: name: "DEVICE_HEALTH" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#id2 - summary: Device(s) predicted to fail soon + summary: Device(s) predicted to fail soon on cluster mycluster 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." - interval: 1m input_series: - - series: 'ceph_health_detail{name="DEVICE_HEALTH_TOOMANY"}' + - series: 'ceph_health_detail{name="DEVICE_HEALTH_TOOMANY", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="DEVICE_HEALTH_TOOMANY"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="DEVICE_HEALTH_TOOMANY"}' + - labels: '{__name__="ceph_health_detail", name="DEVICE_HEALTH_TOOMANY", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1238,21 +1213,22 @@ tests: - exp_labels: name: "DEVICE_HEALTH_TOOMANY" severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.4.7 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#device-health-toomany - summary: Too many devices are predicted to fail, unable to resolve + summary: Too many devices are predicted to fail on cluster mycluster, unable to resolve 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 availability. Prevent data integrity issues by adding new OSDs so that data may be relocated." - interval: 1m input_series: - - series: 'ceph_health_detail{name="DEVICE_HEALTH_IN_USE"}' + - series: 'ceph_health_detail{name="DEVICE_HEALTH_IN_USE", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="DEVICE_HEALTH_IN_USE"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="DEVICE_HEALTH_IN_USE"}' + - labels: '{__name__="ceph_health_detail", name="DEVICE_HEALTH_IN_USE", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1263,25 +1239,27 @@ tests: - exp_labels: name: "DEVICE_HEALTH_IN_USE" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#device-health-in-use - summary: Device failure is predicted, but unable to relocate data + summary: Device failure is predicted, but unable to relocate data on cluster mycluster 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." + # OSD - interval: 1m input_series: - - series: 'ceph_health_detail{name="OSD_HOST_DOWN"}' + - series: 'ceph_health_detail{name="OSD_HOST_DOWN", cluster="mycluster"}' values: '0+0x2 1+0x10' - - series: 'ceph_osd_up{ceph_daemon="osd.0"}' + - series: 'ceph_osd_up{ceph_daemon="osd.0", cluster="mycluster"}' values: '1+0x2 0+0x10' - - series: 'ceph_osd_metadata{ceph_daemon="osd.0", hostname="ceph-osd-1"}' + - series: 'ceph_osd_metadata{ceph_daemon="osd.0", hostname="ceph-osd-1", cluster="mycluster"}' values: '1+0x12' promql_expr_test: - expr: ceph_health_detail{name="OSD_HOST_DOWN"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="OSD_HOST_DOWN"}' + - labels: '{__name__="ceph_health_detail", name="OSD_HOST_DOWN", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1292,20 +1270,21 @@ tests: - exp_labels: name: "OSD_HOST_DOWN" severity: warning + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.4.8 exp_annotations: - summary: An OSD host is offline + summary: An OSD host is offline on cluster mycluster description: "The following OSDs are down: - ceph-osd-1 : osd.0" - interval: 1m input_series: - - series: 'ceph_health_detail{name="OSD_SLOW_PING_TIME_FRONT"}' + - series: 'ceph_health_detail{name="OSD_SLOW_PING_TIME_FRONT", cluster="mycluster"}' values: '0+0x2 1+0x20' promql_expr_test: - expr: ceph_health_detail{name="OSD_SLOW_PING_TIME_FRONT"} == 0 eval_time: 1m exp_samples: - - labels: '{__name__="ceph_health_detail", name="OSD_SLOW_PING_TIME_FRONT"}' + - labels: '{__name__="ceph_health_detail", name="OSD_SLOW_PING_TIME_FRONT", cluster="mycluster"}' value: 0 alert_rule_test: - eval_time: 1m @@ -1316,19 +1295,20 @@ tests: - exp_labels: name: "OSD_SLOW_PING_TIME_FRONT" severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: Network issues delaying OSD heartbeats (public network) + summary: Network issues delaying OSD heartbeats (public network) on cluster mycluster 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." - interval: 1m input_series: - - series: 'ceph_health_detail{name="OSD_SLOW_PING_TIME_BACK"}' + - series: 'ceph_health_detail{name="OSD_SLOW_PING_TIME_BACK", cluster="mycluster"}' values: '0+0x2 1+0x20' promql_expr_test: - expr: ceph_health_detail{name="OSD_SLOW_PING_TIME_BACK"} == 0 eval_time: 1m exp_samples: - - labels: '{__name__="ceph_health_detail", name="OSD_SLOW_PING_TIME_BACK"}' + - labels: '{__name__="ceph_health_detail", name="OSD_SLOW_PING_TIME_BACK", cluster="mycluster"}' value: 0 alert_rule_test: - eval_time: 1m @@ -1339,19 +1319,20 @@ tests: - exp_labels: name: "OSD_SLOW_PING_TIME_BACK" severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: Network issues delaying OSD heartbeats (cluster network) + summary: Network issues delaying OSD heartbeats (cluster network) on cluster mycluster 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." - interval: 1m input_series: - - series: 'ceph_health_detail{name="BLUESTORE_DISK_SIZE_MISMATCH"}' + - series: 'ceph_health_detail{name="BLUESTORE_DISK_SIZE_MISMATCH", cluster="mycluster"}' values: '0+0x2 1+0x20' promql_expr_test: - expr: ceph_health_detail{name="BLUESTORE_DISK_SIZE_MISMATCH"} == 0 eval_time: 1m exp_samples: - - labels: '{__name__="ceph_health_detail", name="BLUESTORE_DISK_SIZE_MISMATCH"}' + - labels: '{__name__="ceph_health_detail", name="BLUESTORE_DISK_SIZE_MISMATCH", cluster="mycluster"}' value: 0 alert_rule_test: - eval_time: 1m @@ -1362,20 +1343,21 @@ tests: - exp_labels: name: "BLUESTORE_DISK_SIZE_MISMATCH" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#bluestore-disk-size-mismatch - summary: OSD size inconsistency error + summary: OSD size inconsistency error on cluster mycluster 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." - interval: 30s input_series: - - series: 'ceph_health_detail{name="BLUESTORE_SPURIOUS_READ_ERRORS"}' + - series: 'ceph_health_detail{name="BLUESTORE_SPURIOUS_READ_ERRORS", cluster="mycluster"}' values: '0+0x2 1+0x20' promql_expr_test: - expr: ceph_health_detail{name="BLUESTORE_SPURIOUS_READ_ERRORS"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="BLUESTORE_SPURIOUS_READ_ERRORS"}' + - labels: '{__name__="ceph_health_detail", name="BLUESTORE_SPURIOUS_READ_ERRORS", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1386,32 +1368,33 @@ tests: - exp_labels: name: "BLUESTORE_SPURIOUS_READ_ERRORS" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#bluestore-spurious-read-errors - summary: Device read errors detected + summary: Device read errors detected on cluster mycluster 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." - interval: 1m input_series: - - series: 'ceph_health_detail{name="OSD_DOWN"}' + - series: 'ceph_health_detail{name="OSD_DOWN", cluster="mycluster"}' values: '0+0x2 1+0x10' - - series: 'ceph_osd_up{ceph_daemon="osd.0"}' + - series: 'ceph_osd_up{ceph_daemon="osd.0", cluster="mycluster"}' values: '1+0x12' - - series: 'ceph_osd_up{ceph_daemon="osd.1"}' + - series: 'ceph_osd_up{ceph_daemon="osd.1", cluster="mycluster"}' values: '1+0x2 0+0x10' - - series: 'ceph_osd_up{ceph_daemon="osd.2"}' + - series: 'ceph_osd_up{ceph_daemon="osd.2", cluster="mycluster"}' values: '1+0x12' - - series: 'ceph_osd_metadata{ceph_daemon="osd.0", hostname="ceph-osd-1"}' + - series: 'ceph_osd_metadata{ceph_daemon="osd.0", hostname="ceph-osd-1", cluster="mycluster"}' values: '1+0x12' - - series: 'ceph_osd_metadata{ceph_daemon="osd.1", hostname="ceph-osd-2"}' + - series: 'ceph_osd_metadata{ceph_daemon="osd.1", hostname="ceph-osd-2", cluster="mycluster"}' values: '1+0x12' - - series: 'ceph_osd_metadata{ceph_daemon="osd.2", hostname="ceph-osd-3"}' + - series: 'ceph_osd_metadata{ceph_daemon="osd.2", hostname="ceph-osd-3", cluster="mycluster"}' values: '1+0x12' promql_expr_test: - expr: ceph_health_detail{name="OSD_DOWN"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="OSD_DOWN"}' + - labels: '{__name__="ceph_health_detail", name="OSD_DOWN", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1422,21 +1405,22 @@ tests: - exp_labels: name: "OSD_DOWN" severity: warning + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.4.2 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-down - summary: An OSD has been marked down - description: "1 OSD down for over 5mins. The following OSD is down: - osd.1 on ceph-osd-2\n" + summary: An OSD has been marked down on cluster mycluster + description: "1 OSD down for over 5mins. The following OSD is down: - osd.1 on ceph-osd-2" - interval: 1m input_series: - - series: 'ceph_health_detail{name="OSD_NEARFULL"}' + - series: 'ceph_health_detail{name="OSD_NEARFULL", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="OSD_NEARFULL"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="OSD_NEARFULL"}' + - labels: '{__name__="ceph_health_detail", name="OSD_NEARFULL", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1447,21 +1431,22 @@ tests: - exp_labels: name: "OSD_NEARFULL" severity: warning + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.4.3 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-nearfull - summary: OSD(s) running low on free space (NEARFULL) + summary: OSD(s) running low on free space (NEARFULL) on cluster mycluster 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. - interval: 1m input_series: - - series: 'ceph_health_detail{name="OSD_FULL"}' + - series: 'ceph_health_detail{name="OSD_FULL", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="OSD_FULL"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="OSD_FULL"}' + - labels: '{__name__="ceph_health_detail", name="OSD_FULL", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1472,21 +1457,22 @@ tests: - exp_labels: name: "OSD_FULL" severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.4.6 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-full - summary: OSD full, writes blocked + summary: OSD full, writes blocked on cluster mycluster 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. - interval: 1m input_series: - - series: 'ceph_health_detail{name="OSD_BACKFILLFULL"}' + - series: 'ceph_health_detail{name="OSD_BACKFILLFULL", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="OSD_BACKFILLFULL"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="OSD_BACKFILLFULL"}' + - labels: '{__name__="ceph_health_detail", name="OSD_BACKFILLFULL", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1497,20 +1483,21 @@ tests: - exp_labels: name: "OSD_BACKFILLFULL" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-backfillfull - summary: OSD(s) too full for backfill operations + summary: OSD(s) too full for backfill operations on cluster mycluster 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." - interval: 30s input_series: - - series: 'ceph_health_detail{name="OSD_TOO_MANY_REPAIRS"}' + - series: 'ceph_health_detail{name="OSD_TOO_MANY_REPAIRS", cluster="mycluster"}' values: '0+0x2 1+0x20' promql_expr_test: - expr: ceph_health_detail{name="OSD_TOO_MANY_REPAIRS"} == 0 eval_time: 1m exp_samples: - - labels: '{__name__="ceph_health_detail", name="OSD_TOO_MANY_REPAIRS"}' + - labels: '{__name__="ceph_health_detail", name="OSD_TOO_MANY_REPAIRS", cluster="mycluster"}' value: 0 alert_rule_test: - eval_time: 1m @@ -1521,38 +1508,40 @@ tests: - exp_labels: name: "OSD_TOO_MANY_REPAIRS" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#osd-too-many-repairs - summary: OSD reports a high number of read errors + summary: OSD reports a high number of read errors on cluster mycluster description: Reads from an OSD have used a secondary PG to return data to the client, indicating a potential failing drive. + # Pools # trigger percent full prediction on pools 1 and 2 only - interval: 12h input_series: - - series: 'ceph_pool_percent_used{pool_id="1", instance="9090"}' + - series: 'ceph_pool_percent_used{pool_id="1", instance="9090", cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'ceph_pool_percent_used{pool_id="1", instance="8090"}' + - series: 'ceph_pool_percent_used{pool_id="1", instance="8090", cluster="mycluster"}' values: '78 89 79 98 78' - - series: 'ceph_pool_percent_used{pool_id="2", instance="9090"}' + - series: 'ceph_pool_percent_used{pool_id="2", instance="9090", cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'ceph_pool_percent_used{pool_id="2", instance="8090"}' + - series: 'ceph_pool_percent_used{pool_id="2", instance="8090", cluster="mycluster"}' values: '22 22 23 23 24' - - series: 'ceph_pool_metadata{pool_id="1" , instance="9090" ,name="rbd",type="replicated"}' + - series: 'ceph_pool_metadata{pool_id="1" , instance="9090" ,name="rbd",type="replicated", cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'ceph_pool_metadata{pool_id="1", instance="8090",name="default.rgw.index",type="replicated"}' + - series: 'ceph_pool_metadata{pool_id="1", instance="8090",name="default.rgw.index",type="replicated", cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'ceph_pool_metadata{pool_id="2" , instance="9090" ,name="rbd",type="replicated"}' + - series: 'ceph_pool_metadata{pool_id="2" , instance="9090" ,name="rbd",type="replicated", cluster="mycluster"}' values: '1 1 1 1 1' - - series: 'ceph_pool_metadata{pool_id="2", instance="8090",name="default.rgw.index",type="replicated"}' + - series: 'ceph_pool_metadata{pool_id="2", instance="8090",name="default.rgw.index",type="replicated", cluster="mycluster"}' values: '1 1 1 1 1' promql_expr_test: - expr: | - (predict_linear(ceph_pool_percent_used[2d], 3600 * 24 * 5) * on(pool_id, instance) + (predict_linear(ceph_pool_percent_used[2d], 3600 * 24 * 5) * on(cluster, pool_id, instance) group_right() ceph_pool_metadata) >= 95 eval_time: 36h exp_samples: - - labels: '{instance="8090",name="default.rgw.index",pool_id="1",type="replicated"}' + - labels: '{instance="8090",name="default.rgw.index",pool_id="1",type="replicated", cluster="mycluster"}' value: 1.435E+02 # 142% alert_rule_test: - eval_time: 48h @@ -1563,20 +1552,21 @@ tests: name: default.rgw.index pool_id: 1 severity: warning + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.9.2 exp_annotations: - summary: Pool growth rate may soon exceed capacity + summary: Pool growth rate may soon exceed capacity on cluster mycluster description: Pool 'default.rgw.index' will be full in less than 5 days assuming the average fill-up rate of the past 48 hours. - interval: 1m input_series: - - series: 'ceph_health_detail{name="POOL_BACKFILLFULL"}' + - series: 'ceph_health_detail{name="POOL_BACKFILLFULL", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="POOL_BACKFILLFULL"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="POOL_BACKFILLFULL"}' + - labels: '{__name__="ceph_health_detail", name="POOL_BACKFILLFULL", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1587,20 +1577,21 @@ tests: - exp_labels: name: "POOL_BACKFILLFULL" severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: Free space in a pool is too low for recovery/backfill + summary: Free space in a pool is too low for recovery/backfill on cluster mycluster description: A pool is approaching the near full threshold, which will prevent recovery/backfill operations from completing. Consider adding more capacity. - interval: 1m input_series: - - series: 'ceph_health_detail{name="POOL_NEAR_FULL"}' + - series: 'ceph_health_detail{name="POOL_NEAR_FULL", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="POOL_NEAR_FULL"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="POOL_NEAR_FULL"}' + - labels: '{__name__="ceph_health_detail", name="POOL_NEAR_FULL", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1611,21 +1602,22 @@ tests: - exp_labels: name: "POOL_NEAR_FULL" severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: One or more Ceph pools are nearly full + summary: One or more Ceph pools are nearly full on cluster mycluster 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." # PGs - interval: 1m input_series: - - series: 'ceph_health_detail{name="PG_NOT_SCRUBBED"}' + - series: 'ceph_health_detail{name="PG_NOT_SCRUBBED",cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="PG_NOT_SCRUBBED"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="PG_NOT_SCRUBBED"}' + - labels: '{__name__="ceph_health_detail", name="PG_NOT_SCRUBBED", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1636,20 +1628,21 @@ tests: - exp_labels: name: "PG_NOT_SCRUBBED" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-not-scrubbed - summary: Placement group(s) have not been scrubbed + summary: Placement group(s) have not been scrubbed on cluster mycluster 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>" - interval: 1m input_series: - - series: 'ceph_health_detail{name="PG_DAMAGED"}' + - series: 'ceph_health_detail{name="PG_DAMAGED",cluster="mycluster"}' values: '0+0x4 1+0x20' promql_expr_test: - expr: ceph_health_detail{name=~"PG_DAMAGED|OSD_SCRUB_ERRORS"} == 1 eval_time: 5m exp_samples: - - labels: '{__name__="ceph_health_detail", name="PG_DAMAGED"}' + - labels: '{__name__="ceph_health_detail", name="PG_DAMAGED", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1660,21 +1653,22 @@ tests: - exp_labels: name: "PG_DAMAGED" severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.7.4 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-damaged - summary: Placement group damaged, manual intervention needed + summary: Placement group damaged, manual intervention needed on cluster mycluster 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. - interval: 1m input_series: - - series: 'ceph_health_detail{name="TOO_MANY_PGS"}' + - series: 'ceph_health_detail{name="TOO_MANY_PGS",cluster="mycluster"}' values: '0+0x4 1+0x20' promql_expr_test: - expr: ceph_health_detail{name="TOO_MANY_PGS"} == 1 eval_time: 5m exp_samples: - - labels: '{__name__="ceph_health_detail", name="TOO_MANY_PGS"}' + - labels: '{__name__="ceph_health_detail", name="TOO_MANY_PGS", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1685,20 +1679,21 @@ tests: - exp_labels: name: "TOO_MANY_PGS" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks/#too-many-pgs - summary: Placement groups per OSD is too high + summary: Placement groups per OSD is too high on cluster mycluster 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." - interval: 1m input_series: - - series: 'ceph_health_detail{name="PG_RECOVERY_FULL"}' + - series: 'ceph_health_detail{name="PG_RECOVERY_FULL", cluster="mycluster"}' values: '0+0x2 1+0x20' promql_expr_test: - expr: ceph_health_detail{name="PG_RECOVERY_FULL"} == 0 eval_time: 1m exp_samples: - - labels: '{__name__="ceph_health_detail", name="PG_RECOVERY_FULL"}' + - labels: '{__name__="ceph_health_detail", name="PG_RECOVERY_FULL", cluster="mycluster"}' value: 0 alert_rule_test: - eval_time: 1m @@ -1709,21 +1704,22 @@ tests: - exp_labels: name: "PG_RECOVERY_FULL" severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.7.5 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-recovery-full - summary: OSDs are too full for recovery + summary: OSDs are too full for recovery on cluster mycluster 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. - interval: 1m input_series: - - series: 'ceph_health_detail{name="PG_BACKFILL_FULL"}' + - series: 'ceph_health_detail{name="PG_BACKFILL_FULL", cluster="mycluster"}' values: '0+0x2 1+0x20' promql_expr_test: - expr: ceph_health_detail{name="PG_BACKFILL_FULL"} == 0 eval_time: 1m exp_samples: - - labels: '{__name__="ceph_health_detail", name="PG_BACKFILL_FULL"}' + - labels: '{__name__="ceph_health_detail", name="PG_BACKFILL_FULL", cluster="mycluster"}' value: 0 alert_rule_test: - eval_time: 1m @@ -1734,17 +1730,18 @@ tests: - exp_labels: name: "PG_BACKFILL_FULL" severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.7.6 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-backfill-full - summary: Backfill operations are blocked due to lack of free space + summary: Backfill operations are blocked due to lack of free space on cluster mycluster 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. - interval: 1m input_series: - - series: 'ceph_health_detail{name="PG_AVAILABILITY"}' + - series: 'ceph_health_detail{name="PG_AVAILABILITY", cluster="mycluster"}' values: '0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_health_detail{name="OSD_DOWN"}' + - series: 'ceph_health_detail{name="OSD_DOWN", cluster="mycluster"}' values: '0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0' promql_expr_test: - expr: ((ceph_health_detail{name="PG_AVAILABILITY"} == 1) - scalar(ceph_health_detail{name="OSD_DOWN"})) @@ -1767,21 +1764,22 @@ tests: - exp_labels: name: "PG_AVAILABILITY" severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.7.3 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-availability - summary: PG is unavailable, blocking I/O + summary: PG is unavailable on cluster mycluster, blocking I/O 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. - interval: 1m input_series: - - series: 'ceph_health_detail{name="PG_NOT_DEEP_SCRUBBED"}' + - series: 'ceph_health_detail{name="PG_NOT_DEEP_SCRUBBED", cluster="mycluster"}' values: '0+0x2 1+0x10' promql_expr_test: - expr: ceph_health_detail{name="PG_NOT_DEEP_SCRUBBED"} == 1 eval_time: 3m exp_samples: - - labels: '{__name__="ceph_health_detail", name="PG_NOT_DEEP_SCRUBBED"}' + - labels: '{__name__="ceph_health_detail", name="PG_NOT_DEEP_SCRUBBED", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -1792,10 +1790,11 @@ tests: - exp_labels: name: "PG_NOT_DEEP_SCRUBBED" severity: warning + cluster: mycluster type: ceph_default exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#pg-not-deep-scrubbed - summary: Placement group(s) have not been deep scrubbed + summary: Placement group(s) have not been deep scrubbed on cluster mycluster 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. # Prometheus @@ -1821,25 +1820,26 @@ tests: exp_annotations: summary: The scrape job for Ceph is missing from Prometheus description: The prometheus job that scrapes from Ceph is no longer defined, this will effectively mean you'll have no metrics or alerts for the cluster. Please review the job definitions in the prometheus.yml file of the prometheus instance. + # RADOS - interval: 1m input_series: - - series: 'ceph_health_detail{name="OBJECT_UNFOUND"}' + - series: 'ceph_health_detail{name="OBJECT_UNFOUND", cluster="mycluster"}' values: '0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_osd_up{ceph_daemon="osd.0"}' + - series: 'ceph_osd_up{ceph_daemon="osd.0", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_osd_up{ceph_daemon="osd.1"}' + - series: 'ceph_osd_up{ceph_daemon="osd.1", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_osd_up{ceph_daemon="osd.2"}' + - series: 'ceph_osd_up{ceph_daemon="osd.2", cluster="mycluster"}' values: '1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_osd_metadata{ceph_daemon="osd.0"}' + - series: 'ceph_osd_metadata{ceph_daemon="osd.0", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_osd_metadata{ceph_daemon="osd.1"}' + - series: 'ceph_osd_metadata{ceph_daemon="osd.1", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'ceph_osd_metadata{ceph_daemon="osd.2"}' + - series: 'ceph_osd_metadata{ceph_daemon="osd.2", cluster="mycluster"}' values: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' promql_expr_test: - - expr: (ceph_health_detail{name="OBJECT_UNFOUND"} == 1) * on() (count(ceph_osd_up == 1) == bool count(ceph_osd_metadata)) == 1 + - expr: (ceph_health_detail{name="OBJECT_UNFOUND"} == 1) * on() group_right (cluster) (count(ceph_osd_up == 1) by (cluster) == bool count(ceph_osd_metadata) by (cluster)) == 1 eval_time: 1m exp_samples: alert_rule_test: @@ -1853,16 +1853,18 @@ tests: exp_alerts: - exp_labels: severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.10.1 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks#object-unfound - summary: Object(s) marked UNFOUND + summary: Object(s) marked UNFOUND on cluster mycluster 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. + # Generic Alerts - interval: 1m input_series: - - series: 'ceph_health_detail{name="RECENT_CRASH"}' + - series: 'ceph_health_detail{name="RECENT_CRASH", cluster="mycluster"}' values: '0 0 0 1 1 1 1 1 1 1 1' promql_expr_test: - expr: ceph_health_detail{name="RECENT_CRASH"} == 1 @@ -1880,11 +1882,12 @@ tests: - exp_labels: name: RECENT_CRASH severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.1.2 exp_annotations: documentation: https://docs.ceph.com/en/latest/rados/operations/health-checks/#recent-crash - summary: One or more Ceph daemons have crashed, and are pending acknowledgement + summary: One or more Ceph daemons have crashed, and are pending acknowledgement on cluster mycluster 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. # new rbdmirror alerts tests @@ -1892,21 +1895,21 @@ tests: # alert: CephRBDMirrorImagesPerDaemonHigh - interval: 1m input_series: - - series: 'ceph_rbd_mirror_snapshot_image_snapshots{ceph_daemon="client.admin.40628", image="image1", namespace="default", pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_snapshots{ceph_daemon="client.admin.40628", image="image1", namespace="default", pool="data", cluster="mycluster"}' values: '0+0x20 1+1x130' - - series: 'ceph_rbd_mirror_snapshot_image_snapshots{ceph_daemon="client.admin.40628", image="image2", namespace="default", pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_snapshots{ceph_daemon="client.admin.40628", image="image2", namespace="default", pool="data", cluster="mycluster"}' values: '1+1x130 131+0x20' # prometheus query test promql_expr_test: # negative test where there are no samples - - expr: sum by (ceph_daemon, namespace) (ceph_rbd_mirror_snapshot_image_snapshots) > 100 + - expr: sum by (cluster, ceph_daemon, namespace) (ceph_rbd_mirror_snapshot_image_snapshots) > 100 eval_time: 50m exp_samples: # second positive test - - expr: sum by (ceph_daemon, namespace) (ceph_rbd_mirror_snapshot_image_snapshots) > 100 + - expr: sum by (cluster, ceph_daemon, namespace) (ceph_rbd_mirror_snapshot_image_snapshots) > 100 eval_time: 70m exp_samples: - - labels: '{ceph_daemon="client.admin.40628", namespace="default"}' + - labels: '{ceph_daemon="client.admin.40628", namespace="default", cluster="mycluster"}' value: 121 # prometheus alert test alert_rule_test: @@ -1921,31 +1924,32 @@ tests: - exp_labels: oid: "1.3.6.1.4.1.50495.1.2.1.10.2" severity: "critical" + cluster: mycluster type: "ceph_default" ceph_daemon: "client.admin.40628" namespace: "default" exp_annotations: - description: "Number of image replications per daemon is not suppossed to go beyond threshold 100" - summary: "Number of image replications are now above 100" + summary: "Number of image replications are now above 100 on cluster mycluster" + description: "Number of image replications per daemon is not supposed to go beyond threshold 100" # alert: CephRBDMirrorImagesNotInSync - interval: 1m input_series: - - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image1",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image1",namespace="default",pool="data",cluster="mycluster"}' values: '1.678+0x20 2.03+0x20 3.21+0x20' - - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image1",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image1",namespace="default",pool="data",cluster="mycluster"}' values: '1.678+0x20 2.03+0x20 2.03+0x20' # prometheus query test promql_expr_test: # negative test where there are no samples - - expr: sum by (ceph_daemon, image, namespace, pool) (topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0 + - expr: sum by (cluster, ceph_daemon, image, namespace, pool) (topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0 eval_time: 30m exp_samples: # second positive test - - expr: sum by (ceph_daemon, image, namespace, pool) (topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0 + - expr: sum by (cluster, ceph_daemon, image, namespace, pool) (topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (cluster, ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0 eval_time: 45m exp_samples: - - labels: '{ceph_daemon="client.admin.40628", image="image1", namespace="default", pool="data"}' + - labels: '{ceph_daemon="client.admin.40628", image="image1", namespace="default", pool="data", cluster="mycluster"}' value: 1.1800000000000002 # prometheus alert test alert_rule_test: @@ -1962,48 +1966,49 @@ tests: pool: "data" oid: "1.3.6.1.4.1.50495.1.2.1.10.3" severity: "critical" + cluster: mycluster type: "ceph_default" ceph_daemon: "client.admin.40628" namespace: "default" exp_annotations: + summary: "Some of the RBD mirror images are not in sync with the remote counter parts on cluster mycluster" description: "Both local and remote RBD mirror images should be in sync." - summary: "Some of the RBD mirror images are not in sync with the remote counter parts." # alert: CephRBDMirrorImagesNotInSyncVeryHigh - interval: 1m input_series: - - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image1",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image1",namespace="default",pool="data",cluster="mycluster"}' values: '1.678+0x20 2.03+0x20 3.21+0x20' - - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image1",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image1",namespace="default",pool="data",cluster="mycluster"}' values: '1.678+0x20 2.03+0x20 2.03+0x20' - - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image2",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image2",namespace="default",pool="data",cluster="mycluster"}' values: '2.189+0x20 3.301+0x14 3.301+0x26' - - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image2",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image2",namespace="default",pool="data",cluster="mycluster"}' values: '2.189+0x20 3.301+0x14 7.13+0x26' - - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image3",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image3",namespace="default",pool="data",cluster="mycluster"}' values: '2.189+0x20 3.301+0x14 3.301+0x26' - - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image3",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image3",namespace="default",pool="data",cluster="mycluster"}' values: '2.189+0x20 3.301+0x14 7.13+0x26' - - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image4",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_local_timestamp{ceph_daemon="client.admin.40628",image="image4",namespace="default",pool="data",cluster="mycluster"}' values: '2.189+0x65' - - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image4",namespace="default",pool="data"}' + - series: 'ceph_rbd_mirror_snapshot_image_remote_timestamp{ceph_daemon="client.admin.40628",image="image4",namespace="default",pool="data",cluster="mycluster"}' values: '2.189+0x65' - - series: 'ceph_rbd_mirror_snapshot_snapshots{ceph_daemon="client.admin.40628"}' + - series: 'ceph_rbd_mirror_snapshot_snapshots{ceph_daemon="client.admin.40628",cluster="mycluster"}' values: '1+0x20 2+0x45' # prometheus query test promql_expr_test: # test each query individually # query 1 - - expr: count by (ceph_daemon) ((topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0) + - expr: count by (ceph_daemon, cluster) ((topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_local_timestamp) - topk by (ceph_daemon, image, namespace, pool) (1, ceph_rbd_mirror_snapshot_image_remote_timestamp)) != 0) eval_time: 45m exp_samples: - - labels: '{ceph_daemon="client.admin.40628"}' + - labels: '{ceph_daemon="client.admin.40628",cluster="mycluster"}' value: 3 # query 2 - - expr: sum by (ceph_daemon) (ceph_rbd_mirror_snapshot_snapshots) * .1 + - expr: sum by (ceph_daemon, cluster) (ceph_rbd_mirror_snapshot_snapshots) * .1 eval_time: 45m exp_samples: - - labels: '{ceph_daemon="client.admin.40628"}' + - labels: '{ceph_daemon="client.admin.40628",cluster="mycluster"}' value: 0.2 # prometheus alert test alert_rule_test: @@ -2019,15 +2024,16 @@ tests: ceph_daemon: "client.admin.40628" oid: "1.3.6.1.4.1.50495.1.2.1.10.4" severity: "critical" + cluster: mycluster type: "ceph_default" exp_annotations: - description: "More than 10% of the images have synchronization problems" - summary: "Number of unsynchronized images are very high." + summary: "Number of unsynchronized images are very high on cluster mycluster" + description: "More than 10% of the images have synchronization problems." # alert: "CephRBDMirrorImageTransferBandwidthHigh" - interval: 1m input_series: - - series: 'ceph_rbd_mirror_journal_replay_bytes{ceph_daemon="client.admin.40628"}' + - series: 'ceph_rbd_mirror_journal_replay_bytes{ceph_daemon="client.admin.40628", cluster="mycluster"}' values: '0+0x10 1+0x5 10+30x25 736+200x30' # prometheus query test promql_expr_test: @@ -2036,25 +2042,25 @@ tests: - expr: rate(ceph_rbd_mirror_journal_replay_bytes[5m]) eval_time: 5m exp_samples: - - labels: '{ceph_daemon="client.admin.40628"}' + - labels: '{ceph_daemon="client.admin.40628", cluster="mycluster"}' value: 0.0 # rate 2 - expr: rate(ceph_rbd_mirror_journal_replay_bytes[5m]) eval_time: 20m exp_samples: - - labels: '{ceph_daemon="client.admin.40628"}' + - labels: '{ceph_daemon="client.admin.40628", cluster="mycluster"}' value: 0.33 # rate 3 - expr: rate(ceph_rbd_mirror_journal_replay_bytes[5m]) eval_time: 40m exp_samples: - - labels: '{ceph_daemon="client.admin.40628"}' + - labels: '{ceph_daemon="client.admin.40628", cluster="mycluster"}' value: 0.5 # rate 4 - expr: rate(ceph_rbd_mirror_journal_replay_bytes[5m]) eval_time: 50m exp_samples: - - labels: '{ceph_daemon="client.admin.40628"}' + - labels: '{ceph_daemon="client.admin.40628", cluster="mycluster"}' value: 3.3333333333333335 # prometheus alert test alert_rule_test: @@ -2070,20 +2076,21 @@ tests: ceph_daemon: "client.admin.40628" oid: "1.3.6.1.4.1.50495.1.2.1.10.5" severity: "warning" + cluster: mycluster type: "ceph_default" exp_annotations: + summary: "The replication network usage on cluster mycluster has been increased over 80% in the last 30 minutes. Review the number of images being replicated. This alert will be cleaned automatically after 30 minutes" description: "Detected a heavy increase in bandwidth for rbd replications (over 80%) in the last 30 min. This might not be a problem, but it is good to review the number of images being replicated simultaneously" - summary: "The replication network usage has been increased over 80% in the last 30 minutes. Review the number of images being replicated. This alert will be cleaned automatically after 30 minutes" - interval: 30s input_series: - - series: 'ceph_health_detail{name="HARDWARE_STORAGE"}' + - series: 'ceph_health_detail{name="HARDWARE_STORAGE", cluster="mycluster"}' values: '1+0x40' promql_expr_test: - expr: ceph_health_detail{name="HARDWARE_STORAGE"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="HARDWARE_STORAGE"}' + - labels: '{__name__="ceph_health_detail", name="HARDWARE_STORAGE", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -2094,20 +2101,21 @@ tests: - exp_labels: name: HARDWARE_STORAGE severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.13.1 exp_annotations: - summary: Storage devices error(s) detected + summary: Storage devices error(s) detected on cluster mycluster description: "Some storage devices are in error. Check `ceph health detail`." - interval: 30s input_series: - - series: 'ceph_health_detail{name="HARDWARE_MEMORY"}' + - series: 'ceph_health_detail{name="HARDWARE_MEMORY", cluster="mycluster"}' values: '1+0x40' promql_expr_test: - expr: ceph_health_detail{name="HARDWARE_MEMORY"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="HARDWARE_MEMORY"}' + - labels: '{__name__="ceph_health_detail", name="HARDWARE_MEMORY", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -2118,20 +2126,21 @@ tests: - exp_labels: name: HARDWARE_MEMORY severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.13.2 exp_annotations: - summary: DIMM error(s) detected + summary: DIMM error(s) detected on cluster mycluster description: "DIMM error(s) detected. Check `ceph health detail`." - interval: 30s input_series: - - series: 'ceph_health_detail{name="HARDWARE_PROCESSOR"}' + - series: 'ceph_health_detail{name="HARDWARE_PROCESSOR", cluster="mycluster"}' values: '1+0x40' promql_expr_test: - expr: ceph_health_detail{name="HARDWARE_PROCESSOR"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="HARDWARE_PROCESSOR"}' + - labels: '{__name__="ceph_health_detail", name="HARDWARE_PROCESSOR", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -2142,20 +2151,21 @@ tests: - exp_labels: name: HARDWARE_PROCESSOR severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.13.3 exp_annotations: - summary: Processor error(s) detected + summary: Processor error(s) detected on cluster mycluster description: "Processor error(s) detected. Check `ceph health detail`." - interval: 30s input_series: - - series: 'ceph_health_detail{name="HARDWARE_NETWORK"}' + - series: 'ceph_health_detail{name="HARDWARE_NETWORK", cluster="mycluster"}' values: '1+0x40' promql_expr_test: - expr: ceph_health_detail{name="HARDWARE_NETWORK"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="HARDWARE_NETWORK"}' + - labels: '{__name__="ceph_health_detail", name="HARDWARE_NETWORK", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -2166,20 +2176,21 @@ tests: - exp_labels: name: HARDWARE_NETWORK severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.13.4 exp_annotations: - summary: Network error(s) detected + summary: Network error(s) detected on cluster mycluster description: "Network error(s) detected. Check `ceph health detail`." - interval: 30s input_series: - - series: 'ceph_health_detail{name="HARDWARE_POWER"}' + - series: 'ceph_health_detail{name="HARDWARE_POWER", cluster="mycluster"}' values: '1+0x40' promql_expr_test: - expr: ceph_health_detail{name="HARDWARE_POWER"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="HARDWARE_POWER"}' + - labels: '{__name__="ceph_health_detail", name="HARDWARE_POWER", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -2190,20 +2201,21 @@ tests: - exp_labels: name: HARDWARE_POWER severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.13.5 exp_annotations: - summary: Power supply error(s) detected + summary: Power supply error(s) detected on cluster mycluster description: "Power supply error(s) detected. Check `ceph health detail`." - interval: 30s input_series: - - series: 'ceph_health_detail{name="HARDWARE_FANS"}' + - series: 'ceph_health_detail{name="HARDWARE_FANS", cluster="mycluster"}' values: '1+0x40' promql_expr_test: - expr: ceph_health_detail{name="HARDWARE_FANS"} > 0 eval_time: 2m exp_samples: - - labels: '{__name__="ceph_health_detail", name="HARDWARE_FANS"}' + - labels: '{__name__="ceph_health_detail", name="HARDWARE_FANS", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 1m @@ -2214,35 +2226,36 @@ tests: - exp_labels: name: HARDWARE_FANS severity: critical + cluster: mycluster type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.13.6 exp_annotations: - summary: Fan error(s) detected + summary: Fan error(s) detected on cluster mycluster description: "Fan error(s) detected. Check `ceph health detail`." # nvmeof Tests # NVMeoFSubsystemNamespaceLimit - interval: 1m input_series: - - series: 'ceph_nvmeof_subsystem_namespace_limit{nqn="wah"}' + - series: 'ceph_nvmeof_subsystem_namespace_limit{nqn="wah", cluster="mycluster"}' values: '5x10' - - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk1"}' + - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk1", cluster="mycluster"}' + values: '1x10' + - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk2", cluster="mycluster"}' values: '1x10' - - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk2"}' + - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk3", cluster="mycluster"}' values: '1x10' - - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk3"}' + - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk4", cluster="mycluster"}' values: '1x10' - - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk4"}' + - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk5", cluster="mycluster"}' values: '1x10' - - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk5"}' + - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk6", cluster="mycluster"}' values: '1x10' - - series: 'ceph_nvmeof_subsystem_namespace_metadata{nqn="wah", bdev_name="disk6"}' - values: '1x10' promql_expr_test: - - expr: (count by(nqn) (ceph_nvmeof_subsystem_namespace_metadata)) >= ceph_nvmeof_subsystem_namespace_limit + - expr: (count by(nqn, cluster) (ceph_nvmeof_subsystem_namespace_metadata)) >= ceph_nvmeof_subsystem_namespace_limit eval_time: 1m exp_samples: - - labels: '{nqn="wah"}' + - labels: '{nqn="wah",cluster="mycluster"}' value: 6 alert_rule_test: - eval_time: 5m @@ -2251,29 +2264,30 @@ tests: - exp_labels: nqn: wah severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: "wah subsystem has reached its maximum number of namespaces " + summary: "wah subsystem has reached its maximum number of namespaces on cluster mycluster" description: "Subsystems have a max namespace limit defined at creation time. This alert means that no more namespaces can be added to wah" # NVMeoFTooManyGateways - interval: 1m input_series: - - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.1"}' + - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.1",cluster="mycluster"}' values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.2"}' + - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.2",cluster="mycluster"}' values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.3"}' - values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.4"}' - values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.5"}' - values: '1+0x20' - promql_expr_test: - - expr: count(ceph_nvmeof_gateway_info) > 4.00 + - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.3",cluster="mycluster"}' + values: '1+0x20' + - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.4",cluster="mycluster"}' + values: '1+0x20' + - series: 'ceph_nvmeof_gateway_info{addr="1.1.1.5",cluster="mycluster"}' + values: '1+0x20' + promql_expr_test: + - expr: count(ceph_nvmeof_gateway_info) by (cluster) > 4.00 eval_time: 1m exp_samples: - - labels: '{}' + - labels: '{cluster="mycluster"}' value: 5 alert_rule_test: - eval_time: 5m @@ -2281,30 +2295,35 @@ tests: exp_alerts: - exp_labels: severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: "Max supported gateways exceeded " + summary: "Max supported gateways exceeded on cluster mycluster" description: "You may create many gateways, but 4 is the tested limit" # NVMeoFMaxGatewayGroupSize - interval: 1m input_series: - - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.1"}' + - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.1",cluster="mycluster"}' + values: '1+0x20' + - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.2",cluster="mycluster"}' + values: '1+0x20' + - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.3",cluster="mycluster"}' + values: '1+0x20' + - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.9",cluster="mycluster"}' values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.2"}' + - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.12",cluster="mycluster"}' values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.3"}' - values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{group="group-2",addr="1.1.1.4"}' - values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{group="group-2",addr="1.1.1.5"}' - values: '1+0x20' - promql_expr_test: - - expr: count by(group) (ceph_nvmeof_gateway_info) > 2.00 + - series: 'ceph_nvmeof_gateway_info{group="group-2",addr="1.1.1.4",cluster="mycluster"}' + values: '1+0x20' + - series: 'ceph_nvmeof_gateway_info{group="group-2",addr="1.1.1.5",cluster="mycluster"}' + values: '1+0x20' + promql_expr_test: + - expr: count(ceph_nvmeof_gateway_info) by (cluster, group) > 4.00 eval_time: 1m exp_samples: - - labels: '{group="group-1"}' - value: 3 + - labels: '{cluster="mycluster",group="group-1"}' + value: 5 alert_rule_test: - eval_time: 5m alertname: NVMeoFMaxGatewayGroupSize @@ -2312,25 +2331,26 @@ tests: - exp_labels: group: group-1 severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: "Max gateways within a gateway group (group-1) exceeded " - description: "You may create many gateways in a gateway group, but 2 is the tested limit" + summary: "Max gateways within a gateway group (group-1) exceeded on cluster mycluster" + description: "You may create many gateways in a gateway group, but 4 is the tested limit" # NVMeoFSingleGatewayGroup - interval: 1m input_series: - - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.2"}' + - series: 'ceph_nvmeof_gateway_info{group="group-1",addr="1.1.1.2",cluster="mycluster"}' + values: '1+0x20' + - series: 'ceph_nvmeof_gateway_info{group="group-2",addr="1.1.1.4",cluster="mycluster"}' + values: '1+0x20' + - series: 'ceph_nvmeof_gateway_info{group="group-2",addr="1.1.1.5",cluster="mycluster"}' values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{group="group-2",addr="1.1.1.4"}' - values: '1+0x20' - - series: 'ceph_nvmeof_gateway_info{group="group-2",addr="1.1.1.5"}' - values: '1+0x20' promql_expr_test: - - expr: count by(group) (ceph_nvmeof_gateway_info) == 1 + - expr: count by(group, cluster) (ceph_nvmeof_gateway_info) == 1 eval_time: 1m exp_samples: - - labels: '{group="group-1"}' + - labels: '{group="group-1", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 5m @@ -2339,21 +2359,22 @@ tests: - exp_labels: group: group-1 severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: "The gateway group group-1 consists of a single gateway - HA is not possible " - description: "Although a single member gateway group is valid, it should only be used for test purposes" + summary: "The gateway group group-1 consists of a single gateway - HA is not possible on cluster mycluster" + description: "Although a single member gateway group is valid, it should only be used for test purposes" # NVMeoFHighGatewayCPU - interval: 1m input_series: - - series: 'ceph_nvmeof_reactor_seconds_total{mode="busy",name="nvmf_tgt_poll_group_0",instance="node-1:10008"}' + - series: 'ceph_nvmeof_reactor_seconds_total{mode="busy",name="nvmf_tgt_poll_group_0",instance="node-1:10008",cluster="mycluster"}' values: '880+5080x20' promql_expr_test: - - expr: label_replace(avg by(instance) (rate(ceph_nvmeof_reactor_seconds_total{mode="busy"}[1m])),"instance","$1","instance","(.*):.*") > 80 + - expr: label_replace(avg by(instance, cluster) (rate(ceph_nvmeof_reactor_seconds_total{mode="busy"}[1m])),"instance","$1","instance","(.*):.*") > 80 eval_time: 5m exp_samples: - - labels: '{instance="node-1"}' + - labels: '{instance="node-1", cluster="mycluster"}' value: 8.466666666666667E+01 alert_rule_test: - eval_time: 15m @@ -2362,23 +2383,24 @@ tests: - exp_labels: instance: node-1 severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: "CPU used by node-1 NVMe-oF Gateway is high " - description: "Typically, high CPU may indicate degraded performance. Consider increasing the number of reactor cores" - + summary: "CPU used by node-1 NVMe-oF Gateway is high on cluster mycluster" + description: "Typically, high CPU may indicate degraded performance. Consider increasing the number of reactor cores" + # NVMeoFGatewayOpenSecurity - interval: 1m input_series: - - series: 'ceph_nvmeof_subsystem_metadata{nqn="nqn.good", allow_any_host="no"}' + - series: 'ceph_nvmeof_subsystem_metadata{nqn="nqn.good", allow_any_host="no", cluster="mycluster"}' values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{nqn="nqn.bad", allow_any_host="yes"}' + - series: 'ceph_nvmeof_subsystem_metadata{nqn="nqn.bad", allow_any_host="yes", cluster="mycluster"}' values: '1+0x10' promql_expr_test: - expr: ceph_nvmeof_subsystem_metadata{allow_any_host="yes"} eval_time: 1m exp_samples: - - labels: '{__name__="ceph_nvmeof_subsystem_metadata",nqn="nqn.bad",allow_any_host="yes"}' + - labels: '{__name__="ceph_nvmeof_subsystem_metadata",nqn="nqn.bad",allow_any_host="yes", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 5m @@ -2388,53 +2410,54 @@ tests: allow_any_host: yes nqn: nqn.bad severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: "Subsystem nqn.bad has been defined without host level security " - description: "It is good practice to ensure subsystems use host security to reduce the risk of unexpected data loss" + summary: "Subsystem nqn.bad has been defined without host level security on cluster mycluster" + description: "It is good practice to ensure subsystems use host security to reduce the risk of unexpected data loss" # NVMeoFTooManySubsystems - interval: 1m input_series: - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn1"}' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn1",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn2",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn3",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn4",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn5",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn6",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn7",cluster="mycluster"}' values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn2"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn3"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn4"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn5"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn6"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn7"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn8"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn9"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn10"}' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn8",cluster="mycluster"}' values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn11"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn12"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn13"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn14"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn15"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn16"}' - values: '1+0x10' - - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn17"}' - values: '1+0x10' - promql_expr_test: - - expr: count by(gateway_host) (label_replace(ceph_nvmeof_subsystem_metadata,"gateway_host","$1","instance","(.*):.*")) > 16 + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn9",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn10",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn11",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn12",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn13",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn14",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn15",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn16",cluster="mycluster"}' + values: '1+0x10' + - series: 'ceph_nvmeof_subsystem_metadata{instance="node-1:10008",nqn="nqn17",cluster="mycluster"}' + values: '1+0x10' + promql_expr_test: + - expr: count by(gateway_host, cluster) (label_replace(ceph_nvmeof_subsystem_metadata,"gateway_host","$1","instance","(.*):.*")) > 16 eval_time: 1m exp_samples: - - labels: '{gateway_host="node-1"}' + - labels: '{gateway_host="node-1", cluster="mycluster"}' value: 17 alert_rule_test: - eval_time: 5m @@ -2443,23 +2466,24 @@ tests: - exp_labels: gateway_host: node-1 severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: "The number of subsystems defined to the gateway exceeds supported values " - description: "Although you may continue to create subsystems in node-1, the configuration may not be supported" + summary: "The number of subsystems defined to the gateway exceeds supported values on cluster mycluster" + description: "Although you may continue to create subsystems in node-1, the configuration may not be supported" # NVMeoFVersionMismatch - interval: 1m input_series: - - series: 'ceph_nvmeof_gateway_info{version="0.0.7"}' + - series: 'ceph_nvmeof_gateway_info{version="0.0.7",cluster="mycluster"}' values: '1+0x80' - - series: 'ceph_nvmeof_gateway_info{version="1.0.0"}' + - series: 'ceph_nvmeof_gateway_info{version="1.0.0",cluster="mycluster"}' values: '1+0x80' promql_expr_test: - - expr: count(count by(version) (ceph_nvmeof_gateway_info)) > 1 + - expr: count(count(ceph_nvmeof_gateway_info) by (cluster, version)) by (cluster) > 1 eval_time: 1m exp_samples: - - labels: '{}' + - labels: '{cluster="mycluster"}' value: 2 alert_rule_test: - eval_time: 1h @@ -2467,23 +2491,24 @@ tests: exp_alerts: - exp_labels: severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: "The cluster has different NVMe-oF gateway releases active " - description: "This may indicate an issue with deployment. Check cephadm logs" + summary: "Too many different NVMe-oF gateway releases active on cluster mycluster" + description: "This may indicate an issue with deployment. Check cephadm logs" # NVMeoFHighClientCount - interval: 1m input_series: - - series: 'ceph_nvmeof_subsystem_host_count{nqn="nqn1"}' + - series: 'ceph_nvmeof_subsystem_host_count{nqn="nqn1",cluster="mycluster"}' values: '2 2 2 4 4 8 8 8 10 10 20 20 32 34 34 38 38 40 44 44' - - series: 'ceph_nvmeof_subsystem_host_count{nqn="nqn2"}' + - series: 'ceph_nvmeof_subsystem_host_count{nqn="nqn2",cluster="mycluster"}' values: '2 2 2 8 8 8 16 16 16 16 16 16 16 16 16 16 16 16 16 16' promql_expr_test: - expr: ceph_nvmeof_subsystem_host_count > 32.00 eval_time: 15m exp_samples: - - labels: '{__name__="ceph_nvmeof_subsystem_host_count",nqn="nqn1"}' + - labels: '{__name__="ceph_nvmeof_subsystem_host_count",nqn="nqn1",cluster="mycluster"}' value: 38 alert_rule_test: - eval_time: 20m @@ -2492,55 +2517,57 @@ tests: - exp_labels: nqn: nqn1 severity: warning + cluster: mycluster type: ceph_default exp_annotations: - summary: "The number of clients connected to nqn1 is too high " - description: "The supported limit for clients connecting to a subsystem is 32" - + summary: "The number of clients connected to nqn1 is too high on cluster mycluster" + description: "The supported limit for clients connecting to a subsystem is 32" + # NVMeoFHighHostCPU - interval: 1m input_series: - - series: 'node_cpu_seconds_total{mode="idle",instance="node-1:9100",cpu="0"}' + - series: 'node_cpu_seconds_total{mode="idle",instance="node-1:9100",cpu="0",cluster="mycluster"}' values: '0+18x10 180+9x20' - - series: 'node_cpu_seconds_total{mode="idle",instance="node-1:9100",cpu="1"}' + - series: 'node_cpu_seconds_total{mode="idle",instance="node-1:9100",cpu="1",cluster="mycluster"}' values: '0+18x10 180+9x20' - - series: 'ceph_nvmeof_gateway_info{instance="node-1:10008"}' + - series: 'ceph_nvmeof_gateway_info{instance="node-1:10008",cluster="mycluster"}' values: '1.00+0x20' promql_expr_test: - expr: 100-((100*(avg by(host) (label_replace(rate(node_cpu_seconds_total{mode="idle"}[5m]),"host","$1","instance","(.*):.*")) * on(host) group_right label_replace(ceph_nvmeof_gateway_info,"host","$1","instance","(.*):.*")))) >= 80 eval_time: 16m exp_samples: - - labels: '{host="node-1",instance="node-1:10008"}' + - labels: '{host="node-1",instance="node-1:10008",cluster="mycluster"}' value: 85 alert_rule_test: # negative match at 15m - eval_time: 15m alertname: NVMeoFHighHostCPU - # positive match at 25m + # positive match at 25m - eval_time: 25m alertname: NVMeoFHighHostCPU exp_alerts: - exp_labels: instance: node-1:10008 host: node-1 + cluster: mycluster severity: warning type: ceph_default exp_annotations: - summary: "The CPU is high (85%) on NVMeoF Gateway host (node-1) " - description: "High CPU on a gateway host can lead to CPU contention and performance degradation" + summary: "The CPU is high (85%) on NVMeoF Gateway host (node-1) on cluster mycluster" + description: "High CPU on a gateway host can lead to CPU contention and performance degradation" # NVMeoFInterfaceDown - triggered on eth0 only - interval: 30s input_series: - - series: 'ceph_nvmeof_subsystem_listener_iface_info{operstate="down", device="eth0"}' + - series: 'ceph_nvmeof_subsystem_listener_iface_info{operstate="down", device="eth0", cluster="mycluster"}' + values: '1+0x30' + - series: 'ceph_nvmeof_subsystem_listener_iface_info{operstate="up", device="eth1", cluster="mycluster"}' values: '1+0x30' - - series: 'ceph_nvmeof_subsystem_listener_iface_info{operstate="up", device="eth1"}' - values: '1+0x30' promql_expr_test: - expr: ceph_nvmeof_subsystem_listener_iface_info{operstate="down"} eval_time: 1m exp_samples: - - labels: '{__name__="ceph_nvmeof_subsystem_listener_iface_info", device="eth0", operstate="down"}' + - labels: '{__name__="ceph_nvmeof_subsystem_listener_iface_info", device="eth0", operstate="down", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 5m @@ -2550,24 +2577,25 @@ tests: oid: 1.3.6.1.4.1.50495.1.2.1.14.1 operstate: down device: eth0 + cluster: mycluster severity: warning type: ceph_default exp_annotations: - summary: "Network interface eth0 is down " - description: "A NIC used by one or more subsystems is in a down state" + summary: "Network interface eth0 is down on cluster mycluster" + description: "A NIC used by one or more subsystems is in a down state" # NVMeoFInterfaceDuplex - triggered on eth1 only - interval: 30s input_series: - - series: 'ceph_nvmeof_subsystem_listener_iface_info{duplex="full", device="eth0"}' - values: '1+0x30' - - series: 'ceph_nvmeof_subsystem_listener_iface_info{duplex="half", device="eth1"}' + - series: 'ceph_nvmeof_subsystem_listener_iface_info{duplex="full", device="eth0", cluster="mycluster"}' + values: '1+0x30' + - series: 'ceph_nvmeof_subsystem_listener_iface_info{duplex="half", device="eth1", cluster="mycluster"}' values: '1+0x30' promql_expr_test: - expr: ceph_nvmeof_subsystem_listener_iface_info{duplex!="full"} eval_time: 30s exp_samples: - - labels: '{__name__="ceph_nvmeof_subsystem_listener_iface_info", device="eth1", duplex="half"}' + - labels: '{__name__="ceph_nvmeof_subsystem_listener_iface_info", device="eth1", duplex="half", cluster="mycluster"}' value: 1 alert_rule_test: - eval_time: 5m @@ -2576,18 +2604,19 @@ tests: - exp_labels: duplex: half device: eth1 + cluster: mycluster severity: warning type: ceph_default exp_annotations: - summary: "Network interface eth1 is not running in full duplex mode " - description: "Until this is resolved, performance from the gateway will be degraded" + summary: "Network interface eth1 is not running in full duplex mode on cluster mycluster" + description: "Until this is resolved, performance from the gateway will be degraded" - # NVMeoFHighReadLatency + # NVMeoFHighReadLatency - interval: 30s input_series: - - series: 'ceph_nvmeof_bdev_read_seconds_total{instance="node-1:10008",bdev_name="disk1"}' - values: '0+1680x10 19800+3000x20' - - series: 'ceph_nvmeof_bdev_reads_completed_total{instance="node-1:10008",bdev_name="disk1"}' + - series: 'ceph_nvmeof_bdev_read_seconds_total{instance="node-1:10008",bdev_name="disk1",cluster="mycluster"}' + values: '0+1680x10 19800+3000x20' + - series: 'ceph_nvmeof_bdev_reads_completed_total{instance="node-1:10008",bdev_name="disk1",cluster="mycluster"}' values: '0+286000x10 2980000+120000x20' promql_expr_test: - expr: label_replace((avg by(instance) ((rate(ceph_nvmeof_bdev_read_seconds_total[1m]) / rate(ceph_nvmeof_bdev_reads_completed_total[1m])))),"gateway","$1","instance","(.*):.*") > 0.02 @@ -2610,14 +2639,14 @@ tests: type: ceph_default exp_annotations: summary: "The average read latency over the last 5 mins has reached 10 ms or more on node-1" - description: "High latencies may indicate a constraint within the cluster e.g. CPU, network. Please investigate" + description: "High latencies may indicate a constraint within the cluster e.g. CPU, network. Please investigate" - # NVMeoFHighWriteLatency + # NVMeoFHighWriteLatency - interval: 30s input_series: - - series: 'ceph_nvmeof_bdev_write_seconds_total{instance="node-1:10008",bdev_name="disk1"}' - values: '0+1680x10 19800+3000x20' - - series: 'ceph_nvmeof_bdev_writes_completed_total{instance="node-1:10008",bdev_name="disk1"}' + - series: 'ceph_nvmeof_bdev_write_seconds_total{instance="node-1:10008",bdev_name="disk1",cluster="mycluster"}' + values: '0+1680x10 19800+3000x20' + - series: 'ceph_nvmeof_bdev_writes_completed_total{instance="node-1:10008",bdev_name="disk1",cluster="mycluster"}' values: '0+286000x10 2980000+120000x20' promql_expr_test: - expr: label_replace((avg by(instance) ((rate(ceph_nvmeof_bdev_write_seconds_total[1m]) / rate(ceph_nvmeof_bdev_writes_completed_total[1m])))),"gateway","$1","instance","(.*):.*") > 0.02 @@ -2641,4 +2670,3 @@ tests: exp_annotations: summary: "The average write latency over the last 5 mins has reached 20 ms or more on node-1" description: "High latencies may indicate a constraint within the cluster e.g. CPU, network. Please investigate" -
\ No newline at end of file diff --git a/monitoring/ceph-mixin/tox.ini b/monitoring/ceph-mixin/tox.ini index 90ac311edba..8d1ec872e7f 100644 --- a/monitoring/ceph-mixin/tox.ini +++ b/monitoring/ceph-mixin/tox.ini @@ -26,6 +26,7 @@ allowlist_externals = jsonnet jsonnetfmt sh + ./lint-jsonnet.sh description = check: Ensure that auto-generated files matches the current version fix: Update generated files from jsonnet file with latest changes |