Testing SNMP Traps with CDOT 8.2.1, OCUM 6.1, and MibBrowser: 2/3 - CDOT 8.2.1

This post has been split into 3:

5: Sending SNMP Traps from CDOT 8.2.1 to TrapViewer

5.1: Verify SNMP is enabled

::> options snmp.enable on

5.2: Configure SNMP

The below is an example configuration:

::> snmp authtrap 0
::> snmp community add ro public
::> snmp contact naadmin@lab.com
::> snmp init 1
::> snmp location PRIMARY
::> snmp traphost add MSSNMP1.lab.priv

And a complete SNMP configuration output

::> snmp
contact  : naadmin@lab.com
location : PRIMARY
authtrap : 0
init     : 1
traphosts: mssnmp1.lab.priv (mssnmp1.lab.priv) {10.10.10.17}
community: ro  public

5.3: Send a Test Trap

Verify the traphost SNMP event destination is set:

::> event destination show
                                                   Hide
Name      Mail Dest. SNMP Dest.       Syslog Dest. Params
--------- ---------- ---------------- ------------ ------
allevents -          -                -            false
asup      -          -                -            false
criticals -          -                -            false
pager     -          -                -            false
traphost  -          mssnmp1.lab.priv -            false

Note: The above 5 event event destinations are defaults. More can be added.

If you run event route show, it will list all 7009 mappings between specific events and their destination.

::> event route show
...
7009 entries were displayed.

Only a small subset (341) of these support SNMP traps (there needs to be an entry in the mib):

::> event route show -snmp-support true
...
341 entries were displayed.

We can further trim the list down by event severity:

::> event route show -snmp-support true -severity EMERGENCY/ALERT/CRITICAL/ERROR/WARNING/NOTICE/INFORMATIONAL/DEBUG

And the below table lists the number of SNMP traps per severity type:

SNMP severity EMERGENCY traps count     = 13
SNMP severity ALERT traps count         = 16
SNMP severity CRITICAL traps count      = 30
SNMP severity ERROR traps count         = 72
SNMP severity WARNING traps count       = 65
SNMP severity NOTICE traps count        = 42
SNMP severity INFORMATIONAL traps count = 90
SNMP severity DEBUG traps count         = 13

By default, if we configure snmp traphost add SNMP_SERVER this configures the default traphost event destination. And by default, all events generated that have SNMP support will go to the traphost event destination. To have only a subset of SNMP supported events going to an SNMP server, do not configure snmp traphost add, and instead create a custom event destination, and add that destination to the required events (which support SNMP). Note: It is not possible to an SNMP destination to an event that does not support SNMP, this results in the error: Error: command failed: The destination NAME cannot be assigned because it has an SNMP field and the event does not support SNMP Trap.

Since this is not an advanced configuration, default traphost is configured, and by default any event that has SNMP support will send to the SNMP host, we can test without further ado:

::> set -privilege diagnostic
::*> event generate -messagename monitor.fan.critical -values 0

5.4: Verify the SNMP Trap has been Received

Check the event is registered in snmphistory on the Cluster:

NACLU1::*> event snmphistory show

Time               Node     Seq#  Message Name         Address
------------------ -------- ----- -------------------- -----------------
6/21/2014 12:32:16 NACLU1N1 15    monitor.fan.critical 10.10.10.17/public

Check to see if the trap has been received in TrapViewer:

Image: TrapViewer showing a .enterprises.netapp trap has been received

5.5: Further Reading

Clustered Data ONTAP 8.2
Network Management Guide (Updated for 8.2.1)
p70 - Managing SNMP on the cluster

Clustered Data ONTAP 8.2
System Administration Guide for Cluster Administrators (Updated for 8.2.1)
p206 - Monitoring the storage system

Comments