0

From Version 1.5.0 Check_MK can monitor docker containers directly over the Linux agents. I have upgraded to this version (server and agent), but there are no newly-detected services for docker. I found this in the man page of the docker check:

To make this check work the agent plugin {mk_docker.py} has to be installed

How can I install mk_docker.py? What am I doing wrong?

Frank Potter
  • 33
  • 1
  • 7

2 Answers2

1

Ok, I've got the solution:

On the host (where the agent is installed) run

/usr/bin/check_mk_agent | grep PluginsDirectory

That dir is the one you have to copy the agent plugin files to.

Copy the plugins from your server to the host:

scp /omd/sites/yoursite/share/check_mk/agents/plugins/plugin.py root@yourhost:/path/to/pluginsdir
Frank Potter
  • 33
  • 1
  • 7
0

I have found this repository which contains instructions for installing mk_docker.py:

  • pip install docker
  • pip install pyinstaller
  • Build it with pyinstaller --onefile mk_docker.py
  • Put it to /usr/lib/check_mk/local
  • Reinventory of check_mk host - and you should see new service (Container check)
Mostafa Hussein
  • 11,063
  • 3
  • 36
  • 61
  • Thanks for the hint. But this mk_docker.py ist a 2-years-old script written by an external user. From Version 1.5.0 Check_MK can monitor docker containers directly. In my opinion there must be a mk_docker.py within the installation, but "find" cant locate this file – Frank Potter Mar 14 '19 at 09:38
  • I guess you mean this one ? https://git.onesystems.ch/monitoring/check_mk/blob/master/agents/plugins/mk_docker.py – Mostafa Hussein Mar 14 '19 at 09:40