From 6dd87d171c22d9f30267b2472aa9614121613e45 Mon Sep 17 00:00:00 2001 From: cmk-bonobo Date: Sat, 26 Aug 2023 15:19:23 +0200 Subject: [PATCH] MKP 0.2.1, calculation of create/modify time for domains corrected --- .../plugins/agent_based/mailcow_domains.py | 18 ++++++++++-------- mkp/Mailcow-0.2.1.mkp | Bin 0 -> 9393 bytes 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100755 mkp/Mailcow-0.2.1.mkp diff --git a/local/lib/python3/cmk/base/plugins/agent_based/mailcow_domains.py b/local/lib/python3/cmk/base/plugins/agent_based/mailcow_domains.py index dba2fa6..c6bee92 100644 --- a/local/lib/python3/cmk/base/plugins/agent_based/mailcow_domains.py +++ b/local/lib/python3/cmk/base/plugins/agent_based/mailcow_domains.py @@ -95,18 +95,20 @@ def parse_mailcow_domains_section(string_table): if create_time_value == "None": create_time_data = "Not available" else: - create_time = int(create_time_value) - curr_time = int(time.time()) - diff_time = curr_time - create_time - create_time_data = render.timespan(diff_time) + create_time_data = create_time_value + #create_time = int(create_time_value) + #curr_time = int(time.time()) + #diff_time = curr_time - create_time + #create_time_data = render.timespan(diff_time) modify_time_value = line[3] if modify_time_value == "None": modify_time_data = "Never" else: - modify_time = int(modify_time_value) - curr_time = int(time.time()) - diff_time = curr_time - modify_time - modify_time_data = render.timespan(diff_time) + modify_time_data = modify_time_value + #modify_time = int(modify_time_value) + #curr_time = int(time.time()) + #diff_time = curr_time - modify_time + #modify_time_data = render.timespan(diff_time) # calculate percentage of used mailboxes max_number_of_mailboxes = int(line[4]) number_of_mailboxes = int(line[5]) diff --git a/mkp/Mailcow-0.2.1.mkp b/mkp/Mailcow-0.2.1.mkp new file mode 100755 index 0000000000000000000000000000000000000000..c1d324879e3a44817817c00464d689efa50a571d GIT binary patch literal 9393 zcmai(MN}LL(4}z*?hxGF-3bzcySuwv;}C)qTpD+GcX#*T?(Wcd&s)rH=AT(rZSOg^ zPSyR2G#UZH`2EZr3ansaV{hgJU}j_CU}0x*u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