System Administration > Configuration > Fabric > Nodes > Services > SNMP

Update SNMP service properties

Update SNMP service properties.

Request:

Method:
PUT
URI Path(s):
/api/v1/transport-nodes/{transport-node-id}/node/services/snmp
/api/v1/cluster/{cluster-node-id}/node/services/snmp
/api/v1/node/services/snmp
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
NodeSnmpServiceProperties+

Example Request:

PUT https://<nsx-mgr>/api/v1/node/services/snmp { "service_name": "snmp", "service_properties": { "start_on_boot": false, "v2_configured": true, "communities": [ { "access": "READ_ONLY", "community_string": "snmpcommunity" } ], "v2_targets": [ { "server": "10.20.125.4", "port": 1162, "community_string": "snmpcommunity" } ], "v3_configured": false, "v3_auth_protocol": "SHA1", "v3_priv_protocol": "AES128", "v3_targets": [ { "server": "10.20.125.4", "port": 1162, "user_id": "user1", "security_level": "AUTH_PRIV" }, { "server": "10.20.125.6", "port": 1162, "user_id": "user2", "security_level": "AUTH_PRIV" } ], "v3_users": [ { "user_id": "user1", "auth_password": "password1", "priv_password": "password2", "security_level": "AUTH_PRIV" } ] } }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NodeSnmpServiceProperties+

Example Response:

{ "_schema": "NodeSnmpServiceProperties", "_self": { "href": "/node/services/snmp", "rel": "self" }, "service_name": "snmp", "service_properties": { "start_on_boot": false, "v2_configured": true, "communities": [ { "access": "READ_ONLY", } ], "v2_targets": [ { "server": "10.20.125.4", "port": 1162 } ], "v3_configured": false, "v3_auth_protocol": "SHA1", "v3_priv_protocol": "AES128", "v3_targets": [ { "server": "10.20.125.4", "port": 1162, "user_id": "user1", "security_level": "AUTH_PRIV" }, { "server": "10.20.125.6", "port": 1162, "user_id": "user2", "security_level": "AUTH_PRIV" } ], "v3_users": [ { "user_id": "user1", "security_level": "AUTH_PRIV" "access": "READ_ONLY", } ] } }

Required Permissions:

crud

Feature:

system_administration Description:
Update SNMP service properties. The SNMP service is started if the communities property specifies a community or stopped if it contains an empty array. The start_on_boot property can only be true if a community is specified in the request or is already configured.

Additional Errors: