Checks for Solr status added

This commit is contained in:
2023-09-10 15:53:13 +02:00
parent 68188b0940
commit 199f8830da
5 changed files with 124 additions and 10 deletions

View File

@@ -69,4 +69,16 @@ metric_info["mailcow_mailboxes_messages"] = {
"title": _("Number of Messages"),
"unit": "count",
"color": "24/b",
}
metric_info["mc_solr_size"] = {
"title": _("Solr Size"),
"unit": "bytes",
"color": "24/b",
}
metric_info["mc_solr_documents"] = {
"title": _("Number of Solr Documents"),
"unit": "count",
"color": "24/a",
}

View File

@@ -56,6 +56,34 @@ def _parameter_spec_mailcow_info():
)
],
)),
("levels_solr_size", Tuple(
title=_("Solr size"),
elements=[
Float(
title=_("Warning at"),
default_value=4096.0,
unit="KBytes",
),
Float(
title=_("Critical at"),
default_value=8192.0,
unit="KBytes",
)
],
)),
("levels_solr_documents", Tuple(
title=_("Number of Solr documents"),
elements=[
Integer(
title=_("Warning at"),
default_value=2000,
),
Integer(
title=_("Critical at"),
default_value=4000,
)
],
)),
],
)
@@ -65,6 +93,6 @@ rulespec_registry.register(
group=RulespecGroupCheckParametersApplications,
match_type="dict",
parameter_valuespec=_parameter_spec_mailcow_info,
title=lambda: _("Mailcow Info"),
title=lambda: _("Levels for Mailcow info"),
)
)