Branch: refs/heads/master
Home:
https://github.com/Checkmk/checkmk
Commit: 9a8e9837011e91e4654d29ff45f8915ef51a8139
https://github.com/Checkmk/checkmk/commit/9a8e9837011e91e4654d29ff45f8915ef…
Author: Moritz Kiemer <moritz.kiemer(a)checkmk.com>
Date: 2023-10-31 (Tue, 31 Oct 2023)
Changed paths:
M cmk/base/api/agent_based/utils.py
M cmk/base/check_api.py
M cmk/utils/prediction/__init__.py
M cmk/utils/prediction/_plugin_interface.py
M tests/unit/checks/test_mem_win.py
M tests/unit/cmk/base/api/agent_based/test_utils_check_levels_predictive.py
M tests/unit/cmk/base/plugins/agent_based/test_diskstat.py
M tests/unit/cmk/base/plugins/agent_based/utils/test_cpu_load.py
Log Message:
-----------
prediction: prepare to inject callback into params
This patch changes `get_updated_prediction` to a class.
That way we can move its creation into `check_levels_predictive`.
As a next step we can push it further up, removing the `livestatus`
and `cmk.utils.prediction` dependency from the agent_based API.
Change-Id: I39004657ec287ed19917e977f59aabe239f3853a
Commit: 00099784366af83f16e342aa828eb730e2749fff
https://github.com/Checkmk/checkmk/commit/00099784366af83f16e342aa828eb730e…
Author: Moritz Kiemer <moritz.kiemer(a)checkmk.com>
Date: 2023-10-31 (Tue, 31 Oct 2023)
Changed paths:
M cmk/base/api/agent_based/utils.py
M cmk/base/check_api.py
M cmk/utils/prediction/_plugin_interface.py
Log Message:
-----------
prediction: prepare to inject callback into params II
Change-Id: I1d391098d7146e64009a9c99fcc0f863f552d655
Commit: 8deaf32e9685a1d34d2cdf4b6bb1c36c4ff7f924
https://github.com/Checkmk/checkmk/commit/8deaf32e9685a1d34d2cdf4b6bb1c36c4…
Author: Moritz Kiemer <moritz.kiemer(a)checkmk.com>
Date: 2023-10-31 (Tue, 31 Oct 2023)
Changed paths:
M cmk/gui/wato/_levels.py
Log Message:
-----------
predicive levels: add trivial translation
This patch adds a trivial transform for the sole purpose
of making the upcoming change more ease to review.
Change-Id: I5cdb4dbb37f34bb58a3e81d507e7e281ce977ad1
Commit: 4171bea08fd8e574097807d8b8f23223fce5f006
https://github.com/Checkmk/checkmk/commit/4171bea08fd8e574097807d8b8f23223f…
Author: Moritz Kiemer <moritz.kiemer(a)checkmk.com>
Date: 2023-10-31 (Tue, 31 Oct 2023)
Changed paths:
M cmk/agent_based/v1_backend/plugin_contexts.py
M cmk/base/api/agent_based/utils.py
M cmk/base/check_api.py
M cmk/base/checkers.py
M cmk/gui/wato/_levels.py
A tests/testlib/prediction.py
M tests/unit/checks/test_mem_win.py
M tests/unit/cmk/base/api/agent_based/test_utils_check_levels_predictive.py
M tests/unit/cmk/base/plugins/agent_based/test_diskstat.py
M tests/unit/cmk/base/plugins/agent_based/utils/test_cpu_load.py
Log Message:
-----------
prediction/check api: pass prediction updater as callback
This patch changes the way the predictive levels are
computed during checking.
Instead of relying on two global variables we pass
a callback. This makes the de-facto dependencies of
the backend explicit: livestatus and cmk.utils.prediction.
I don't particularly like the magic key in the parameters,
but I think this is better than the alternative.
This solution relies on the fact that the parameters are
typed Mapping[str, Any].
In some future API we could either find a better solution
altogether, or at least expose some Protolol that describes
what we expect from a "PredictionUpdater".
Change-Id: I47749ec781e7563ba05ddfedcd9fde907fee9842
Commit: c6af6146a1e86f330d2abf862db24a94e8b121e2
https://github.com/Checkmk/checkmk/commit/c6af6146a1e86f330d2abf862db24a94e…
Author: Moritz Kiemer <moritz.kiemer(a)checkmk.com>
Date: 2023-10-31 (Tue, 31 Oct 2023)
Changed paths:
M cmk/base/api/agent_based/utils.py
Log Message:
-----------
check_levels_predictive: drop MKGeneralException
`check_predictive_levels` no longer calls any functions, which raise
`MKGeneralException`.
Change-Id: Ifb738843132e7855db4b788cce7c6eeb2c273350
Commit: 9652261a04ff77ecb4c800d00bcbc92fb4f9dee9
https://github.com/Checkmk/checkmk/commit/9652261a04ff77ecb4c800d00bcbc92fb…
Author: Moritz Kiemer <moritz.kiemer(a)checkmk.com>
Date: 2023-10-31 (Tue, 31 Oct 2023)
Changed paths:
M cmk/base/api/agent_based/utils.py
Log Message:
-----------
check_levels_predictive: do not handle exceptions
Letting the exceptions raise will not only result in an
unknown state, but also create a crash report these days.
Change-Id: Id8b7e6926b342ac7bcc2dad29dde7a64ba6b52e8
Compare:
https://github.com/Checkmk/checkmk/compare/29c6100db6a5...9652261a04ff