Cisco has decided to stop using the CISCO-ENVMON-MIB in newer hardware and use the CISCO-ENTITY-MIB instead. The problem that we have found with this MIB is it does not pass the name of the physical entity that triggered the trap. Cisco instead passes the physical entity's Index number instead. As a result, we now have to take time to match up the Entity Index number to the Entity name, which requires manual investigation. Is there anything we can do to have Spectrum match up the Index to a corresponding Entity Name and pass that in the Alert's event message?
Is there a way to pass the Entity Name in the CISCO-ENTITY-MIB Traps to help identify the offending module?
All supported DX NetOps Spectrum releases
Out of the box, Spectrum simply processes the traps, as they are written by the vendor, and passes the varbind information in the event message. However, this can be done through an Event Procedure, and requires a lot of customization work on the users part.
It's highly recommended that you have a Spectrum Developer ID before pursuing this workaround. Doing this customization work under a Developer ID, will allow you to easily export all customizations and import them to the SpectroSERVER in your environment. If you do not already have a developer ID, please open a case with CA Support and request a Developer ID.
To make this work you will need to need to create a custom attribute for the Rtr_Cisco model type, or any other supported Cisco Model Type that uses the newer Cisco MIBS. The reason you will need to create the custom attribute, is the Cisco device model types do not pass the Entity MIB object out of the box.
1. Stop Spectrum and launch MTE to create a custom attribute on the Rtr_Cisco model type to pass the entPhysicalName MIB object (1.3.6.1.2.1.47.1.1.1.1.7). This MIB object is currently mapped to the RFC2737MIB model and the rs2737mib model, used by Chassis Manager. The Rtr_Cisco model type does not support this MIB object.
IMPORTANT: When creating the new attribute, be sure to define the Attribute Type as a "List" type, since this is pulling information from a Table object. You can specify this is a list attribute by checking the "List" checkbox next to Attribute Type.
Note: If you have a Developer ID, it will allow you to export and import this custom attribute to the other SpectroSERVERs in your DSS environment. Otherwise you will need to make this change individually on every SpectroSERVER, and then hope each attribute is assigned the same attribute ID. Therefore, if you do not have a Developer ID, I highly recommend opening a case with Support and requesting one.
2. Once the Attribute has been defined and created, be sure to commit the change to the SSdb database, so it is written to the database catalog.
3. Once the attribute is created, you can restart Spectrum and launch the Event Configuration Editor. We need to make copies of the events related to the ceAlarmAsserted trap.
The trap generates event 0x002104b8, which uses an Event Rule to determine, which alarms are asserted. If ceAlarmHistSeverity (varbind 3) is equal to 4 (Informational) we generate event 0x002104b9; if ceAlarmHistSeverity = 3 we generate event 0x002104ba; if ceAlarmHistSeverity = 2 we generate event 0x002104bb, and if ceAlarmHistSeverity = 1 we generate event 0x002104bc.
We will need to make copies of these events and add the variable used by the Event Procedure that we will use later to pass the Entity Name in the new event, and the new EvFormat message that these new events will use. I found it easier to use a text editor, to set up the custom EventDisp file, after I had one working example. You will need to use a text editor to add the Event Procedure. ECE doesn’t provide an option for Event Procedures.
4. We also need to add the following Event Procedure to the events 0x002104b9 – 0x002104bc, as well as disable these events from generating an alarm:
The event procedure you want to add is as follows:
P "\
CreateEventWithAttributes( \
{ C CURRENT_MODEL }, \
{ H <new_event_code> }, \
SetEventAttribute( \
GetEventAttributeList(), \
{ U 20 }, \
ReadAttributeInstance( \
{ C CURRENT_MODEL }, \
{ H <custom_EntityName_Attr_ID> }, \
GetEventAttribute( { U 1 } ))))"
Where <new_event_code> will be the event code for the custom event you want to use, and <custom_EntityName_Attr_ID> is the Attribute ID of the custom EntityName attribute you created in Step 1.
For example:
0x002104ba E 30 P "\
CreateEventWithAttributes( \
{ C CURRENT_MODEL }, \
{ H 0xffff0001 }, \
SetEventAttribute( \
GetEventAttributeList(), \
{ U 20 }, \
ReadAttributeInstance( \
{ C CURRENT_MODEL }, \
{ H 0xffff0000}, \
GetEventAttribute( { U 1 } ))))"
0xffff0001 E 50 A 1,0x2104ba,1,2
This Event procedure pulls the list of Entity Names, passed by the custom “EntityName” attribute, and pulls the corresponding name for the Index number passed in varbind 1 {U 1} of the trap, and assigns the name value to {U 20}.
Therefore, {S 20} is the event variable used to pass the corresponding entity name to our new event messages.
5. Modify the Event message for each of our newly created events to use {S 20} to pass the entity name in the message. For example:
Physical Entity Alarm Asserted Event
A physical entity of {S 20} with Entity Table Physical Index {I 1}, Alarm Type {I 2} has asserted an alarm with severity {T ceAlarmSeverity 3} at time {G 4}.
6. Once all the modifications are complete, and saved, go back to the VNM model, and in the Component Detail pane – Information Tab – SpectroSERVER Control subview, click the “Update Event Configuration” button to reload the event configuration files.
7. Now when a trap is issued you should see the entity name passed in the alarm message.
For more information see these documentation topics: