Skip to main content
Pure1 Support Portal

puresnmp

Name

puresnmp, puresnmp-create, puresnmp-delete, puresnmp-list, puresnmp-rename, puresnmp-setattr, puresnmp-test — manages connections to Simple Network Management Protocol (SNMP) managers

Synopsis

puresnmp create [--auth-passphrase] [--auth-protocol AUTH-PROTOCOL] [--community] --host HOST [--privacy-passphrase] [--privacy-protocol PRIVACY-PROTOCOL] [--user USER] [--version {v2c | v3}] MANAGER

puresnmp delete MANAGER...

puresnmp list [ --cli | --csv | --nvp ] [--engine-id] [--notitle] [--page] [--raw] [MANAGER...]

puresnmp rename OLD-NAME NEW-NAME

puresnmp setattr [--auth-passphrase] [--auth-protocol AUTH-PROTOCOL] [--community] --host HOST [--privacy-passphrase] [--privacy-protocol PRIVACY-PROTOCOL] [--user USER] [--version {v2c | v3}] MANAGER...

puresnmp test MANAGER

Arguments

MANAGER

Name used by Purity to identify an SNMP Network Management System ("Manager").

Options

-h | --help

Can be used with any command or subcommand to display a brief syntax description.

--auth-passphrase

SNMPv3 only. Passphrase used by Purity to authenticate the array with the specified managers. Purity prompts for the passphrase. The passphrase must be at least 8 characters in length. Allowed characters are [A-Z], [a-z], [0-9], _ (underscore), and - (hyphen). To clear the passphrase, press Enter at the prompts.

--auth-protocol AUTH-PROTOCOL

SNMPv3 only. Hash algorithm used to validate the authentication passphrase. Valid values are MD5, SHA, or null (set to ""). Values are case sensitive.

--community

SNMPv2c only. Manager community ID under which Purity is to communicate with the specified managers. Purity prompts for the community ID. Allowed characters are [A-Z], [a-z], [0-9], _ (underscore), - (hyphen). To remove the array from the community, press Enter at the prompts.

--engine-id

SNMPv3 only. Displays the SNMPv3 engine ID generated by Purity for the array. (Some managers require the engine ID in their configuration.)

--host HOST

DNS hostname or IP address of a computer that hosts an SNMP manager to which Purity is to send trap messages when it generates alerts. If specifying an IP address, enter the IPv4 or IPv6 address.

For IPv4, specify the IP address in the form ddd.ddd.ddd.ddd, where ddd is a number ranging from 0 to 255 representing a group of 8 bits. If a port number is also specified, append it to the end of the address in the format ddd.ddd.ddd.ddd:PORT, where PORT represents the port number.

For IPv6, specify the IP address in the form xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, where xxxx is a hexadecimal number representing a group of 16 bits. Consecutive fields of zeros can be shortened by replacing the zeros with a double colon (::). If a port number is also specified, enclose the entire address in square brackets ([]) and append the port number to the end of the address. For example, [xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]:PORT, where PORT represents the port number.

Note: This host option refers to SNMP managers and is not related to host options in other Purity CLI commands.

--privacy-passphrase PRIVACY-PASSPHRASE

SNMPv3 only. Passphrase used to encrypt SNMP messages. Purity prompts for the passphrase, which must be at least 8 non-space ASCII characters. To clear the passphrase, set to an empty string (""), and then press Enter at the prompts.

--privacy-protocol

SNMPv3 only. Encryption protocol for SNMP messages. Valid values are AES (default), DES, or null (set to ""). Values are case sensitive.

--user

SNMPv3 only. User ID that Purity uses in communications with SNMP managers. Allowed characters are [A-Z], [a-z], [0-9], _ (underscore), and - (hyphen).

--version

Version of the SNMP protocol to be used by Purity in communications with the specified manager(s). Valid values are v2c (default) and v3. Values are case sensitive.

Options that control display format:

--cli

Displays output in the form of CLI commands that can be issued to reproduce the current configuration. The --cli output is not meaningful when combined with immutable attributes.

--csv

Lists information in comma-separated value (CSV) format. The --csv output can be used for scripting purposes and imported into spreadsheet programs.

--notitle

Lists information without column titles.

--nvp

Lists information in name-value pair (NVP) format, in the form ITEMNAME=VALUE. Argument names and information items are displayed flush left. The --nvp output is designed both for convenient viewing of what might otherwise be wide listings, and for parsing individual items for scripting purposes.

--page

Turns on interactive paging.

--raw

Displays the unformatted version of column titles and data. For example, in the purearray monitor output, the unformatted version of column title us/op (read) is usec_per_read_op. The --raw output is used to sort and filter list results.

Changing the Protocol Version

When the protocol version is changed, attributes which do not apply to the new version are cleared. Any configuration that previously was held in these attributes is lost.

If the protocol version changes from v2c to v3, the value for the v2c attribute --community is cleared.

If the protocol version changes from v3 to v2c, the values for the following v3 attributes are cleared:

  • --auth-protocol

  • --auth-passphrase

  • --privacy-protocol

  • --privacy-passphrase

  • --user

In the following example, a v3 SNMP manager named MyMgr, with user, authentication protocol, and authentication passphrase configured, is changed to v2c. After the conversion to v2c, the values for user, authentication protocol, and authentication passphrase are cleared.

puresnmp list MyMgr
Name   Host                Version  Community  User  Auth Protocol  Auth Passphra
MyMgr  mysnmp.example.com  v3       -          User1 MD5            ****

puresnmp setattr --version v2c MyMgr
Name   Host                Version  Community  User  Auth Protocol  Auth Passphra
MyMgr  mysnmp.example.com  v2c      -          -     -              -
           

Protocol and Passphrase Option Combinations

With v3 managers, the create and setattr subcommands support any combination of --user, --auth-protocol, --auth-passphrase, --privacy-protocol, and --privacy-passphrase options.

However, the user, authentication protocol, and authentication passphrase attributes must be set properly for a v3 SNMP manager to work correctly. If a manager's privacy protocol attribute is set, the privacy passphrase attribute must also be set.

Description

FlashArrays integrate with SNMP-based data center management frameworks through a built-in SNMP agent or through the use of SNMP traps.

SNMP Traps

Purity can be configured to generate and transmit SNMP trap messages to designated SNMP managers running in hosts. The software supports SNMP versions v2c and v3. Each trap generated corresponds to an alert message (see puremessage(1)).

Purity generates log records called alerts when significant events occur within an array. Alerts can be transmitted to designated electronic mail addresses and/or sent to designated SNMP managers as trap messages.

The Built-in SNMP Agent

A built-in SNMP agent in Purity responds to SNMP information retrieval requests (Get, Get Next, Get Bulk) made by v1 and v2 SNMP managers in the same SNMP community as the FlashArray. The agent appears as localhost in puresnmp list output. The agent cannot be deleted or renamed.

SNMP managers communicate with the agent via the standard TCP port 161, which cannot be changed. The agent responds to GET-type requests, returning values for the purePerformance information block, or individual variables within it, depending on the type of request issued. The variables supported are:

pureArrayReadBandwidth      Current array-to-host data transfer rate
pureArrayWriteBandwidth     Current host-to-array data transfer rate
pureArrayReadIOPS           Current read request execution rate
pureArrayWriteIOPS          Current write request execution rate
pureArrayReadLatency        Current average read request latency
pureArrayWriteLatency       Current average write request latency
        

The FlashArray Management Information Base (MIB) describes the variables for which values can be requested. The MIB can be downloaded by clicking a link on the GUI System tab, and imported into SNMP managers. In the current release, the MIB cannot be downloaded via the CLI.

The Purity SNMP agent supports GET-type SNMP requests from managers in the same community that utilize protocol version v2c. The community is specified using the puresnmp setattr command with the --community option and localhost specified as the manager. To remove an array from a community, specify the --community option with an empty string (hit enter at the prompts).

The Purity SNMP agent supports protocol versions v2c and v3.

puresnmp Subcommands

In addition to email alert messages, Purity generates and transmits SNMP trap messages to designated SNMP managers that support v2c or v3 of the SNMP protocol. Subcommands of the puresnmp command designate managers and configure their communication and security attributes.

The puresnmp create subcommand creates a Purity SNMP manager object that identifies a host (SNMP manager) and specifies the protocol attributes for communicating with it. Transmission of SNMP traps is enabled immediately upon creation of the manager object.

The puresnmp delete subcommand stops communication with the specified managers and deletes the corresponding Purity manager objects.

The puresnmp list subcommand displays the communication and security attributes of the specified manager objects. If no manager objects are specified, displays attributes for all managers. Alternatively, if the --engine-id option is specified, displays the array's engine ID, which may be required to configure some SNMP managers.

The puresnmp rename subcommand changes the name of the specified SNMP manager object. SNMP manager names are used in Purity administrative commands, and have no external significance.

The puresnmp setattr subcommand changes the hostname, IP address, or SNMP version and corresponding protocol and security attributes of the specified SNMP manager.

The puresnmp test subcommand sends a test SNMP trap to a manager. Verification of successful test trap transmission is done at the destination.

SNMP Protocol

Purity supports SNMP versions v2c and v3. The --host and --version option values are used to specify attributes that are common to both versions of the protocol. The protocol versions use different security attributes:

SNMPv2c

A value must be specified for the --community option (Purity prompts for the community ID). Purity sets other security attribute values to null when an SNMPv2c manager is created or when an existing manager's version attribute is changed to v2c.

SNMPv3

A value must be specified for the --user attribute.

Examples

Example 1

puresnmp create --host MyHost.com --community SNMPMANAGER1
Enter community:
Retype community:
      

Creates an SNMP manager object named SNMPMANAGER1 for the SNMP manager running in host MyHost.com. Purity prompts for the new community ID. Purity uses SNMPv2c to communicate in the new SNMP community.

Example 2

puresnmp delete SNMPMANAGER2
      

Stops transmission of any future traps to SNMPMANAGER2 and deletes the manager object from the Purity object database. If SNMPMANAGER2 is recreated at a later time, its attributes must be re-entered.

Example 3

puresnmp list SNMPMANAGER3
      

Displays the protocol and security attributes for SNMPMANAGER3.

Example 4

puresnmp rename SNMPMANAGER4 SNMPMANAGER5
      

Changes the name of SNMPMANAGER4 to SNMPMANAGER5. None of the manager object's protocol or security attributes are changed.

Example 5

puresnmp setattr --host 172.169.0.12 SNMPMANAGER6
      

Changes the IPv4 address associated with SNMPMANAGER6 to 172.169.0.12.

Example 6

puresnmp setattr --host [2001:db8:85a3::8a2e:370:7334] SNMPMANAGER7
      

Changes the IPv6 address associated with SNMPMANAGER7 to 2001:db8:85a3::8a2e:370:7334.

Example 7

puresnmp setattr --auth-passphrase MyV3Mgr
Enter auth passphrase:
Retype auth passphrase:
Name      Host                Version  Community  User   Auth Protocol  Auth Pass
MyV3Mgr   mysnmp.example.com  v3       -          User1  SHA            ****
      

For an existing v3 SNMP manager named MyV3Mgr, sets the authentication passphrase attribute to a new value. Purity prompts for the new authentication passphrase value.

Example 8

puresnmp setattr --auth-protocol MD5 MyV3Mgr
Name      Host                Version  Community  User   Auth Protocol  Auth Pass
MyV3Mgr   mysnmp.example.com  v3       -          User1  MD5            ****
      

For an existing v3 SNMP manager named MyV3Mgr, sets the authentication protocol attribute to MD5.

Example 9

puresnmp setattr --auth-protocol SHA --auth-passphrase MyV3Mgr
Enter auth passphrase:
Retype auth passphrase:
Name      Host                Version  Community  User   Auth Protocol  Auth Pass
MyV3Mgr   mysnmp.example.com  v3       -          User1  SHA            ****
      

For an existing v3 SNMP manager named MyV3Mgr, sets the authentication protocol attribute to SHA and sets the authentication passphrase attribute to a new value. Purity prompts for the new authentication passphrase value.

Example 10

puresnmp setattr --community MyMgr
Enter community:
Retype community:
Name      Host                Version  Community  User   Auth Protocol  Auth Pass
MyMgr     mysnmp.example.com  v2c      ****       -      -              -
      

For an existing v2c SNMP manager named MyMgr, sets the community ID attribute to a new value. Purity prompts for the new community ID.

Author

Pure Storage Inc.