onyx_snmp – Manages SNMP general configurations on Mellanox ONYX network devices

Synopsis

  • This module provides declarative management of SNMP on Mellanox ONYX network devices.

Parameters

Parameter Choices/Defaults Comments
communities_enabled
boolean
    Choices:
  • no
  • yes
Enables/Disables community-based authentication on the system.
contact_name
string
Sets the SNMP contact name.
engine_id_reset
boolean
    Choices:
  • no
  • yes
Sets SNMPv3 engineID to node unique value.
location
string
Sets the SNMP location.
multi_communities_enabled
boolean
    Choices:
  • no
  • yes
Enables/Disables multiple communities to be configured.
notify_community
string
Sets the default community for SNMP v1 and v2c notifications sent to hosts which do not have a community override set.
notify_enabled
boolean
    Choices:
  • no
  • yes
Enables/Disables sending of SNMP notifications (traps and informs) from thee system.
notify_event
string
    Choices:
  • asic-chip-down
  • dcbx-pfc-port-oper-state-trap
  • insufficient-power
  • mstp-new-bridge-root
  • ospf-lsdb-approaching-overflow
  • sm-stop
  • user-logout
  • cli-line-executed
  • dcbx-pfc-port-peer-state-trap
  • interface-down
  • mstp-new-root-port
  • ospf-lsdb-overflow
  • snmp-authtrap
  • xstp-new-root-bridge
  • cpu-util-high
  • disk-io-high
  • interface-up
  • mstp-topology-change
  • ospf-nbr-state-change
  • temperature-too-high
  • xstp-root-port-change
  • dcbx-ets-module-state-change
  • disk-space-low
  • internal-bus-error
  • netusage-high
  • paging-high
  • topology_change
  • xstp-topology-change
  • dcbx-ets-port-admin-state-trap
  • entity-state-change
  • internal-link-speed-mismatch
  • new_root
  • power-redundancy-mismatch
  • unexpected-cluster-join
  • dcbx-ets-port-oper-state-trap
  • expected-shutdown
  • liveness-failure
  • ospf-auth-fail
  • process-crash
  • unexpected-cluster-leave
  • dcbx-ets-port-peer-state-trap
  • health-module-status
  • low-power
  • ospf-config-error
  • process-exit
  • unexpected-cluster-size
  • dcbx-pfc-module-state-change
  • insufficient-fans
  • low-power-recover
  • ospf-if-rx-bad-packet
  • sm-restart
  • unexpected-shutdown
  • dcbx-pfc-port-admin-state-trap
  • insufficient-fans-recover
  • memusage-high
  • ospf-if-state-change
  • sm-start
  • user-login
Specifys which events will be sent as SNMP notifications.
notify_port
string
Sets the default port to which notifications are sent.
notify_send_test
string
    Choices:
  • yes
  • no
Sends a test notification.
snmp_communities
list
List of snmp communities
community_name
string / required
Configures snmp community name.
community_type
string
    Choices:
  • read-only
  • read-write
Add this community as either a read-only or read-write community.
state
string
    Choices:
  • present
  • absent
Used to decide if you want to delete the given snmp community or not
snmp_permissions
list
Allow SNMPSET requests for items in a MIB.
permission_type
string
    Choices:
  • MELLANOX-CONFIG-DB-MIB
  • MELLANOX-EFM-MIB
  • MELLANOX-POWER-CYCLE
  • MELLANOX-SW-UPDATE
  • RFC1213-MIB
Configures the request type.
state_enabled
boolean / required
    Choices:
  • no
  • yes
Enables/Disables the request.
state_enabled
boolean
    Choices:
  • no
  • yes
Enables/Disables the state of the SNMP configuration.

Examples

- name: configure SNMP
  onyx_snmp:
    state_enabled: yes
    contact_name: sara
    location: Nablus
    communities_enabled: no
    multi_communities_enabled: no
    notify_enabled: yes
    notify_port: 1
    notify_community: community_1
    notify_send_test: yes
    notify_event: temperature-too-high
    snmp_communities:
        - community_name: public
          community_type: read-only
          state: absent
    snmp_permissions:
        - state_enabled: yes
          permission_type: MELLANOX-CONFIG-DB-MIB

Return Values

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

Key Returned Description
commands
list
always.
The list of configuration mode commands to send to the device

Sample:
['snmp-server enable', 'no snmp-server enable', 'snmp-server location <location_name>', 'snmp-server contact <contact_name>', 'snmp-server enable communities', 'no snmp-server enable communities', 'snmp-server enable mult-communities', 'no snmp-server enable mult-communities', 'snmp-server enable notify', 'snmp-server notify port <port_number>', 'snmp-server notify community <community_name>', 'snmp-server notify send-test', 'snmp-server notify event <event_name>', 'snmp-server enable set-permission <permission_type>', 'no snmp-server enable set-permission <permission_type>', 'snmp-server community <community_name> <community_type>', 'no snmp-server community <community_name>.', 'snmp-server engineID reset.']


Status

Authors

  • Sara-Touqan (@sarato)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.