Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »


Problem: zipped Python module

During the registration of the Check_MK Updater on Windows, you may face this issue:

C:\Program Files (x86)\checkmk\service>check_mk_agent.exe updater -vv
        You must install Python Module to use the updater with parameters '-vv'. 
       To install Python Module you should use Bakery.

Please make sure that you open the cmd/powershell as an administrator!


The problem is, that the python module either was not successfully unzipped during the updater process:

or the folder is completety empty


A possible workaround


If you have only a python_x.cap file 

For some reasons it is possible, that  you have only one python_x.cap file in your folder. In that case you have these two options:

Reinstall of the Python (if the folder is zippped)

mkdir C:\ProgramData\checkmk\agent\modules\python-3 & expand C:\ProgramData\checkmk\agent\install\modules\python-3.cab -F:* C:\ProgramData\checkmk\agent\modules\python-3 && cd C:\ProgramData\checkmk\agent\modules\python-3 && call postinstall.cmd

Reinstall of the Python (if the folder is empty)

expand C:\ProgramData\checkmk\agent\install\modules\python-3.cab -F:* C:\ProgramData\checkmk\agent\modules\python-3 && cd C:\ProgramData\checkmk\agent\modules\python-3 && call postinstall.cmd


Reinstall of the Python (if the folder is zippped)

mkdir C:\ProgramData\checkmk\agent\modules\python-3.8 & expand C:\ProgramData\checkmk\agent\install\modules\python-3.8.zip -F:* C:\ProgramData\checkmk\agent\modules\python-3.8 && cd C:\ProgramData\checkmk\agent\modules\python-3.8  && call postinstall.cmd

Reinstall of the Python (if the folder is empty)

expand C:\ProgramData\checkmk\agent\install\modules\python-3.8.zip -F:* C:\ProgramData\checkmk\agent\modules\python-3.8 && cd C:\ProgramData\checkmk\agent\modules\python-3.8  && call postinstall.cmd

Solutions

Increase the timeout of the updater

Via bakery

Go to Setup → Agents → Windows, Linux, Solaris, AIX → Agent rules → Set timeouts for plugins and local checks

Script Pattern: cmk_update_agent.checkmk.py

After saving the rule you need to bake and sign the new agent!

Here we described in a detailed way how to configure caching and timeout for Windows plugins:  Asynchronous execution of Windows plugins 

Via config file

C:\ProgramData\checkmk\check_mk.user.yml
plugins:
enabled: true
execution:
cache_age: 86400
pattern: $CUSTOM_PLUGINS_PATH$\cmk_update_agent.checkmk.py
timeout: 180


Create an exception for the AV

Please create an exception for the following paths for the AV:

C:\ProgramData\checkmk
C:\Program Files (x86)\checkmk


Reinstall python

:: Reinstall Checkmk Python module for Windows agent
@echo off
if not exist "%ProgramData%\checkmk\agent\install\modules\python-3.8.zip" (
echo "%ProgramData%\checkmk\agent\install\modules\python-3.8.zip" is absent, impossible to reinstall
exit  /b 1
)
cd %ProgramData%\checkmk\agent || echo "Windows agent is not installed" && exit /b 11
net stop checkmkservice
mkdir modules\python-3.8
cd modules\python-3.8
expand %ProgramData%\checkmk\agent\install\modules\python-3.8.zip -F:* %ProgramData%\checkmk\agent\modules\python-3.8 1>nul
call postinstall.cmd
net start checkmkservice


  • No labels