I’m not perfectly sure but I think e.g. Ubuntu 20.04 doesn’t come with Python 2.x but only with Python 3.x by default. I tried to run
python3 mk_mongodb. I don’t have any MongoDB but just wanted to check if Python3 complains. It does so about the missing module
'pymongo' – but so it does when running it with python2. I guess that’s a module that would exist if I had MongoDB installed.
My suggestion would be to change the shebang line to
and give it a try. If that doesn’t work, then either make the agent plugin Python3 compatible (the tool
2to3 can be of help here) or install Python2.
EDIT: Another possibility might be that
python is already installed but not located in
which python. If that returns anything useful then change the shebang line accordingly. Or (prefered) set it to
#!/usr/bin/env python (note the