Skip to content

Commit

Permalink
Merge pull request #96 from aruniiird/BZ-2014167
Browse files Browse the repository at this point in the history
Fixing the queries for alerts 'CephMgrIsAbsent' and 'CephMgrIsMissingReplicas'
  • Loading branch information
umangachapagain committed Feb 2, 2022
2 parents 26c9ec5 + a32a4c3 commit eeb4045
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions alerts/absent_alerts.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
alert: 'CephMgrIsAbsent',
expr: |||
up{%(cephExporterSelector)s} == 0
label_replace((up{%(cephExporterSelector)s} == 0 or absent(up{%(cephExporterSelector)s})), "namespace", "openshift-storage", "", "")
||| % $._config,
'for': $._config.mgrIsAbsentAlertTime,
labels: {
Expand All @@ -23,7 +23,7 @@
{
alert: 'CephMgrIsMissingReplicas',
expr: |||
sum(up{%(cephExporterSelector)s}) by (namespace) < %(cephMgrCount)d
sum(kube_deployment_spec_replicas{deployment=~"rook-ceph-mgr-.*"}) by (namespace) < %(cephMgrCount)d
||| % $._config,
'for': $._config.mgrMissingReplicasAlertTime,
labels: {
Expand Down
4 changes: 2 additions & 2 deletions extras/manifests/prometheus-ceph-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
severity_level: critical
storage_type: ceph
expr: |
up{job="rook-ceph-mgr"} == 0
label_replace((up{job="rook-ceph-mgr"} == 0 or absent(up{job="rook-ceph-mgr"})), "namespace", "openshift-storage", "", "")
for: 5m
labels:
severity: critical
Expand All @@ -53,7 +53,7 @@ spec:
severity_level: warning
storage_type: ceph
expr: |
sum(up{job="rook-ceph-mgr"}) by (namespace) < 1
sum(kube_deployment_spec_replicas{deployment=~"rook-ceph-mgr-.*"}) by (namespace) < 1
for: 5m
labels:
severity: warning
Expand Down

0 comments on commit eeb4045

Please sign in to comment.