MKP 0.9.9, section mailcow_mailboxes completed
This commit is contained in:
@@ -57,4 +57,16 @@ metric_info["mailcow_domains_configured_mailboxes"] = {
|
||||
"title": _("Number of Configured Mailboxes"),
|
||||
"unit": "count",
|
||||
"color": "24/b",
|
||||
}
|
||||
|
||||
metric_info["mailcow_mailboxes_used_quota"] = {
|
||||
"title": _("Mailbox Quota Used"),
|
||||
"unit": "%",
|
||||
"color": "24/a",
|
||||
}
|
||||
|
||||
metric_info["mailcow_mailboxes_messages"] = {
|
||||
"title": _("Number of Messages"),
|
||||
"unit": "count",
|
||||
"color": "24/b",
|
||||
}
|
||||
@@ -22,6 +22,17 @@ perfometer_info.append({
|
||||
],
|
||||
})
|
||||
|
||||
perfometer_info.append({
|
||||
"type": "stacked",
|
||||
"perfometers": [
|
||||
{
|
||||
"type": "linear",
|
||||
"segments": ["mailcow_mailboxes_used_quota"],
|
||||
"total": 100.0,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
#perfometer_info.append({
|
||||
# "type": "stacked",
|
||||
# "perfometers": [
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
from cmk.gui.i18n import _
|
||||
from cmk.gui.plugins.wato import (
|
||||
CheckParameterRulespecWithItem,
|
||||
rulespec_registry,
|
||||
RulespecGroupCheckParametersApplications
|
||||
)
|
||||
from cmk.gui.valuespec import (
|
||||
Dictionary,
|
||||
ListChoice,
|
||||
TextAscii,
|
||||
Percentage,
|
||||
Tuple,
|
||||
Float,
|
||||
Integer
|
||||
)
|
||||
|
||||
def _item_spec_mailcow_mailboxes():
|
||||
return TextAscii(
|
||||
title=_("Domain")
|
||||
)
|
||||
|
||||
def _parameter_spec_mailcow_mailboxes():
|
||||
return Dictionary(
|
||||
elements=[
|
||||
("levels_mailcow_mailboxes_quota_used", Tuple(
|
||||
title=_("Mailcow mailbox quota usage for storage"),
|
||||
elements=[
|
||||
Percentage(
|
||||
title=_("Warning at"),
|
||||
default_value=65.0,
|
||||
),
|
||||
Percentage(
|
||||
title=_("Critical at"),
|
||||
default_value=85.0,
|
||||
)
|
||||
],
|
||||
)),
|
||||
("levels_mailcow_mailboxes_num_messages", Tuple(
|
||||
title=_("Number of messages in mailbox"),
|
||||
elements=[
|
||||
Integer(
|
||||
title=_("Warning at"),
|
||||
default_value=1000,
|
||||
),
|
||||
Integer(
|
||||
title=_("Critical at"),
|
||||
default_value=2500,
|
||||
)
|
||||
],
|
||||
)),
|
||||
],
|
||||
)
|
||||
|
||||
rulespec_registry.register(
|
||||
CheckParameterRulespecWithItem(
|
||||
check_group_name="mailcow_mailboxes",
|
||||
group=RulespecGroupCheckParametersApplications,
|
||||
match_type="dict",
|
||||
item_spec=_item_spec_mailcow_mailboxes,
|
||||
parameter_valuespec=_parameter_spec_mailcow_mailboxes,
|
||||
title=lambda: _("Levels for Mailcow mailboxes"),
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user