Skip to content

Commit

Permalink
Merge pull request #91 from aruniiird/change-CephMgrIsAbsent-alert
Browse files Browse the repository at this point in the history
Change ceph mgr is absent alert and add namespace to ceph_node_down query
  • Loading branch information
umangachapagain committed Feb 2, 2022
2 parents 9546077 + 922f224 commit aafd91b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion alerts/absent_alerts.libsonnet
Expand Up @@ -7,7 +7,7 @@
{
alert: 'CephMgrIsAbsent',
expr: |||
absent(up{%(cephExporterSelector)s} == 1)
up{%(cephExporterSelector)s} == 0
||| % $._config,
'for': $._config.mgrIsAbsentAlertTime,
labels: {
Expand Down
4 changes: 2 additions & 2 deletions extras/manifests/prometheus-ceph-rules.yaml
Expand Up @@ -11,7 +11,7 @@ spec:
- name: ceph.rules
rules:
- expr: |
kube_node_status_condition{condition="Ready",job="kube-state-metrics",status="true"} * on (node) group_right() max(label_replace(ceph_disk_occupation{job="rook-ceph-mgr"},"node","$1","exported_instance","(.*)")) by (node)
kube_node_status_condition{condition="Ready",job="kube-state-metrics",status="true"} * on (node) group_right() max(label_replace(ceph_disk_occupation{job="rook-ceph-mgr"},"node","$1","exported_instance","(.*)")) by (node, namespace)
record: cluster:ceph_node_down:join_kube
- expr: |
avg(topk by (ceph_daemon) (1, label_replace(label_replace(ceph_disk_occupation{job="rook-ceph-mgr"}, "instance", "$1", "exported_instance", "(.*)"), "device", "$1", "device", "/dev/(.*)")) * on(instance, device) group_right(ceph_daemon) topk by (instance,device) (1,(irate(node_disk_read_time_seconds_total[1m]) + irate(node_disk_write_time_seconds_total[1m]) / (clamp_min(irate(node_disk_reads_completed_total[1m]), 1) + irate(node_disk_writes_completed_total[1m])))))
Expand Down Expand Up @@ -42,7 +42,7 @@ spec:
severity_level: critical
storage_type: ceph
expr: |
absent(up{job="rook-ceph-mgr"} == 1)
up{job="rook-ceph-mgr"} == 0
for: 5m
labels:
severity: critical
Expand Down
2 changes: 1 addition & 1 deletion rules/rules.libsonnet
Expand Up @@ -7,7 +7,7 @@
{
record: 'cluster:ceph_node_down:join_kube',
expr: |||
kube_node_status_condition{condition="Ready",job="kube-state-metrics",status="true"} * on (node) group_right() max(label_replace(ceph_disk_occupation{%(cephExporterSelector)s},"node","$1","exported_instance","(.*)")) by (node)
kube_node_status_condition{condition="Ready",job="kube-state-metrics",status="true"} * on (node) group_right() max(label_replace(ceph_disk_occupation{%(cephExporterSelector)s},"node","$1","exported_instance","(.*)")) by (node, namespace)
||| % $._config,
},
{
Expand Down

0 comments on commit aafd91b

Please sign in to comment.