Automate Agent Registration

I’m trying to automate my agent registrations since it cannot be done through checkmk. Does anyone have a script (powershell/bat/bash) that can be sent to a machine to invoke the registration?

I was trying to get it working with %HOSTNAME% via comand line but it hated that.

@r.sander has written a script

and also the topic is discussed in this post (German but I thing Code is a single language)

Greets

Yes, but this is just pseudo code as an example what steps are necessary for the automatic deployment and registration.

If %COMPUTERNAME% does not work it may be the case that this variable contains the hostname in uppercase but your monitoring configuration has the hostnames in lower case. In the registration process you need to put the hostname from the monitoring configuration after -H.

1 Like

Hallo,
lösen lässt sich das auf jeden Fall.
Die Frage ist nur wie.
Erste Frage zum Einstieg:
Die Name des Hosts in checkmk ist = dem Namen des Hostmamen des Systems = DNs Eintrag = ggf. Name der Vm sofern es ein virtuelles System ist?
Gruß