Module: check_mk
Branch: master
Commit: 1558783f2fad1698e8ab1a7c90c31e8dd558cd80
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1558783f2fad16…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Thu Jan 17 18:09:27 2019 +0100
k8s_pods_cm: don't import parse_frac_prefix from cmk module
Change-Id: Ifa7dee608451811719797d96b1572294fa7a2a89
---
checks/k8s_pods_cm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/checks/k8s_pods_cm b/checks/k8s_pods_cm
index 037969e..2ceb085 100644
--- a/checks/k8s_pods_cm
+++ b/checks/k8s_pods_cm
@@ -24,7 +24,12 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-from cmk.special_agents.agent_kubernetes import parse_frac_prefix
+
+def parse_frac_prefix(value):
+ # type: (str) -> float
+ if value.endswith('m'):
+ return 0.001 * float(value[:-1])
+ return float(value)
def parse_mul_prefix(value):