netapp.storagegrid.na_sg_grid_snmp module – Configure SNMP agent on StorageGRID.

Note

This module is part of the netapp.storagegrid collection (version 21.15.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install netapp.storagegrid.

To use it in a playbook, specify: netapp.storagegrid.na_sg_grid_snmp.

New in netapp.storagegrid 21.15.0

Synopsis

  • Configure SNMP monitoring on NetApp StorageGRID.

Parameters

Parameter

Comments

agent_addresses

list / elements=dictionary

Local binding addresses for the SNMP agent.

network

string

SNMP agent local network interface address.

Choices:

  • "grid"

  • "admin"

  • "client"

  • "all" ← (default)

port

integer

SNMP agent local address port.

Default: 161

protocol

string

SNMP agent address protocol.

Choices:

  • "udp" ← (default)

  • "udp6"

  • "tcp"

  • "tcp6"

api_url

string / required

The url to the StorageGRID Admin Node REST API.

auth_token

string / required

The authorization token for the API request

auth_trap_enable

integer

1 - enable SNMP authentication traps.

2 - disable SNMP authentication traps.

Choices:

  • 1

  • 2 ← (default)

community_strings

list / elements=string

List of community strings.

disable_notifications

boolean

Disable all SNMP notifications.

Choices:

  • false ← (default)

  • true

enable_snmp

boolean

Enable or disable SNMP monitoring.

Choices:

  • false ← (default)

  • true

ro_users

list / elements=string

USM users allowed read-only access.

state

string

The snmp agent should be present.

Choices:

  • "present" ← (default)

sys_contact

string

SNMP system contact.

sys_location

string

SNMP system location.

trap_community

string

SNMP trap community.

trap_destinations

list / elements=dictionary

SNMP trap destinations for V1, V2C, and Inform notifications.

community

string

SNMP trap destination community (cannot be used with usm_user).

host

string / required

SNMP trap destination host.

port

integer

SNMP trap destination port.

protocol

string

SNMP trap destination protocol.

Choices:

  • "udp" ← (default)

  • "tcp"

type

string / required

SNMP trap destination type.

Choices:

  • "trapsink"

  • "trap2sink"

  • "informsink"

  • "trapsess"

  • "informsess"

usm_user

string

USM user to send notification under (cannot be used with community).

usm_users

list / elements=dictionary

USM user.

auth_passphrase

string / required

USM user authentication passphrase.

auth_protocol

string / required

USM user authentication protocol.

Choices:

  • "SHA"

authoritative_engine_id

string

The engine ID to use for localized key hashing. From 5 to 32 bytes in hex.

Only for use on users specified in informsess trap destinations.

name

string / required

USM user name.

priv_passphrase

string

USM user privacy passphrase.

priv_protocol

string

USM user privacy protocol.

Choices:

  • "AES"

security_level

string / required

USM user security level.

Choices:

  • "authNoPriv"

  • "authPriv"

validate_certs

boolean

Should https certificates be validated?

Choices:

  • false

  • true ← (default)

Notes

Note

  • The modules prefixed with na_sg are built to manage NetApp StorageGRID.

Examples

- name: Configure SNMP monitoring
  na_sg_grid_snmp:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    enable_snmp: true
    community_strings:
      - public
    sys_location: RTP-L1-R23S10
    sys_contact: [email protected]
    trap_community: public
    auth_trap_enable: 2
    disable_notifications: false
    trap_destinations:
      - type: trapsink
        host: 172.12.10.100
        port: 162
        community: public
        protocol: udp
    agent_addresses:
      - protocol: udp
        network: admin
        port: 161

- name: Configure usm user
  na_sg_grid_snmp:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    enable_snmp: true
    usm_users:
      - name: user1
        security_level: authNoPriv
        auth_protocol: SHA
        auth_passphrase: password
        priv_protocol: AES
        priv_passphrase: privpass

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

resp

dictionary

Returns information about the StorageGRID SNMP agent.

Returned: If state is ‘present’.

Sample: {"agent_addresses": [{"network": "admin", "port": 161, "protocol": "udp"}], "authtrapenable": 2, "community_strings": ["public"], "disable_notifications": false, "enable_snmp": false, "rousers": ["user1"], "sysContact": "storage-support@example.com", "sysLocation": "RTP-L1-R23S10", "trap_destinations": [{"community": "public", "host": "172.16.10.100", "port": 162, "protocol": "udp", "type": "trapsink", "usmUser": "user1"}], "trapcommunity": "public", "usm_users": [{"authPassphrase": "authpass", "authProtocol": "SHA", "authoritativeEngineId": "0x803f482ba75d00000000", "name": "user1", "privPassphrase": "privpass", "privProtocol": "AES", "securityLevel": "authPriv"}]}

Authors

  • NetApp Ansible Team (@vinaykus)