checkmk icon indicating copy to clipboard operation
checkmk copied to clipboard

make mysql capacity check optional

Open ITJamie opened this issue 1 year ago • 1 comments

General information

on a shared hosting server we found the capacity check was adding extreme amounts of load to our MySQL server. it was also causing the checkmk agent to not respond in time (per https://forum.checkmk.com/t/cmk-agent-connection-ok-dump-has-no-output/38598)

timed dump command before disabling the mysql_capacity check

real	2m3.968s
user	0m0.002s
sys	0m0.006s

timed dump after disabling the mysql_capacity check

real	0m15.227s
user	0m0.002s
sys	0m0.013s

Proposed changes

This change makes it possible to easily disable the capacity checks by creating a local file at ${MK_CONFDIR}/mysql.local.disable_capacity_checks The existing usecase will not change at all if the file does not exist.

ITJamie avatar Jun 24 '24 21:06 ITJamie

re-opening https://github.com/Checkmk/checkmk/pull/671 which was closed unexpectedly

ITJamie avatar Jun 24 '24 21:06 ITJamie

Hi ITJamie,

Thanks a lot for your pull request.

While we definitely see the use case behind it, we'd kindly ask you for your understanding that we have to decline it for the following reasons:

  • For reasons of consistency, it should be possible to not only enable and disable the capacity section, but all of them—each individually.
  • Our approach to control the agent plugins' behavior is to use .cfg files as they are referenced in several places in this plugin, for example here. You can find an example of such a config file here.

We'd be happy to receive an updated version of your code with these changes applied. For organizational reasons however, we can't handle this in the course of this very pull request, but will have to ask you for creating a new one.

Thanks for your understanding.

Best,

Nik

NikCheckmk avatar Sep 13 '24 15:09 NikCheckmk