Installation Linux Plugins

Hi zusammen,

wir haben einige Linux Maschinen (Debian, Ubuntu). Darauf würde ich gerne ein paar Plugins installieren für CheckMK: Nginx, Apache, Docker…

Bloß scheitere ich daran, weil ich nicht verstehe wie es gedacht ist und man nirgends dazu was findet (extrem schlecht dokumentiert finde ich).

Die Python Plugins, installieren (? wenn ja, geht nicht…), oder nur in das Agent Verzeichnis packen (geht auch nicht nach Rescan)…
Danke für Tipps und Aufklärung!

Hier sollte eigentlich alles stehen: Linux überwachen - Der neue Agent für Linux im Detail

1 Like

:scream:

Ein Emoji alleine darf ich nicht posten… Bitte nach Lektüre des vor Robert verlinkten Artikels Feedback geben, ob die Suche das Problem war oder tatsächlich unklar ist, was wohin muss. Dann auch gerne Stellen nennen, an denen etwas für Checkmk-Neueinsteiger klarer erklärt werden sollte.

2 Likes

tut mir Leid, aber ich verstehe es nicht…

hab das Plugin (mk-docker2.py) unter den Host Linux in das Verzeichnis geworfen. Findet nix beim Monitoring an neuen Services.

Im Plugin steht man soll “pip install docker” nutzen, der Befehl geht aber auch nicht…

Bin da echt verzweifelt mittlerweile…

Der Befehl heisst auf vielen Distributionen pip3 install docker.

Dann bitte mal ausprobieren, ob die Ausgabe von

python3 mk-docker2.py

plausibel erscheint. Ist das der Fall bitte mit

cmk-agent-ctl dump

in der Agentenausgabe nachschauen, ob auch alles zum Server geschickt wird.

Danke für die schnelle Antwort.

Wenn ich python3 und im Verzeichnis den Namen des Plugins aufrufe kommt ein Fehler:

  • bei nginx_status.py":
    line 26, Import Error: No module name error

-bei mk_docker2.py:
line 39, in
import pathlib
ImportError: No module named pathlib

Was heißt das?

mk_docker_2.py ist die Version des Agentenplugins in Python 2 und für sehr alte Systeme gedacht, die kein Python 3 haben. Moderne Systeme nutzen das Agentenplugin mk_docker.py.
Auf allen modernen Distributionen gibt es das noch fehlende Python-Modul docker als Paket zum Installieren, z.B. mit apt install python3-docker. Pip ist in den seltensten Fällen notwendig.

1 Like

Ok thank you. I thought i need the second edition. But i need the mk_docker.py

Now it works! Thanks :slight_smile:

And so on i can configure all plugins just copy to folder and scan? Nice.
And if i need something special i read in plugin.
Python is not need to install separate?

Every Linux distribution has Python 3 installed by default today.
Many system management tools are written in Python.

1 Like

Thank you for your help.

And to clarify:

Sorry for creating confusion.

I was a bit off the track yesterday, so pip/pip3 should only be used either when running something as non-root user or when properly managing Python stuff with pyenv. When installing modules for everyone, use the packages provided by the distribution. Also: please do not mess with Python modules as site user.

I also totally missed that we still ship Python 2.7 compatible scripts. If I had a proper look at the shebang, I would have probably noticed.

1 Like