Skip to content

Commit

Permalink
use correct units for MDSCacheUsageHigh alerts
Browse files Browse the repository at this point in the history
ceph-mds-mem-rss, used in MDSCacheUsageHigh alert, is in KB
rather than bytes. This PR converts the ceph-mds-mem-rss metric
value to bytes before comparing it with the mds pod memory limit.

Signed-off-by: sp98 <[email protected]>
  • Loading branch information
sp98 committed Jan 4, 2024
1 parent e4fb5bd commit 27a90ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metrics/deploy/prometheus-ocs-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ spec:
message: High MDS cache usage for the daemon {{ $labels.ceph_daemon }}.
severity_level: error
expr: |
ceph_mds_mem_rss / on(ceph_daemon) group_left(job)(label_replace(kube_pod_container_resource_requests{container="mds", resource="memory"}, "ceph_daemon", "mds.$1", "pod", "rook-ceph-mds-(.*)-(.*)") * .5) > .95
(ceph_mds_mem_rss * 1000) / on(ceph_daemon) group_left(job)(label_replace(kube_pod_container_resource_requests{container="mds", resource="memory"}, "ceph_daemon", "mds.$1", "pod", "rook-ceph-mds-(.*)-(.*)") * .5) > .95
for: 5m
labels:
severity: critical
Expand Down
2 changes: 1 addition & 1 deletion metrics/mixin/alerts/perf.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
alert: 'MDSCacheUsageHigh',
expr: |||
ceph_mds_mem_rss / on(ceph_daemon) group_left(job)(label_replace(kube_pod_container_resource_requests{container="mds", resource="memory"}, "ceph_daemon", "mds.$1", "pod", "rook-ceph-mds-(.*)-(.*)") * .5) > .95
(ceph_mds_mem_rss * 1000) / on(ceph_daemon) group_left(job)(label_replace(kube_pod_container_resource_requests{container="mds", resource="memory"}, "ceph_daemon", "mds.$1", "pod", "rook-ceph-mds-(.*)-(.*)") * .5) > .95
||| % $._config,
'for': $._config.mdsCacheUsageAlertTime,
labels: {
Expand Down

0 comments on commit 27a90ff

Please sign in to comment.