Before 2.0 this worked for me. But now after the Updates it doesn’t work anymore automatically with Cron Jobs.
I put the vm_parent.py in the $OMD_ROOT/local/bin and the mkp in $OMD_ROOT/local/lib/python.
Always when run the Cron Job, it give me this:
Traceback (most recent call last):
File “(vm_parent.py path”, line 10, in
import checkmkapi
ModuleNotFoundError: No module named ‘checkmkapi’
Or what command do I need to enter in the Cronjob.
Currently I have:
python /omd/sites/(my-site)/local/bin/vm_parent.py -s (Monitoring link) -u automation -p (key)
Still the same…
Traceback (most recent call last):
File “($OMD_ROOT)/local/bin/vm_parent.py”, line 10, in
import checkmkapi
ModuleNotFoundError: No module named ‘checkmkapi’
There is the error. You cannot start this script with Python 2 any more. Replace python with python3 or just omit it as the script itself has the correct hashbang and should be executable.
This is due to the latest change in the API. Now an eTag is required to activate changes. I have not incorporated that change into the code of the API wrapper yet.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.