diff --git a/local/lib/python3/cmk/base/plugins/agent_based/mailcow_info.py b/local/lib/python3/cmk/base/plugins/agent_based/mailcow_info.py index 39cdd19..def00bf 100644 --- a/local/lib/python3/cmk/base/plugins/agent_based/mailcow_info.py +++ b/local/lib/python3/cmk/base/plugins/agent_based/mailcow_info.py @@ -33,9 +33,9 @@ def check_mailcow_info(params, section): levels_num_mailboxes = params["levels_num_mailboxes"] levels_num_global_messages = params["levels_num_global_messages"] levels_solr_size_kb = params["levels_solr_size"] - # Levels for Solr size are given in KBytes, so convert it to bytes - levels_solr_size_warn = levels_solr_size_kb[0] * 1024 - levels_solr_size_crit = levels_solr_size_kb[1] * 1024 + # Levels for Solr size are given in MBytes, so convert it to bytes + levels_solr_size_warn = levels_solr_size_kb[0] * 1024 * 1024 + levels_solr_size_crit = levels_solr_size_kb[1] * 1024 * 1024 levels_solr_size = (levels_solr_size_warn, levels_solr_size_crit) levels_solr_documents = params["levels_solr_documents"] @@ -86,8 +86,6 @@ def check_mailcow_info(params, section): # Create result for solr size and solr number of documents if solr_enabled: warn, crit = levels_solr_size - # levels are given in KB, so convert the size given Bytes - solr_size = solr_size / 1024 state = getStateUpper((warn, crit), solr_size) notice = f"Solr size: {render.bytes(solr_size)}" if state != State.OK: @@ -153,7 +151,7 @@ register.check_plugin( "levels_num_mailboxes": (500, 1000), "levels_num_global_messages": (100000, 250000), "levels_solr_size": (4096.0, 8192.0), - "levels_solr_documents": (2000, 4000) + "levels_solr_documents": (20000, 40000) }, check_ruleset_name="mailcow_info", ) \ No newline at end of file diff --git a/local/share/check_mk/web/plugins/wato/mailcow_info_rules.py b/local/share/check_mk/web/plugins/wato/mailcow_info_rules.py index b616823..4674162 100644 --- a/local/share/check_mk/web/plugins/wato/mailcow_info_rules.py +++ b/local/share/check_mk/web/plugins/wato/mailcow_info_rules.py @@ -62,12 +62,12 @@ def _parameter_spec_mailcow_info(): Float( title=_("Warning at"), default_value=4096.0, - unit="KBytes", + unit="MBytes", ), Float( title=_("Critical at"), default_value=8192.0, - unit="KBytes", + unit="MBytes", ) ], )), @@ -76,11 +76,11 @@ def _parameter_spec_mailcow_info(): elements=[ Integer( title=_("Warning at"), - default_value=2000, + default_value=20000, ), Integer( title=_("Critical at"), - default_value=4000, + default_value=40000, ) ], )), diff --git a/mkp/Mailcow-1.1.2.mkp b/mkp/Mailcow-1.1.2.mkp new file mode 100755 index 0000000..7a357cd Binary files /dev/null and b/mkp/Mailcow-1.1.2.mkp differ