Skip to main content

Commands for managing SNMP

You can use the system snmp commands to manage SNMP, traps, and traphosts. You can use the security commands to manage SNMP users per SVM. You can use the event commands to manage events related to SNMP traps.

Commands for configuring SNMP

If you want to...Use this command...
Enable SNMP on the clusteroptions -option-name snmp.enable -option-value on
Note
The SNMP service must be allowed under the management (mgmt) firewall policy. You can verify whether SNMP is allowed by using the system services firewall policy show command.
Disable SNMP on the clusteroptions -option-name snmp.enable -option-value off

Commands for managing SNMP v1, v2c, and v3 users

If you want to...Use this command...
Configure SNMP userssecurity login create
Display SNMP userssecurity snmpusers and security login show -application snmp
Delete SNMP userssecurity login delete
Modify the access-control role name of a login method for SNMP userssecurity login modify

Commands for providing contact and location information

If you want to...Use this command...
Display or modify the contact details of the clustersystem snmp contact
Display or modify the location details of the clustersystem snmp location

Commands for managing SNMP communities

If you want to...Use this command...
Add a read-only ( ro ) community for an SVM or for all SVMs in the clustersystem snmp community add
Delete a community or all communitiessystem snmp community delete
Display the list of all communitiessystem snmp community show

Because SVMs are not part of the SNMP standard, queries on data LIFs must include the NetApp root OID (1.3.6.1.4.1.789), for example, snmpwalk -v 2c -c snmpNFS 10.238.19.14 1.3.6.1.4.1.789

Command for displaying SNMP option values

If you want to...Use this command...
Display the current values of all SNMP options, including cluster contact, contact location, whether the cluster is configured to send traps, the list of traphosts, and list of communities and access control typesystem snmp show

Commands for managing SNMP traps and traphosts

If you want to...Use this command...
Enable SNMP traps sent from the clustersystem snmp init -init 1
Disable SNMP traps sent from the clustersystem snmp init -init 0
Add a traphost that receives SNMP notifications for specific events in the clustersystem snmp traphost add
Delete a traphostsystem snmp traphost delete
Display the list of traphostssystem snmp traphost show
If you want to...Use this command...
Display the events for which SNMP traps (built-in) are generatedevent route show
  • Use the -snmp-support true parameter to view only SNMP-related events.

  • Use the instance -messagename <message> parameter to view a detailed description why an event might have occurred, and any corrective action.

Note
Routing of individual SNMP trap events to specific traphost destinations is not supported. All SNMP trap events are sent to all traphost destinations.
Display a list of SNMP trap history records, which are event notifications that have been sent to SNMP trapsevent snmphistory show
Delete an SNMP trap history recordevent snmphistory delete

For more information about the system snmp, security, and event commands, see the man pages.