Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 09c952e62d6d13127fb4d46ee0d4bf419275d489
https://github.com/tribe29/checkmk/commit/09c952e62d6d13127fb4d46ee0d4bf419…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2019-09-13 (Fri, 13 Sep 2019)
Changed paths:
A .werks/10041
Log Message:
-----------
10041 FIX Reduce apache memory usage + Change check parameters API
We recognized that the 1.6 check parameter (ruleset) plugin mechanism (which
was based on classes and using the python abc module) consumed a lot more
memory than the previous plugin API.
The apache processes were ~50% bigger than in previous Checkmk releases which a
too large growth. The problem is that the apache processes are part of a
dynamic process pool which can scale from 5 to 64 processes (in the default
config). When your apache processes use 130 MB of memory, this means that you
would need to have ~8 GB of memory available to be able to handle high usage
peaks. In such a situation a single process growth of 50% is relevant and
should be avoided if possible.
If you have already ported your WATO check parameter plugins to 1.6 you will
now have to port it to the new mechanism.
The new plugin API for registering check parameters is similar to the 1.5 API,
but more explicit to make it easier to understand. For example the 'logins'
check parameter declaration looks like this:
C:+
from cmk.gui.i18n import _
from cmk.gui.valuespec import (
Integer,
Tuple,
)
from cmk.gui.plugins.wato import (
CheckParameterRulespecWithoutItem,
rulespec_registry,
RulespecGroupCheckParametersOperatingSystem,
)
def _parameter_valuespec_logins():
return Tuple(
help=_("This rule defines upper limits for the number of logins on a
system."),
elements=[
Integer(title=_("Warning at"), unit=_("users"),
default_value=20),
Integer(title=_("Critical at"), unit=_("users"),
default_value=30)
],
)
rulespec_registry.register(
CheckParameterRulespecWithoutItem(
check_group_name="logins",
group=RulespecGroupCheckParametersOperatingSystem,
parameter_valuespec=_parameter_valuespec_logins,
title=lambda: _("Number of Logins on System"),
))
C-:
Change-Id: I212c23fc01832d76f6abb4549081b19165a7b62f
Commit: 09bd29a1695258e36b2b974b7f46d51a2a29377c
https://github.com/tribe29/checkmk/commit/09bd29a1695258e36b2b974b7f46d51a2…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2019-09-13 (Fri, 13 Sep 2019)
Changed paths:
A .werks/10042
M cmk_base/config.py
Log Message:
-----------
10042 FIX Fix exception caused by autochecks with integers as items
The calculation of check parameters during activate changes or checking
could cause an exception like "TypeError: expected string or buffer" when
a discovery function of a check created services using integers as items
instead of strings.
Change-Id: I65cd5364e680eab688eaed2dae69db2d71e2be61
Compare:
https://github.com/tribe29/checkmk/compare/3f54eed96831...09bd29a16952