Checkmk ssh

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

Skript Datei erstellen

Ssh Key hinterlegen + Kommando

Key generieren

  • su - checkmk
  • ssh-keygen

Key in authorized_keys des Zielhosts hinterlegen

  • Wichtig vor dem Key folgendes schreiben:
command="/usr/bin/check_mk_agent"

Beispiel für die authorized_keys:

command="/usr/bin/check_mk_agent" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQWUb+eQsw9iMBmKBQ5yCQ4BpFWhDSAkdz... root@checkmk

Agent auf den Zielhost kopieren

  • scp check_mk_agent root@zielhost:/usr/bin/

Checkmk GUI

Regel erstellen

  • Host & Service Parameters
    • Datasource Programs
      • Individual program call instead of agent access
        • Create rule in folder:

command line:

ssh -T -oStrictHostKeyChecking=no root@<IP> 

Checkmk sshagent.png

Für spezielle Hosts

  • Mit z.B. Dropbear als ssh service

command line:

ssh -T -oStrictHostKeyChecking=no root@<IP> /usr/bin/check_mk_agent

Dropbear.png