Configuring the SNMP Server Event Manager
The SNMP server event manager works in conjunction with the Event MIB (RFC 2981). The purpose of this application is to allow many management functions (for example, fault detection, configuration management, accounting management, and performance management). These functions are traditionally performed by the network management station. However, by using the SNMP server event manager, you can distribute some of these functions to E-series routers and automate them.
Event MIB Purpose
The rapid growth of networks has made it impractical to directly manage networks from a single network management station (NMS). This brought about a need for a model that both automated and distributed event management. The goal was to allow devices to monitor themselves and other devices, and to take action under certain conditions.
The Event MIB (RFC 2981) defines a method for creating trigger conditions, testing those conditions, and determining which action to take when a trigger meets those conditions.
The Event MIB allows you to define test conditions for object integers that are accessible in the agent, making it possible to monitor any aspect of a device without defining specific notifications and complicating the agent definition. In this model, because devices have the ability to monitor themselves or other devices, the processing is distributed throughout the network. Also, sending the information only to the NMS that uses an event model reduces both network overhead and processing drain on the NMS.
Event MIB Structure
The Event MIB has three major parts: the trigger table, the objects table, and the event table. These tables also contain subordinate MIB tables that contain more detailed information about the trigger tests.
Trigger Table
The trigger table (mteTriggerTable) lists any currently-defined trigger conditions. Triggers fall into three categoriesexistence, Boolean, and threshold.
An existence trigger tests for the existence of a MIB object instance; you can specify that the trigger occur by either the appearance, disappearance, or change in value of a MIB instance.
A Boolean trigger tests whether the value of a MIB object (base syntax integer) is equal, unequal, greater than, less than, less than or equal to, or greater than or equal to some defined value.
A threshold trigger verifies a MIB object (base syntax integer) in relation to either a rising threshold value, falling threshold value, or both.
You can configure both Boolean and threshold tests to trigger on an absolute value or a delta value over a determined polling interval.
Subordinate MIB tables exist within the trigger section of each type of trigger test. In other words, each type of trigger (existence, threshold, and Boolean) contains a table that stores added information about that type of trigger test.
For example, a trigger entry of a specific type of test in the mteTriggerTable creates a linked entry in the appropriate subtable. In turn, this subtable contains more specific information about the specific test.
A delta table also exists within the trigger tables. This table stores information about any delta values based on any Boolean and threshold triggers. The delta table stores a MIB object that indicates whether any discontinuities occurred for any delta trigger (for example, a router reset).
Objects Table
The objects table (mteObjectsTable) defines objects that you want to add to event messages. In other words, you can create a list of user-specified objects and bind them to a trigger event. This can provide a snapshot of other values on a router when the trigger occurs. You can bind objects to a specific trigger, a type of test (for example, existence or Boolean tests), or a type of event (for example, rising or falling events).
Event Table
The event table (mteEventTable) defines what action you want the device to take when a trigger occurs. This action can be in the form of a notification, setting a specified MIB object, or both. The results of these actions are controlled within two subordinate MIB tablesnotification and set.
Notifications (mteNotifications), or traps, define what the router sends when an event occurs. These traps include the following:
- When a Boolean or existence trigger occurs, the router sends an mteTriggerFired trap.
- When a rising threshold trigger occurs, the router sends an mteTriggerRising trap.
- When a falling threshold trigger occurs, the router sends an mteTriggerFalling trap.
- If a trigger fails to complete a test for any reason, the router sends a global mteTriggerFailure trap.
- If an event fails to set, the router sends an mteEventSetFailure trap.
Sets define certain modifications to other MIB objects based on a particular event.
Configuration Tasks
To configure the SNMP server event manager:
- Access the SNMP server management event application.
host1(config)#snmp-server management-eventhost1(config-mgmtevent)#
NOTE: You must create a management event instance for each virtual router.
- (Optional) Specify the maximum number of trigger entries that you want the virtual router to support.
host1(config-mgmtevent)#resource 275- Create an event for each trap notification (mteTriggerFailure, mteTriggerFalling, or mteTriggerRising) that you want to use by specifying an event owner and event name.
host1(config-mgmtevent)#event sysadmin failuretriggerhost1(config-mgmtevent-event)#exithost1(config-mgmtevent)#event sysadmin fallingtriggerhost1(config-mgmtevent-event)#exithost1(config-mgmtevent)#event sysadmin risingtriggerhost1(config-mgmtevent-event)#exit
NOTE: You must create a separate event for each trap notification that you want to use. However, you can specify the trap notification and enable the trap before exiting the event context.
- Define each event to send a trap notification (mteTriggerFailure, mteTriggerFalling, and mteTriggerRising).
host1(config-mgmtevent)#event sysadmin failuretriggerhost1(config-mgmtevent-event)#notification id mteTriggerFailurehost1(config-mgmtevent-event)#exithost1(config-mgmtevent)#event sysadmin fallingtriggerhost1(config-mgmtevent-event)#notification id mteTriggerFallinghost1(config-mgmtevent-event)#exithost1(config-mgmtevent)#event sysadmin risingtriggerhost1(config-mgmtevent-event)#notification id mteTriggerRisinghost1(config-mgmtevent-event)#exit- Enable the event, and exit the event configuration level.
host1(config-mgmtevent)#event sysadmin failuretriggerhost1(config-mgmtevent-event)#enablehost1(config-mgmtevent-event)#exithost1(config-mgmtevent)#event sysadmin fallingtriggerhost1(config-mgmtevent-event)#enablehost1(config-mgmtevent-event)#exithost1(config-mgmtevent)#event sysadmin risingtriggerhost1(config-mgmtevent-event)#enablehost1(config-mgmtevent-event)#exithost1(config-mgmtevent)#
NOTE: Once enabled, you cannot edit an event or trigger configuration. To change an enabled event or trigger, you must delete it and re-create it.
- Define the trigger that you want to use for an event by specifying a trigger owner and trigger name.
host1(config-mgmtevent)#trigger george trigger1host1(config-mgmtevent-trigger)#- Specify a MIB object to sample.
host1(config-mgmtevent-trigger)#sample value-id 1.3.6.1.2.1.60.1.2.1.1.7- Specify the frequency (in seconds) at which you want the sampling to occur.
host1(config-mgmtevent-trigger)#frequency 100
NOTE: Unless you specify that you want to perform delta sampling, the values are absolute.
- (Optional) Specify that you want to perform delta sampling on the sample value ID.
host1(config-mgmtevent-trigger)#delta-samplinghost1(config-mgmtevent-trigger)#delta-sampling discontinuity-id 1.3.6.1.2.1.31.1.1.1.19.9(Optional) Enter the discontinuity type (timeStamp or timeTicks) that you want the test to use. host1(config-mgmtevent-trigger)#delta-sampling discontinuity-id-type timeStamp
- (Optional) Configure the desired SNMP security level for the agent that you want to poll.
host1(config)#snmp security read- Define the test values that you want this trigger to use.
You can define a Boolean test, existence test, or threshold test. See the following sections for procedures.
Defining a Boolean Test
You can configure a Boolean trigger to test whether the value of an integer object is equal, unequal, greater than, less than, less than or equal to, or greater than or equal to some defined value.
- Define the Boolean-test comparison that you want this trigger to use.
host1(config-mgmtevent-trigger)#boolean-test comparison greater- (Optional) Specify that you do not want the Boolean test to perform a comparison when this trigger first becomes active.
host1(config-mgmtevent-trigger)#boolean-test startup- Specify the events that you want the Boolean-test trigger to use by entering an event owner name and event name.
NOTE: You do not need to bind a failure event to a trigger. If you create a failure event and a failure occurs, the router sends the trap if the event owner is the same as the trigger owner.
host1(config-mgmtevent-trigger)#boolean-test event george trigger1When specifying an event, use the exact owner name and event name.Specify the Boolean value to which the test compares.
host1(config-mgmtevent-trigger)#boolean-test value 5175438
- Specify the agent on which the object resides.
host1(config-mgmtevent-trigger)#agent context-name router1You can obtain the agent context name for a virtual router from the show snmp agent command. The agent context name is independent of the virtual router name.Enable the trigger.
host1(config-mgmtevent-trigger)#enableOnce enabled, you cannot edit an event or trigger configuration. To change an enabled event or trigger, you must delete it and re-create it.
Defining an Existence Test
An existence test looks for the existence of a MIB object. The appearance, disappearance, or a change in value of the object can trigger the existence test.
- Define the existence test test-type value that you want this trigger to use.
host1(config-mgmtevent-trigger)#existence-test test-type changed- Define the startup threshold conditionabsent or presentthat you want this trigger to use.
host1(config-mgmtevent-trigger)#existence-test startup absent- Specify the events that you want the existence-test trigger to use by entering an event owner name and event name.
NOTE: You do not need to bind a failure event to a trigger. If you create a failure event, if a failure occurs, and if the trigger owner and the event owner are the same, the router sends the trap.
host1(config-mgmtevent-trigger)#boolean-test event george trigger1When specifying an event, make sure to use the exact owner name and event name.
- Specify the agent on which the object resides.
host1(config-mgmtevent-trigger)#agent context-name router1You can obtain the agent context name for a virtual router from the show snmp agent command. The agent context name is independent of the virtual router name.
Once enabled, you cannot edit an event or trigger configuration. To change an enabled event or trigger, you must delete it and re-create it.
Defining a Threshold Test
- Define the threshold-test values that you want this trigger to use.
NOTE: The rising value must always be larger than the falling value. Entering a lower rising value than a falling value will provide invalid results or errors.
host1(config-mgmtevent-trigger)#threshold-test absolute-value rising 2000 falling 1900delta-valueUse when defining delta threshold values host1(config-mgmtevent-trigger)#threshold-test delta-value rising 2000 falling 1900
- Define the startup threshold condition that you predict the sample to initially followfalling, rising, risingorfalling. For example, if you are sampling a MIB value that you know will start from zero and rise, you would specify a rising startup condition.
host1(config-mgmtevent-trigger)#threshold-test startup rising- Specify the events (rising or falling) that you want the threshold-test trigger to use by entering an event owner name and event name.
NOTE: You do not need to bind a failure event to a trigger. If you create a failure event, if a failure occurs, and if the trigger owner and the event owner are the same, the router sends the trap.
host1(config-mgmtevent-trigger)#threshold-test event falling sysadmin fallingtriggerhost1(config-mgmtevent-trigger)#threshold-test event rising sysadmin risingtriggerWhen specifying an event, make sure to use the exact owner name and event name.
- Specify the agent on which the object resides.
host1(config-mgmtevent-trigger)#agent context-name router1You can obtain the agent context name for a virtual router from the show snmp agent command. The agent context name is independent of the virtual router name.
Once enabled, you cannot edit an event or trigger configuration. To change an enabled event or trigger, you must delete it and re-create it.
agent context-name
- Use to specify the virtual router SNMP agent on which you want to poll MIB objects.
- The default is the current context (virtual router).
- The contextName value is the virtual router number in the order the virtual router was created (for example, router1, router2, and so on). Use the show snmp agent command to obtain the context name for the virtual router.
- Use the wildcard keyword to specify that the context name is a wildcard value.
NOTE: Use caution when assigning wildcards. Wildcards can rapidly use up trigger resources.
- Use the limit keyword to specify the maximum number of agents to be polled.
- Example 1
host1(config-mgmtevent-trigger)#agent context-name router1 wildcardExample 2 host1(config-mgmtevent-trigger)#agent context-name router1 wildcard limit 15Use the no version to return to the default context (virtual router). boolean-test
- Use to define Boolean test values for the trigger that you are configuring, including comparison settings, a Boolean value, a startup condition, and binding an event to the Boolean-test trigger.
- Example 1Specifying a comparison setting
host1(config-mgmtevent-trigger)#boolean-test comparison lessExample 2Specifying a Boolean value to which the test compares host1(config-mgmtevent-trigger)#boolean-test value 5175438Example 3Binding an event to the Boolean-test trigger host1(config-mgmtevent-trigger)#boolean-test event sysadmin booleanTriggerExample 4Setting the trigger to not perform a Boolean test on startup host1(config-mgmtevent-trigger)#boolean-test startupUse the no version to delete the Boolean-test values for this trigger or to remove either the startup condition or event binding. delta-sampling
host1(config-mgmtevent-trigger)#delta-sampling(Optional) Use the discontinuity-id option to specify a discontinuity MIB ID for the sample. The discontinuity MIB ID monitors the sample for any discontinuity errors during the sample frequency. If a discontinuity error occurs, the router removes the sampling for that interval. (Optional) Use the discontinuity-id-type option to specify a discontinuity ID type (either timeStamp or timeTicks). The discontinuity ID type indicates the time value that you expect for a specific sample. Use the no version to turn off delta sampling and use absolute sampling (the default). enable
host1(config-mgmtevent-event)#enableExample 2Trigger Configuration Mode host1(config-mgmtevent-trigger)#enableOnce enabled, you cannot edit an event or trigger configuration (even when it is disabled). To change an enabled event or trigger, you must delete it and re-create it. There is no no version. event
- Use to create an event and access the event configuration mode of the SNMP server event manager.
- Example
host1(config-mgmtevent)#event sysadmin failuretriggerhost1(config-mgmtevent-event)#To leave the event configuration mode, use the exit command. Use the no version to remove the event. existence-test
- Use to define existence test values for the trigger that you are configuring, including binding an event to the existence-test trigger, specifying a startup condition, and defining an existence-test type.
- You can specify one or both startup conditions in the same command. You can specify one, two, or all three test types in the same command.
- Example 1Binding an event to the Boolean-test trigger
host1(config-mgmtevent-trigger)#existence-test event sysadmin existenceTriggerExample 2Specifying a startup condition host1(config-mgmtevent-trigger)#existence-test startup presentExample 3Specifying an existence test type host1(config-mgmtevent-trigger)#existence-test test-type absentUse the no version to delete the existence-test values for this trigger or to remove either the startup condition or event binding. frequency
host1(config-mgmtevent)#frequency 100Use the no version to restore the default frequency value (600 seconds). notification id
host1(config-mgmtevent-event)#notification id mteTriggerFailureUse the no version to remove the notification from the event. Removal returns the notification value to its default (0.0) resource
- Use to specify the total number of triggers that the virtual router allows.
CAUTION: When assigning wildcards, make sure to allow for enough trigger resources.
- Example
host1(config-mgmtevent-event)#resource 250Use the no version to restore the default resource value (50). sample
- Use to specify the MIB object that you want to sample for the trigger that you are configuring.
- Example
host1(config-mgmtevent)#sample value-id 1.3.6.1.2.1.60.1.2.1.1.7Use the no version to remove the MIB object from the trigger. Removal returns the sample value-id to its default (0.0). set
- Use to perform an SNMP set operation under certain event conditions.
- ExampleSets the administrative status of interface 123 to down (2)
host1(config-mgmtevent-event)#set context-name router1host1(config-mgmtevent-event)#set id 1.3.6.1.2.1.2.2.1.7.123host1(config-mgmtevent-event)#set value 2Use the no version to remove the set operation. snmp-server management-event
- Use to launch the SNMP server event manager mode on each virtual router on which you plan to manage events.
- Example
host1(config)#snmp-server management-eventhost1(config-mgmtevent)#To leave the SNMP server event manager, use the exit command. Use the no version to delete all the management events. snmp-server security
host1(config)#snmp-server security readUse the no version to return to the SNMP security level to its default (no-access). threshold-test
- Use to define the threshold values for the trigger that you are configuring, including specifying rising and falling values, a startup threshold condition, and binding an event to the threshold-test trigger.
- Example 1Specifying absolute values
host1(config-mgmtevent-trigger)#threshold-test absolute-value rising 2000 falling 1900Example 2Specifying a startup threshold condition host1(config-mgmtevent-trigger)#threshold-test startup risingExample 3Binding an event to the threshold-test trigger host1(config-mgmtevent-trigger)#threshold-test event sysadmin failureTriggerUse the no version to delete the threshold-test values for this trigger or remove either the threshold startup condition or event binding. trigger
- Use to create a trigger and access the trigger configuration mode of the SNMP server event manager.
- Example
host1(config-mgmtevent)#trigger fred trigger1host1(config-mgmtevent-trigger)#To leave the trigger configuration mode, use the exit command. Use the no version to remove the trigger. Monitoring Events
To view the status of the SNMP agent, use the following show snmp agent command. To view statistics associated with events, resources, and triggers, use the show snmp management-event command.
show snmp agent
- context nameRouter that contains the MIB agent
- access permission levelAccess permission level for other virtual routers that may want to access the agent
host1#show snmp agentcontext name: router1access permission level: no accesssnmp proxy: enabledshow snmp management-event
- Use to view statistical SNMP event information for event table entries, router resources, and trigger table entries.
- Omit the events, resource, statistics, or triggers options to obtain a full output.
- Field descriptions
- SampleMinimumMinimum number of samples to be taken
- SampleInstanceMaximumMaximum number of samples to be taken
- SampleInstancesNumber of sample instances being monitored
- SampleInstancesHighHighest number of samples taken for any of the sample instances
- SampleInstancesLacksNumber of times this system could not take a new sample because that allocation would have exceeded the limit set by mteResourceSampleInstanceMaximum
- OwnerOwner value assigned to the trigger
- NameName value assigned to the trigger
- TestType of trigger test to perform
- SampleTypeType of sampling (absolute or delta) to perform
- ValueIDObject ID of the MIB sample for this trigger
- ValueIDLimitNot supported in this release; reads as zero
- ValueIDWildcardNot supported in this release; reads as False
- ContextNameManagement context (for example, router1) from which to obtain mteTriggerValueID
- ContextNameRgulrExprssnNot supported in this release
- ContextNameLimitNot supported in this release; reads as zero
- ContextNameWildcardNot supported in this release; reads as False
- FrequencyFrequency at which this trigger is sampled
- ObjectsOwnerNot supported in this release
- ObjectsNot supported in this release
- EnabledState (False [disabled] or True [enabled]) of the trigger
- EntryStatusActive/inactive status of the instance
- ComparisonComparison value for this trigger
- ValueObject ID value to which this trigger compares
- StartupWhether or not this trigger performs a Boolean test on startup
- ObjectsOwnerOwner of this object
- ObjectsName of this object
- EventOwnerOwner of this event
- EventName of this event
- TestTest type for this trigger
- StartupStartup condition for this trigger
- ObjectsOwnerOwner of this object
- ObjectsName of this object
- EventOwnerOwner of this event
- EventName of this event
- trigger ownerOwner value assigned to the trigger
- trigger nameName value assigned to the trigger
- current timeCurrent UTC time
- started samplingUTC time sampling started
- last sampledUTC time event last sampled
- sample instancesNumber of sample instances being monitored
- times sampledNumber of times events sampled
- event trapsNumber of traps sent
- event setsNumber of events set
- failuresNumber of event failures
- sample overrunNumber of times the event manager missed sampling for the current value within the given time period
- failure trapsNumber of failure traps sent as a result of event failures
- StartupStartup threshold condition for this trigger
- RisingRising threshold condition for this trigger
- FallingFalling threshold condition for this trigger
- DeltaRisingDelta rising threshold condition for this trigger
- DeltaFallingDelta falling threshold condition for this trigger
- ObjectsOwnerNot supported in this release
- ObjectsNot supported in this release
- RisingEventOwnerRising event owner value for this trigger
- RisingEventRising event name value for this trigger
- FallingEventOwnerFalling event owner value for this trigger
- FallingEventFalling event name value for this trigger
- DeltaRisingEventOwnerDelta rising event owner value for this trigger
- DeltaRisingEventDelta rising event name value for this trigger
- DeltaFallingEventOwnerDelta falling event owner value for this trigger
- DeltaFallingEventDelta falling event name value for this trigger
- DiscontinuityIDDiscontinuity MIB ID for this trigger
- DiscontinuityIDWildcardNot supported in this release
- DiscontinuityIDTypeDiscontinuity ID type for this trigger
- OwnerOwner value for this event
- NameName of this event
- ActionsAction (for example, notification) that takes place when this event is triggered
- EnabledEnabled state (True [enabled] or False [disabled]) of this event
- EntryStatusEntry status for this event
- NotificationNotification trap setting for this event
- ObjectsOwnerNot supported in this release
- ObjectsNot supported in this release
- ObjectObject ID that the trigger is setting
- ObjectWildcardWhether or not the object is a wildcard
- ValueValue to which you are setting the object ID when the trigger fires
- ContextNameManagement context (for example, router1) from which to obtain mteTriggerValueID
- ContextNameWildcardWhether or not the context name is a wildcard
host1#show snmp management-eventResource---------------------------------------------------------------------------SampleMinimum: 1SampleInstanceMaximum: 50SampleInstances: 14SampleInstancesHigh: 14SampleInstancesLacks: 0Triggers---------------------------------------------------------------------------Owner: unitTestName: booleantest1Test: booleanSampleType: absoluteValueValueID: 1.3.6.1.2.1.92.1.1.2.0ValueIDLimit: 0ValueIDWildcard: FalseContextName: router1ContextNameLimit: 0ContextNameWildcard: FalseFrequency: 40ObjectsOwner: unitTestObjects: test3Enabled: FalseEntryStatus: createAndWait------------------------ BooleanComparison: equalValue: 300Startup: FalseObjectsOwner:Objects:EventOwner: unitTestEvent: eventTest1--------------------------------- TriggerOwner: unitTestName: booleantest2Test: booleanSampleType: absoluteValueValueID: 1.3.6.1.2.1.92.1.1.2.0ValueIDLimit: 0ValueIDWildcard: FalseContextName: router1ContextNameLimit: 0ContextNameWildcard: FalseFrequency: 40ObjectsOwner: unitTestObjects: test3Enabled: FalseEntryStatus: createAndWait------------------------ ExistenceTest: absentStartup: absentObjectsOwner: unitTestObjects: test3EventOwner: unitTestEvent: eventTest3------------------------ ThresholdStartup: fallingRising: 200Falling: 100DeltaRising: 0DeltaFalling: 0ObjectsOwner:Objects:RisingEventOwner: unitTestRisingEvent: eventTest2FallingEventOwner: unitTestFallingEvent: eventTest3DeltaRisingEventOwner:DeltaRisingEvent:DeltaFallingEventOwner:DeltaFallingEvent:------------------------ DeltaDiscontinuityID: 1.3.6.1.2.1.92.1.1.2DiscontinuityIDWildcard: TrueDiscontinuityIDType: timeTicksObjects---------------------------------------------------------------------------Owner: unitTest Name: test1Index: 1ID: 1.3.6.1.2.1.11.1.0IDWildcard: FalseEntryStatus: activeIndex: 2ID: 1.3.6.1.2.1.11.2.0IDWildcard: FalseEntryStatus: activeIndex: 5ID: 1.3.6.1.2.1.11.30.0IDWildcard: FalseEntryStatus: activeEvents---------------------------------------------------------------------------Owner: unitTestName: eventTest1Actions: notification setEnabled: TrueEntryStatus: active------------------------ NotificationNotification: mteTriggerFiredObjectsOwner: unitTestObjects: test3------------------------ SetObject: 1.3.6.1.2.1.11.1.0ObjectWildcard: FalseValue: -20ContextName: routerContextNameWildcard: True