removed all Solr modules
This commit is contained in:
@@ -2,7 +2,7 @@ from cmk.gui.i18n import _
|
||||
from cmk.gui.plugins.wato import (
|
||||
CheckParameterRulespecWithoutItem,
|
||||
rulespec_registry,
|
||||
RulespecGroupCheckParametersApplications
|
||||
RulespecGroupCheckParametersApplications,
|
||||
)
|
||||
|
||||
from cmk.gui.valuespec import (
|
||||
@@ -14,11 +14,14 @@ from cmk.gui.valuespec import (
|
||||
Float,
|
||||
)
|
||||
|
||||
|
||||
def _parameter_spec_mailcow_info():
|
||||
return Dictionary(
|
||||
elements=[
|
||||
("levels_num_domains", Tuple(
|
||||
title=_("Number of email domains"),
|
||||
(
|
||||
"levels_num_domains",
|
||||
Tuple(
|
||||
title=_("Number of email domains"),
|
||||
elements=[
|
||||
Integer(
|
||||
title=_("Warning at"),
|
||||
@@ -29,11 +32,14 @@ def _parameter_spec_mailcow_info():
|
||||
title=_("Critical at"),
|
||||
size=32,
|
||||
default_value=200,
|
||||
)
|
||||
),
|
||||
],
|
||||
)),
|
||||
("levels_num_mailboxes", Tuple(
|
||||
title=_("Number of mailboxes"),
|
||||
),
|
||||
),
|
||||
(
|
||||
"levels_num_mailboxes",
|
||||
Tuple(
|
||||
title=_("Number of mailboxes"),
|
||||
elements=[
|
||||
Integer(
|
||||
title=_("Warning at"),
|
||||
@@ -44,11 +50,14 @@ def _parameter_spec_mailcow_info():
|
||||
title=_("Critical at"),
|
||||
size=32,
|
||||
default_value=1000,
|
||||
)
|
||||
),
|
||||
],
|
||||
)),
|
||||
("levels_num_global_messages", Tuple(
|
||||
title=_("Number of messages"),
|
||||
),
|
||||
),
|
||||
(
|
||||
"levels_num_global_messages",
|
||||
Tuple(
|
||||
title=_("Number of messages"),
|
||||
elements=[
|
||||
Integer(
|
||||
title=_("Warning at"),
|
||||
@@ -59,44 +68,14 @@ def _parameter_spec_mailcow_info():
|
||||
title=_("Critical at"),
|
||||
size=32,
|
||||
default_value=250000,
|
||||
)
|
||||
],
|
||||
)),
|
||||
("levels_solr_size", Tuple(
|
||||
title=_("Solr size"),
|
||||
elements=[
|
||||
Float(
|
||||
title=_("Warning at"),
|
||||
size=32,
|
||||
default_value=4096.0,
|
||||
unit="MBytes",
|
||||
),
|
||||
Float(
|
||||
title=_("Critical at"),
|
||||
size=32,
|
||||
default_value=8192.0,
|
||||
unit="MBytes",
|
||||
)
|
||||
],
|
||||
)),
|
||||
("levels_solr_documents", Tuple(
|
||||
title=_("Number of Solr documents"),
|
||||
elements=[
|
||||
Integer(
|
||||
title=_("Warning at"),
|
||||
size=32,
|
||||
default_value=20000,
|
||||
),
|
||||
Integer(
|
||||
title=_("Critical at"),
|
||||
size=32,
|
||||
default_value=40000,
|
||||
)
|
||||
],
|
||||
)),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
rulespec_registry.register(
|
||||
CheckParameterRulespecWithoutItem(
|
||||
check_group_name="mailcow_info",
|
||||
@@ -105,4 +84,4 @@ rulespec_registry.register(
|
||||
parameter_valuespec=_parameter_spec_mailcow_info,
|
||||
title=lambda: _("Levels for Mailcow info"),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -27,36 +27,72 @@ from cmk.gui.valuespec import (
|
||||
Integer,
|
||||
)
|
||||
|
||||
|
||||
def _valuespec_special_agent_mailcow():
|
||||
return Dictionary(
|
||||
title=_("Mailcow Server Information"),
|
||||
help = _("Checking Mailcow instances via API"),
|
||||
help=_("Checking Mailcow instances via API"),
|
||||
elements=[
|
||||
("hostname", TextAscii(title=_("Hostname"),
|
||||
size=32,
|
||||
allow_empty=False,
|
||||
help=_("Hostname of Mailcow server (bare FQDN or IP), mandatory"))),
|
||||
("apikey", IndividualOrStoredPassword(title=_("API Key"),
|
||||
size=32,
|
||||
allow_empty=False,
|
||||
help=_("API Key, mandatory"))),
|
||||
("port", TextAscii(title=_("Port"),
|
||||
allow_empty=True,
|
||||
help=_("Specify port if not listening to HTTPS/HTTP, optional"))),
|
||||
("check_version", Checkbox(title=_("Check version"),
|
||||
help=_("Checks the running version against the public Github repo"))),
|
||||
("no_https", Checkbox(title=_("Disable HTTPS"),
|
||||
help=_("Activate to disable TLS encryption (not recommended), optional"))),
|
||||
("no_cert_check", Checkbox(title=_("Disable certificate validation"),
|
||||
help=_("Activate to disable certificate validation (not recommended), optional"))),
|
||||
(
|
||||
"hostname",
|
||||
TextAscii(
|
||||
title=_("Hostname"),
|
||||
size=32,
|
||||
allow_empty=False,
|
||||
help=_("Hostname of Mailcow server (bare FQDN or IP), mandatory"),
|
||||
),
|
||||
),
|
||||
(
|
||||
"apikey",
|
||||
IndividualOrStoredPassword(
|
||||
title=_("API Key"),
|
||||
size=32,
|
||||
allow_empty=False,
|
||||
help=_("API Key, mandatory"),
|
||||
),
|
||||
),
|
||||
(
|
||||
"port",
|
||||
TextAscii(
|
||||
title=_("Port"),
|
||||
allow_empty=True,
|
||||
help=_("Specify port if not listening to HTTPS/HTTP, optional"),
|
||||
),
|
||||
),
|
||||
(
|
||||
"check_version",
|
||||
Checkbox(
|
||||
title=_("Check version"),
|
||||
help=_("Checks the running version against the public Github repo"),
|
||||
),
|
||||
),
|
||||
(
|
||||
"no_https",
|
||||
Checkbox(
|
||||
title=_("Disable HTTPS"),
|
||||
help=_(
|
||||
"Activate to disable TLS encryption (not recommended), optional"
|
||||
),
|
||||
),
|
||||
),
|
||||
(
|
||||
"no_cert_check",
|
||||
Checkbox(
|
||||
title=_("Disable certificate validation"),
|
||||
help=_(
|
||||
"Activate to disable certificate validation (not recommended), optional"
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
optional_keys=[],
|
||||
)
|
||||
|
||||
|
||||
rulespec_registry.register(
|
||||
HostRulespec(
|
||||
group=RulespecGroupDatasourceProgramsApps,
|
||||
name="special_agents:mailcow",
|
||||
valuespec=_valuespec_special_agent_mailcow,
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user