...
Create a script with the following content (host_name in the third section means the host for which the agent is for):
Code Block |
---|
#!/bin/bash HOST_NAME="<checkmk_server>" SITE_NAME="<sitename>" API_URL="http://$HOST_NAME/$SITE_NAME/check_mk/api/1.0" USERNAME="automation" PASSWORD="<automation_secret>" http --json GET "$API_URL/domain-types/agent/actions/download_by_hash/invoke" \ "Authorization: Bearer $USERNAME $PASSWORD" \ "Accept: application/octet-stream" \ agent_hash=="<hash<"\ os_type=="linux_deb" \ --download |
...
httpie, download by hostname
Create a script with the following content (host_name in the third section means the host for which the agent is for):
Code Block |
---|
#!/bin/bash HOST_NAME="<checkmk_server>" SITE_NAME="<sitename>" API_URL="http://$HOST_NAME/$SITE_NAME/check_mk/api/1.0" USERNAME="automation" PASSWORD="<automation_secret>" http --json GET "$API_URL/domain-types/agent/actions/download_by_host/invoke" \ "Authorization: Bearer $USERNAME $PASSWORD" \ "Accept: application/octet-stream" \ host_name=="localhost"\ os_type=="linux_deb" \ --download |
...