CheckMK agent script not coming trough

CMK version: Enterprise Edition 2.1.0p9
OS version: Red Hat Enterprise Linux

Error message: No explicit error message

Hi everyone,

I’m trying to add a custom check to the services overview, for this I use a python script which is opened by the CheckMK agent. But as soon as I add "import requests " to the code the check doesn’t show up anymore.

When I execute the file with a Python command it runs normally under both my own user and as root and there’s no error whatsoever and it runs fine. The CheckMK agent also doesn’t give any error, but it still doesn’t fully function as expected. Note that the result doesn show up just a usual in the command line output after the check_mk_agent comamnd.

Here’s a screenshot where my check (Service ResilientHeartbeat_20) is seen as an undecided service.

As I don’t get any error message it’s pretty hard to find out where the problem is, does anyone have any suggestions?

Things I already tried:

  • CHMOD: exactly the same
  • Reinstall requests import, no change
  • Python paths: the same for both myself and root user
  • Switching users: no difference between my account and root

Hi Sander, does your python script file name ends with .py ?
Please try to remove the file ending .py.
Maybe that helps. It is just an idea. We had this behavior several times… That the agent ignore scripts as long as they have .py at the end.

Thanks for the suggestion, didn’t think of that one! I just did a few tests with the file extension removed, but the behavior is exactly the same sadly, so the issue still persists

Hi, have you checked the Apparmor Logs? Maybe you ran into a rule forbidding external triggered systems to open requests?

Apparmor doesn’t seem to be installed, aa-status gives “command not found”. But if anyone has any suggestions on other loggings that might be relevant I’m happy to have a look.

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.