Cannot set SNMPv3 parameters on host via REST API

@BiloxiGeek I thik you are using the wrong url. you sould use the CMK REST API. See Help in your site for more information about the REST API

image

There is an interactive playground to try it out :slight_smile: Here you find also code samples for cURL.

curl -X 'POST' \
  'http://your.cmk.server/your_site/check_mk/api/1.0/domain-types/host_config/collections/all' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer automation_user automation_user_secret' \
  -H 'Content-Type: application/json' \
  -d '{
        "folder": "/",
        "host_name": "your_host_name",
        "attributes": {
		"ipaddress": "192.168.10.10",
		"tag_agent": "no-agent",
		"tag_snmp_ds": "snmp-v2",
		"snmp_community": {
		    "auth_password": "removedremoved",
		    "auth_protocol": "SHA-1-96",
		    "privacy_password": "removedremoved",
		    "privacy_protocol": "AES-128",
		    "security_name": "snmpv3username",
		    "type": "v3_auth_privacy"
		}
	}
    }'

“tag_agent”: “no-agent”, → for SNMP only hosts
"“tag_snmp_ds”: “snmp-v2”, → activate SNMP v2/v3

and here the host created in CMK by this.

1 Like