RobotMK - Include python modules in agent?

Hey everyone,

We started using RobotMK to monitor some websites of ours but we are facing an annoying issue when we bake new agents.
Each and every time we bake/deploy a new agent, we have to connect on the host monitoring our websites (Windows server) and do the following :

  • Execute C:\ProgramData\checkmk\agent\modules\python-3.venv\Scripts\activate.ps1
  • install all these modules robotframework, webdrivermanager, webdriver_manager, selenium, mergedeep, python-dateutil, robotframework-seleniumlibrary, pyyaml, geckodriver

Isn’t there a way to “include” these modules with the agent to avoid manual intervention after the installation of the new agent on the server ?

We are using CheckMK enterprise 2.1.0p33

Thank you in advance for your help.

Regards,

Vincent

Hallo,
have a look to the videos of the last conference.
I think this was mentioned there.
Ralf

Hey,

Thank you for your answer, any uri of that conference ?

Regards,

Vincent

yes

Ralf

Hi Vincent,

sorry for my late answer.
I cannot recommend to use the Agent internal Python interpreter. Shipping the RF libraries with the agent does not scale and is not easy to maintain.
Therefore, install Python on the OS so that it’s usable for all users. Then, in an administrative cmd, install all needed packages.
This is how I do it, it works without problems.
Regards,
Simon

Also check out this post here:

Hey Simon,

Thanks for this last comment, this sounds the missing info ! I installed python on a box but Checkmk always uses the one provided by the agent and of course if I avoide to install python from the agent, nothing was working anymore…

I will check this when I have a bit of time.

Regards,

Vincent

Yes, sounds like exactly this problem :slight_smile:
In Robotmk v2 we will have a very cool feature named RCC inside, which makes any Python installation superfluous.
A small YML file is all you need to describe how the environment should be created. :relieved:

Hey Simon,

Sorry for answering that late but could change config because of infra freeze.

I tried the agent config + denied py file from being executed but now my agent isn’t using ssl/tls anymore and the auto updater is also broken:

PS C:\Program Files (x86)\checkmk\service> .\check_mk_agent.exe updater

    You must install Python Module to use the updater with parameters ''.
    To install Python Module you should use Bakery.

Any idea what’s wrong here ?

Regards,

Vincent