44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
from cmk.gui.i18n import _
|
|
from cmk.gui.plugins.wato import (
|
|
CheckParameterRulespecWithoutItem,
|
|
rulespec_registry,
|
|
RulespecGroupCheckParametersApplications
|
|
)
|
|
from cmk.gui.valuespec import (
|
|
Dictionary,
|
|
ListChoice,
|
|
Tuple,
|
|
Percentage,
|
|
Integer,
|
|
Float,
|
|
)
|
|
|
|
def _parameter_spec_nextcloud_database():
|
|
return Dictionary(
|
|
elements=[
|
|
("levels_database_opcache_hit_rate", Tuple(
|
|
title=_("Nextcloud levels for database php opcache hit rate"),
|
|
elements=[
|
|
Percentage(
|
|
title=_("Warning below"),
|
|
default_value=99.7,
|
|
),
|
|
Percentage(
|
|
title=_("Critical below"),
|
|
default_value=99.1,
|
|
)
|
|
],
|
|
)),
|
|
],
|
|
)
|
|
|
|
rulespec_registry.register(
|
|
CheckParameterRulespecWithoutItem(
|
|
check_group_name="nextcloud_database",
|
|
group=RulespecGroupCheckParametersApplications,
|
|
match_type="dict",
|
|
parameter_valuespec=_parameter_spec_nextcloud_database,
|
|
title=lambda: _("Nextcloud Database"),
|
|
)
|
|
)
|