How do I register the Agent Controller and Updater automatically after the agent installation?
A simple bash script is not a final solution because of the large number of hosts.
Maybe with Baramundi?
Execute this script
I have done this for a greater amount of devices with Powershell and Baramundi
2 Likes
Can you send me the script? I’ll try it.
The Bash Script is very simple - something like this.
#!/bin/bash
CMK_HOST_NAME="CMK-SERVER"
SITE_NAME="SITENAME"
HOST_NAME=$(hostname)
# upper case
HOST_NAME="${HOST_NAME^^}"
# fqdn to short name
HOST_NAME="${HOST_NAME%%.*}"
USERNAME="automation_register"
PASSWORD="AUTOMATIONSECRET"
cmk-agent-ctl register -s $CMK_HOST_NAME -i $SITE_NAME -U $USERNAME -P $PASSWORD -H $HOST_NAME
cmk-update-agent register -H $HOST_NAME -U $USERNAME -S $PASSWORD -v
But you need to modify it for your needs.
1 Like
Thank you for that. Is there also a script for Windows clients?
It’s the same only as Powershell.
1 Like
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.