Set SNMP access config
Configure SNMP management access. SNMP provides read only access to various system resources.
NoteIt’s not possible to enable SNMPv3 while SNMPv1 or SNMPv2 are enabled. It’s currently not possible to fully configure SNMPv3 via the REST API.
HTTP request syntax (URI)
PATCH <base_URI>/v8/storage/file-devices/management-access/snmp
Parameters
Name | Type | Required | Values | Description |
isEnabled | BODY | N | boolean | Controls whether SNMP access is enabled or not. |
restrictedHosts | BODY | N | boolean | Restrict access to only those hosts in the allowedHosts list. |
port | BODY | N | integer | Port that the specific management interface listens on. |
sendAuthFailureTraps | BODY | N | boolean | Determines whether authentication failure traps are sent or not. |
allowedHosts | BODY | N | list of strings | Specifies a list of hosts allowed to access the specific management interface. The host values can be either IP address or valid DNS names. |
allowedCommunities | BODY | N | list of strings | A list of allowed community string values. |
allowSnmpV1 | BODY | N | boolean | Allow SNMPv1 requests |
allowSnmpV2 | BODY | N | boolean | Allow SNMPv2 requests |
allowSnmpV3 | BODY | N | boolean | Allow SNMPv3 requests |
Return codes
Code | Data | Description |
204 | No Data | SNMP access successfully updated. |
400 | Error Message | Missing or invalid request contents. |
403 | Error Message | Operation forbidden by access level. |
500 | Error message | Error associated with the storage system. |
Any HTTP status code other than 204 indicates that the API did not complete successfully.
Request example: Enable SNMPv1 and SNMPv2, and set a community string
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/file-devices/management-access/snmp -X PATCH -d '{"allowSnmpV1":true, "allowSnmpV2":true, "allowedCommunities":["public"]}'
Response example
HTTP/1.1 204 No Content