Table of ContentsLibraryView in Frames

SNMP command syntax

If you specify one or more values for an option of the SNMP commands, the value of that option is set or changed. However, if no values are specified, the current value of that option is returned.

The following table describes the syntax and parameters for SNMP configuration commands.

Command Description
snmp Displays the current values of all SNMP options, such as init, community, contact, and traphost.
snmp authtrap [0|1]

With a value: Enables (with value 1) or disables (with value 0) SNMP agent authentication failure traps.

Without a value: Displays the current value of authtrap set in Data ONTAP.

snmp community Displays the current list of communities.
snmp community add ro community

Adds a community.

Default value: The default community for the SNMP agent in Data ONTAP is public. The only access mode available on storage systems is the default ro (read-only).

snmp community delete {all | ro community } Deletes one or all communities.
snmp contact [ contact ]

With the value: Sets the contact name for your storage system. You must enclose the contact string in single quotes (' ') if the string contains spaces.

You can enter a maximum of 255 characters for the contact information.

Without the value: Displays the current contact name set in Data ONTAP.

snmp init [0|1]

With a value: Enables (with value 1) or disables (with value 0) built-in traps and the traps defined using the snmp traps command.

Without a value: Displays the current value of snmp init in Data ONTAP.

Default value: By default, SNMP traps are disabled in Data ONTAP; the system uses the equivalent of snmp init 0.

snmp location [location]

With the option: Sets the location of your storage system. 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.

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 trap hosts set in Data ONTAP.

snmp traps [options] See Command syntax for SNMP trap parameters.