Ruleset Command line in virtual env?

Hello,
like in the picture above i want to define a new rule.
The specific command i want to use is only available inside a virtual environment.
Do i have to activate the virtual command line in this field before pasting my actual command which i want to use?

Its about my connection from check_mk to gvm with this command:
gvm-script -c /.../etc/gvm-tools.conf ssh --hostname 192.168.10.169 $USER1$/check-gmp.gmp.py -F $HOSTADDRESS$ --last-report -T $ARG1$ --status

gvm-script is only available if i activate the virtual env first.

best regards,
yannick

Why are you using a Python virtual environment? Do you need Python3 in checkmk 1.6?

Checkmk brings its own Python interpreter and the site user is able to install Python modules with pip install.

If that does not work you will need to create a wrapper script that enables the virtual environment and executes gvm-script. This wrapper should be placed in $OMD_ROOT/local/lib/nagios/plugins for checkmk to find it as an active check.

Thank you for the answer,
yes i need Python3 and i am running checkmk 1.7 now, forgot to mention this.

I have never created a wrapper script, when i am going to install the package it gives me
WARNING: Target directory /omd/sites/gvm/local/lib/python3/__pycache__ already exists. Specify --upgrade to force replacement.

But even if i get this running, you said i need to place the wrapper script in /.../plugins ?
Do i need to do something else with it that checkmk finds it as an active check?

I am sorry for asking basics like this but i am new to checkmk and python

If you use 1.7 it should be possible to install the needed modules with “pip3 install …”

of course i tried it, but it gives me same warning like i posted above target directory already exists... specify --upgrade to force replacement. I dont want to force a replacement. Did that once and after executing my python was totally broken and so checkmk

Then you already installed something there.
I tested with an empty 1.7 site and it was working without any problems.

I just tried an empty site too. Installation finishes without any erros. Unfortunately no python commands which the installation brings with it is found.

I think i need to export the pythonpath to get it done

Dont get confused about my last post…this was about trying to install the greenbone gvm-tools for wich i used a virtualenv before.
So it must be possible using gvm-tools without a virtualenv

It would be good to see what you do. Without this information no one can comprehend why you get the errors or you installed python libs are not found.

To make it short: It works now.
I wanted to use python gvm-tools, but never got it running properly without a virtualenv.

After you said that under version 1.7 it should be possible to install packages which requires python3, i got curious.
I updated pip, installed gvm-tools again and suddenly it gave me a warning which PATH i have to add to get it running… and finally it works.

Thank you, and forgive me for my bad linux skills