Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Status
colourGreen
titleLAST TESTED ON CHECKMK 2.0.0P1


Panel
borderColorblack
bgColor#f8f8f8
titleTable of Contents

Table of Contents


Since Checkmk 2.0, we do provide Python inside the Checkmk Agent (Werk # 10689). If you're using PYTHONHOME or PYTHONPATH, you may run into a similar issue:

...

  1. Verify if PYTHONHOME and PYTHONPATH are really set.

    Code Block
    languagebash
    themeRDark
    C:\ProgramData\checkmk\agent\plugins>set | findstr /c:"PYTHON"
    PYTHONHOME="C:\Program Files\Python38"
    PYTHONPATH="C:\Program Files\Python38\Lib"

    .

  2. Remove that from the settings:

    Code Block
    languagebash
    themeRDark
    C:\Program Files (x86)\checkmk\service>set PYTHONHOME=
    C:\Program Files (x86)\checkmk\service>set PYTHONPATH=

    .

  3. Try again to run the Checkmk updater

    Code Block
    languagebash
    themeRDark
    C:\Program Files (x86)\checkmk\service>check_mk_agent.exe updater register
    Using previous settings from C:\ProgramData\checkmk\agent\config\cmk-update-agent.state.
    Our host name in the monitoring:

    .

Some background information:

Screenshot of some python documentation highlighting information regarding PYTHONHOMEImage Modified


Tip
More information can be found here:  https://docs.python.org/3/using/windows.html

...

You're able to run multiple Python Versions on one Windows machine. For that, we see two approaches at the moment.

  • Call your scripts with the correct Python version e.g.

    Code Block
    languagebash
    themeRDark
    c:\python\3.8\python.exe 
    c:\python\2.7\python.exe

    .

  • You can create a virtual env for your customized Python version like we do: https://virtualenv.pypa.io/en/latest/

    Code Block
    languagebash
    themeRDark
     'C:\ProgramData\checkmk\agent\modules\python-3\.venv\Scripts\python.exe C:\ProgramData\checkmk\agent\plugins\cmk_update_agent.checkmk.py'


...