Configuring SNMP Traps
To enable SNMP traps, you must:
- Create an SNMP trap sink (set up a destination host). Use separate commands for SNMPv1 or SNMPv2c and SNMPv3 to setup the destination host.
- Enable the SNMP traps to be sent.
Configuring SNMP Trap Sink
To set up the destination host for SNMPv1 or SNMPv2c, use the command:
CLI (network-admin@switch) > snmp-trap-sink-create community community-string [type TRAP_TYPE_V1_TRAP|TRAP_TYPE_V2C_TRAP|TRAP_TYPE_V2_INFORM] dest-host dest-host-string [dest-port dest-port-number]
community community-string |
Specify the community type. |
[type TRAP_TYPE_V1_TRAP|TRAP_TYPE_V2C_TRAP|TRAP_TYPE_V2_INFORM] |
Specify the trap type. The default trap is: TRAP_TYPE_V2C_TRAP. |
dest-host dest-host-string |
Specify the destination host. This can be an IP address or a hostname. |
[dest-port dest-port-number] |
Specify the destination port. The default port number is 162. |
For example, to create a community test1, with destination host as lyra10.pluribusnetworks.com and trap type as TRAP_TYPE_V1_TRAP, use the command:
CLI (network-admin@switch) > snmp-trap-sink-create community test1 dest-host lyra10.pluribusnetworks.com type TRAP_TYPE_V1_TRAP
This command sends the SNMPv1 traps to a receiver on the host lyra10 with the community string test1.
To setup the destination host for SNMPv3 trap receiver, use the command:
CLI (network-admin@switch) > snmp-v3-trap-sink-create user-name user-name-string [type TRAP_TYPE_V3_TRAP|TRAP_TYPE_V3_INFORM] dest-host dest-host-string [dest-port dest-port-number]
user-name user-name-string |
Specify the user name for the SNMPv3 trap. |
[type TRAP_TYPE_V3_TRAP|TRAP_TYPE_V3_INFORM] |
Specify the SNMPv3 trap type. |
dest-host dest-host-string |
Specify the destination host. |
[dest-port dest-port-number] |
Specify the destination port number. The default port number is 162 |
For example, to configure SNMPv3 traps for user test2, with destination host as lyra10.pluribusnetworks.com and with authentication enabled, use the command:
CLI (network-admin@switch) > snmp-v3-trap-sink-create user-name test2 dest-host lyra10.pluribusnetworks.com auth
This command configures the traps to be sent to lyra10 with the username test2, engine id 0xABCDEF and with authentication enabled. You will be prompted for an authentication password with this command.
Enabling SNMP Traps
After configuring the destination, you must enable the type of traps to be sent using the command:
CLI (network-admin@switch) > snmp-trap-enable-modify
Specify one or more of the following options: |
|
link-up-down|no-link-up-down |
Enable or disable traps for the port link state changes. |
interface-up-down|no-interface-up-down |
Enable or disable traps for vRouter interface status. |
default-monitors|no-default-monitors |
Enable or disable traps for default monitoring. |
physical-sensors|no-physical-sensors |
Enable or disable physical sensor traps for temperature, fan speed, etc. |
low-disk-space|no-low-disk-space |
Enable or disable traps for low disk space. |
low-disk-space-threshold low-disk-space-threshold-string |
Specify the Threshold value of low-disk-space in percentage. |
system-usage|no-system-usage |
Enable or disable traps for memory and CPU usage. |
high-system-usage-threshold high-system-usage-threshold-string |
Specify the Threshold value of system-usage in percentage. |
login-failure|no-login-failure |
Enable or disable traps for incorrect passwords during login. |
cluster-tr-diverge|no-cluster-tr-diverge |
Enable or disable traps when cluster transaction lists diverge. |
lacp-status|no-lacp-status |
Enable or disable traps for LACP status. |
vport-modified|no-vport-modified |
Enable or disable vPort modification traps. |
stp-port-modified|no-stp-port-modified |
Enable or disable STP port modification traps. |
mirror-to-cpu|no-mirror-to-cpu |
Enable or disable traps when mirror to CPU is configured. |
stp-port-state-failed|no-stp-port-state-failed |
Enable or disable STP port state failed traps. |
link-congestion-detected|no-link-congestion-detected |
Enable or disable traps for link congestion detection. |
fabric-node-state-changed|no-fabric-node-state-changed |
Enable or disable traps for fabric node state changes. |
stp-new-root|no-stp-new-root |
Enable or disable traps when new STP root is detected. |
stp-topology-changed|no-stp-topology-changed |
Enable or disable traps for STP topology changes. |
vrrp-new-master|no-vrrp-new-master |
Enable or disable traps for VRRP master changes. |
disable-start-stop|no-disable-start-stop |
Enable or disable traps for disable start/stop. |
cert-expiry|no-cert-expiry |
Enable or disable traps for the expiry of the Netvisor ONE certificates ( shipped with the switches) . |
sysup-alert|no-sysup-alert |
Enable or disable traps for system up alert. |
port-oir-error-state|no-port-oir-error-state |
Enable or disable traps for port OIR error. |
port-bw-threshold-exceed-event|no-port-bw-threshold-exceed-event |
Enable or disable traps for port bandwidth usage exceeding the threshold or falling below the threshold. |
The above command enables the notifications to be sent out when a link changes the state to up or down.
Further, You can enable SNMP trap notifications for the following events:
- Physical interface is up/down
- Data/vRouter interface is up/down
- CPU usage is higher than the configured threshold
- Memory utilization is higher than the configured threshold
- Disk utilization is higher than the configured threshold
- STP port is modified
- vPort is modified
- LAG/vLAG status changes
- Mirror-to-CPU vFlow is configured
- Link congestion is detected
- Fabric node state changes
- New STP root is elected
- VRRP master changes
- Disable start/stop
- Netvisor ONE certificate expires
- System up alert
- Port OIR error
- Port bandwidth usage exceeds a threshold