Configure SNMP Trap DestinationsΒΆ

SNMP trap destinations are hosts configured in StarlingX to receive unsolicited SNMP notifications.

About this task

Destination hosts are specified by IP address, or by host name if it can be properly resolved by StarlingX. Notifications are sent to the hosts using a designated community string so that they can be validated.

Procedure

  1. Configure IP address 10.10.10.1 to receive SNMP notifications using the community string commstr1.

    ~(keystone_admin)$ system snmp-trapdest-add -c commstr1 --ip_address 10.10.10.1
    +------------+--------------------------------------+
    | Property   | Value                                |
    +------------+--------------------------------------+
    | uuid       | c7b6774e-7f45-40f5-bcca-3668de2a186f |
    | ip_address | 10.10.10.1                           |
    | community  | commstr1                             |
    | type       | snmpv2c_trap                         |
    | port       | 162                                  |
    | transport  | udp                                  |
    +------------+--------------------------------------+
    

    The following are attributes associated with the new community string:

    uuid

    The UUID associated with the trap destination object.

    ip_address

    The trap destination IP address.

    community

    The community string value to be associated with the notifications.

    type

    snmpv2c_trap, the only supported message type for SNMP traps.

    port

    The destination UDP port that SNMP notifications are sent to.

    transport

    The transport protocol used to send notifications.

  2. List defined trap destinations.

    ~(keystone_admin)$ system snmp-trapdest-list
    +------------+----------------+------+--------------+-----------+
    | IP Address  | SNMP Community | Port | Type         | Transport |
    +-------------+----------------+------+--------------+-----------+
    | 10.10.10.1  | commstr1       | 162  | snmpv2c_trap | udp       |
    +-------------+----------------+------+--------------+-----------+
    
  3. Query access details of a specific trap destination.

    ~(keystone_admin)$ system snmp-trapdest-show 10.10.10.1
    +------------+--------------------------------------+
    | Property   | Value                                |
    +------------+--------------------------------------+
    | uuid       | c7b6774e-7f45-40f5-bcca-3668de2a186f |
    | ip_address | 10.10.10.1                           |
    | community  | commstr1                             |
    | type       | snmpv2c_trap                         |
    | port       | 162                                  |
    | transport  | udp                                  |
    +------------+--------------------------------------+
    
  4. Disable the sending of SNMP notifications to a specific IP address.

    ~(keystone_admin)$ system snmp-trapdest-delete 10.10.10.1
    Deleted ip 10.10.10.1