From 0c7d8ca9519a9b97a5f4efa4e112be2cc715e4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Herbel?= Date: Mon, 13 Jan 2025 13:38:25 +0100 Subject: [PATCH] df metric translations: Do not translate `fs_used_percent` into `fs_used` Also fix df metric translations for ceph plugins. CMK-21091 Change-Id: I29df20cb70a07351998a0827a7193c201b85e549 --- cmk/plugins/ceph/graphing/df_translations.py | 4 +++- cmk/plugins/collection/graphing/translations.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmk/plugins/ceph/graphing/df_translations.py b/cmk/plugins/ceph/graphing/df_translations.py index 005e6a47392..a2b4b9cdf0d 100644 --- a/cmk/plugins/ceph/graphing/df_translations.py +++ b/cmk/plugins/ceph/graphing/df_translations.py @@ -18,7 +18,9 @@ PassiveCheck("cephosdbluefs_slow"), ], translations={ - "~(?!%s).*$": RenameToAndScaleBy("fs_used", MIB), + "~(?!inodes_used|fs_size|growth|trend|reserved|fs_free|fs_provisioning|uncommitted|overprovisioned|dedup_rate|file_count|fs_used_percent).*$": RenameToAndScaleBy( + "fs_used", MIB + ), "fs_used": ScaleBy(MIB), "fs_size": ScaleBy(MIB), "reserved": ScaleBy(MIB), diff --git a/cmk/plugins/collection/graphing/translations.py b/cmk/plugins/collection/graphing/translations.py index 44db88a5b78..c4fd98e2338 100644 --- a/cmk/plugins/collection/graphing/translations.py +++ b/cmk/plugins/collection/graphing/translations.py @@ -437,7 +437,7 @@ ), "trend_hoursleft": translations.ScaleBy(3600), "uncommitted": translations.ScaleBy(1048576), - "~(?!inodes_used|fs_size|growth|trend|reserved|fs_free|fs_provisioning|uncommitted|overprovisioned|dedup_rate|file_count).*$": translations.RenameToAndScaleBy( + "~(?!inodes_used|fs_size|growth|trend|reserved|fs_free|fs_provisioning|uncommitted|overprovisioned|dedup_rate|file_count|fs_used_percent).*$": translations.RenameToAndScaleBy( "fs_used", 1048576, ), @@ -1509,7 +1509,7 @@ ), "trend_hoursleft": translations.ScaleBy(3600), "uncommitted": translations.ScaleBy(1048576), - "~(?!inodes_used|fs_size|growth|trend|reserved|fs_free|fs_provisioning|uncommitted|overprovisioned|dedup_rate|file_count).*$": translations.RenameToAndScaleBy( + "~(?!inodes_used|fs_size|growth|trend|reserved|fs_free|fs_provisioning|uncommitted|overprovisioned|dedup_rate|file_count|fs_used_percent).*$": translations.RenameToAndScaleBy( "fs_used", 1048576, ),