Checkmk ssh
Zur Navigation springen
Zur Suche springen
Skript Datei erstellen
- wget http://checkmk.xinux.org/xinux_monitor/check_mk/agents/check-mk-agent_1.6.0p19-1_all.deb
- mkdir cmk
- dpkg-deb --extract check-mk-agent_1.6.0p19-1_all.deb cmk
- cp cmk/usr/bin/check_mk_agent .
Ssh Key hinterlegen + Kommando
Key generieren
- su - checkmk
- ssh-keygen
Key in .ssh/authorized_keys des Zielhosts hinterlegen
- Wichtig vor dem Key folgendes schreiben:
command="/usr/bin/check_mk_agent"
Beispiel für die .ssh/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/
Datei ausführbar machen
- chmod +x check_mk_agent
Checkmk GUI
Regel erstellen
- Host & Service Parameters
- Datasource Programs
- Individual program call instead of agent access
- Create rule in folder:
- Individual program call instead of agent access
- Datasource Programs
command line to execute:
ssh -T -oStrictHostKeyChecking=no root@<IP>
Für spezielle Hosts
- Mit z.B. Dropbear als ssh service
command line to execute:
ssh -T -oStrictHostKeyChecking=no root@<IP> /usr/bin/check_mk_agent
Host erstellen mit label
- Beim erstellen des Hosts muss ein passendes label mitgegeben werden