I’m trying to use the plugin mk_mongodb, I put it the file in the next mongo server path /usr/lib/check_mk_agent/plugins also I granted excute permissions like mk_postgres, but unfortunately this didn’t work.
Someone have any clue of how to use it this plugin?
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
#!/usr/bin/env python3
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 pythonis already installed but not located in /usr/bin/python. Try which python. If that returns anything useful then change the shebang line accordingly. Or (prefered) set it to #!/usr/bin/env python (note the python vs. python3).