SNMP options and commands supported by Data ONTAP
SNMP options supported by Data ONTAP
Data ONTAP supports the following SNMP options:
- snmp.enable--Enables (with value on) or disables (with value off) SNMP in Data ONTAP.
For more information about this option, see the na_options(1) man page.
- snmp.access--Restricts SNMP access to a filer.
You can restrict SNMP access on a host or interface basis. For details about using this option, see the na_protocolaccess(8) man page.
Types of SNMP commands supported by Data ONTAP
Data ONTAP supports the following types of SNMP commands:
- Configuration--Configuration commands set or change values of SNMP variables.
- Trap--Trap commands define or change the values of user-defined traps.
Guidelines for using SNMP commands
The following guidelines apply to all SNMP commands in Data ONTAP:
- Commands entered at the command line are persistent across reboots.
- If you specify one or more variables for an option of the SNMP commands, the value of that option is set or changed. However, if no variables are specified, the current value of that option variable is returned.
Configuration commands
The following table lists all the SNMP configuration commands available in Data ONTAP.
.
Command
|
Description
|
snmp
|
Displays the current values of all SNMP options, such as init, community, contact, and traphost.
|
snmp community [add ro
community]
|
With the option: Adds a community with the specified access control type.
Without the option: Displays the current list of communities.
Default value: The default community for the SNMP agent in Data ONTAP is public and the default access mode is ro.
|
snmp community [delete {all |
ro community}]
|
With the option: Deletes one or all communities with the specified access control type.
Without the option: Displays the current list of communities.
|
snmp contact [contact]
|
With the option: Sets the contact name for the filer. You must enclose the contact string in single quotes (` ') if the string contains spaces.
Without the option: Displays the current contact name set in Data ONTAP.
|
snmp location [location]
|
With the option: Sets the location of the filer. You must enclose the location string in single quotes (` ') if the string contains spaces.
Without the option: Displays the current location set in Data ONTAP.
|
Trap commands
The following table lists all the SNMP trap commands available in Data ONTAP.
Command
|
Description
|
snmp authtrap [0|1]
|
With the option: Enables (with value 1) or disables (with value 0) SNMP agent authentication failure traps. These traps are generated when the agent receives queries with the wrong community string. The traps are sent to all hosts specified with the snmp traphost command.
Without the option: Displays the current value of authtrap set in Data ONTAP.
|
snmp traphost [{add|delete}
{hostname|ipaddress}]
|
With the option: Adds or deletes SNMP hosts that receive traps from Data ONTAP.
Without the option: Displays the current traphosts set in Data ONTAP.
|
snmp traps [enable|disable|
reset|delete] [trapname]
|
With the option: Enables, disables, resets, or deletes the trapname trap. If you do not specify the trapname trap, all traps defined so far are acted on.
Traps are disabled by default. You must enable a trap before it can be triggered with the snmp traps command.
Without the option: Displays the list of all traps set in Data ONTAP.
|
snmp traps walk prefix
|
Lists all traps that have names beginning with prefix.
|
snmp traps load filename
|
Loads a set of traps from a text file. The filename file contains a list of traps without the snmp traps command preceding each trap. If the specified filename is defaults, traps are read from the /etc/defaults/traps file.
|
snmp traps trapname.parm value
|
Defines or changes a user-defined trap.
|
snmp init [0|1]
|
With the option: Enables (with value 1) or disables (with value 0) built-in traps and the traps defined using the snmp traps command. A coldStart trap is sent by the agent when the traps are enabled.
Without the option: Displays the current value of snmp init in Data ONTAP.
Default value: By default, SNMP traps are disabled in Data ONTAP; the system runs as the equivalent of snmp init 0.
|
Example of typical SNMP commands
The following example shows a typical set of SNMP commands.
snmp contact 'jdoe@abc.com 415-555-1212'
snmp location 'ABC corporation, engineering lab'
snmp community add ro private
snmp traphost add snmp-mgr1
snmp init 1
Copyright © 1994-2003, Network Appliance, Inc. All rights
reserved.
Part No. 210-00321
File: snmp4.htm
Last updated: 01/20/03 14:16:54