A newer release of this product is available.
Support SNMP traphosts endpoint overview
Contributors
Suggest changes
- PDF of this doc site
Collection of separate PDF docs
Creating your file...
This may take a few minutes. Thanks for your patience.
Your file is ready
Overview
This SNMP endpoint is used to retrieve, configure and reconfigure SNMP traphosts. An SNMP traphost is a host machine that is configured to receive SNMP traps from ONTAP. An SNMP traphost can be an SNMPv1/SNMPv2c traphost or an SNMPv3 traphost. ONTAP sends SNMPv1/SNMPv2c traps to an SNMPv1/SNMPv2c traphost over the SNMPv1/SNMPv2c protocol. Similarly, it sends SNMPv3 traps to an SNMPv3 traphost over the SNMPv3 protocol.
Examples
Retrieves a list of SNMP traphosts in the cluster, sorted by IP address
# The API: GET "/api/support/snmp/traphosts" # The call: curl -H "accept: application/hal+json" -X GET "https://<mgmt-ip>/api/support/snmp/traphosts?order_by=ip_address" # The response: { "records": [ { "host": "scspr0651011001.gdl.englab.netapp.com", "ip_address": "10.235.36.62", "_links": { "self": { "href": "/api/support/snmp/traphosts/scspr0651011001.gdl.englab.netapp.com" } } }, { "host": "scspr0647726006.gdl.englab.netapp.com", "ip_address": "10.235.36.139", "_links": { "self": { "href": "/api/support/snmp/traphosts/scspr0647726006.gdl.englab.netapp.com" } } }, { "host": "scspr0651055012.gdl.englab.netapp.com", "ip_address": "10.237.245.106", "_links": { "self": { "href": "/api/support/snmp/traphosts/scspr0651055012.gdl.englab.netapp.com" } } } ], "num_records": 3, "_links": { "self": { "href": "/api/support/snmp/traphosts?order_by=ip_address" } } }
Retrieves a list of SNMP traphosts in the cluster for which SNMP user is 'snmpv3user1'
# The call: curl -H "accept: application/hal+json" -X GET "https://<mgmt-ip>/api/support/snmp/traphosts?name=snmpv3user1" # The response: { "records": [ { "host": "scspr0653246020.gdl.englab.netapp.com", "user": { "name": "snmpv3user1", "_links": { "self": { "href": "/api/support/snmp/users/800003150558b57e8dbd9ce9119d82005056a7b4e5/snmpv3user1" } } }, "_links": { "self": { "href": "/api/support/snmp/traphosts/scspr0653246020.gdl.englab.netapp.com" } } } ], "num_records": 1, "_links": { "self": { "href": "/api/support/snmp/traphosts?user.name=snmpv3user1" } } }
Adds an SNMPv1 or SNMPv2c traphost
# The API: POST "/api/support/snmp/traphosts" # The call: curl -H "accept: application/json" -H "Content-Type: application/json" -X POST "https://<mgmt-ip>/api/support/snmp/traphosts" -d '{"host":"10.140.128.48"}' # The response: 201 Created {}
Adds an SNMPv3 traphost
# The API: POST "/api/support/snmp/traphosts" # The call: curl -H "accept: application/json" -H "Content-Type: application/json" -X POST "https://<mgmt-ip>/api/support/snmp/traphosts" -d '{"host":"fd-geoycpi-uno.gycpi.b.yahoodns.net", "user":{"name":"snmpv3user1"}}' # The response: 201 Created {}