b Sysmon Cg41crs
b Sysmon Cg41crs
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH
THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY,
CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version
of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS.
CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT
LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown
for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: http://
www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership
relationship between Cisco and any other company. (1110R)
Preface Preface xv
Changes to This Document xv
Obtaining Documentation and Submitting a Service Request xv
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 iii
Contents
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
iv OL-24731-01
Contents
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 v
Contents
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
vi OL-24731-01
Contents
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 vii
Contents
action_syslog 173
action_track_read 174
Embedded Event Manager Utility Tcl Command Extensions 175
appl_read 175
appl_reqinfo 176
appl_setinfo 176
counter_modify 177
fts_get_stamp 178
register_counter 179
register_timer 180
timer_arm 182
timer_cancel 184
unregister_counter 185
Embedded Event Manager System Information Tcl Command Extensions 186
sys_reqinfo_cpu_all 186
sys_reqinfo_crash_history 187
sys_reqinfo_mem_all 188
sys_reqinfo_proc 190
sys_reqinfo_proc_all 192
sys_reqinfo_proc_version 192
sys_reqinfo_routername 193
sys_reqinfo_syslog_freq 193
sys_reqinfo_syslog_history 194
sys_reqinfo_stat 195
sys_reqinfo_snmp 196
sys_reqinfo_snmp_trap 197
sys_reqinfo_snmp_trapvar 197
SMTP Library Command Extensions 197
smtp_send_email 198
smtp_subst 199
CLI Library Command Extensions 200
cli_close 200
cli_exec 201
cli_get_ttyname 201
cli_open 202
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
viii OL-24731-01
Contents
cli_read 203
cli_read_drain 203
cli_read_line 204
cli_read_pattern 204
cli_write 205
Tcl Context Library Command Extensions 208
context_retrieve 208
context_save 212
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 ix
Contents
Configuring and Scheduling a UDP Jitter Operation on the Source Device 227
Prerequisites for Configuring a UDP Jitter Operation on the Source Device 228
Configuring and Scheduling a Basic UDP Jitter Operation on the Source Device 229
Configuring and Scheduling a UDP Jitter Operation with Additional Characteristics
232
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
x OL-24731-01
Contents
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 xi
Contents
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
xii OL-24731-01
Contents
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 xiii
Contents
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
xiv OL-24731-01
Preface
The Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router preface contains these
sections:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 xv
Preface
Obtaining Documentation and Submitting a Service Request
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
xvi OL-24731-01
CHAPTER 1
Implementing and Monitoring Alarms and Alarm
Log Correlation
This module describes the concepts and tasks related to configuring alarm log correlation and monitoring
alarm logs and correlated event records. Alarm log correlation extends system logging to include the ability
to group and filter messages generated by various applications and system servers and to isolate root messages
on the router.
This module describes the new and revised tasks you need to perform to implement logging correlation and
monitor alarms on your network.
Note For more information about system logging on Cisco IOS XR software and complete descriptions of the
alarm management and logging correlation commands listed in this module, see the Related Documents,
on page 52 section of this module. To locate documentation for other commands that might appear in the
course of performing a configuration task, search online in the Cisco IOS XR Commands Master List for
the Cisco CRS Router.
Feature History for Implementing and Monitoring Alarms and Alarm Log Correlation
Release Modification
Release 2.0 This feature was introduced.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 1
Implementing and Monitoring Alarms and Alarm Log Correlation
Prerequisites for Implementing and Monitoring Alarms and Alarm Log Correlation
Release Modification
Release 3.6.0 Support was added for the following features:
• Hierarchical Correlation
• Stateful Correlation Rules
• Reparent Flag
• Reissue Nonbistate Flag
• Context Correlation Flag
• Subconfiguration Modes:
◦Stateful correlation rule
◦Nonstateful correlation rule
◦Logging correlator apply rule
◦Logging correlator apply rule set
◦Root-cause
◦Non-root cause
• Prerequisites for Implementing and Monitoring Alarms and Alarm Log Correlation, page 2
• Information About Implementing Alarms and Alarm Log Correlation, page 3
• How to Implement and Monitor Alarm Management and Logging Correlation, page 11
• Configuration Examples for Alarm Management and Logging Correlation, page 47
• Additional References, page 52
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
2 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Information About Implementing Alarms and Alarm Log Correlation
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 3
Implementing and Monitoring Alarms and Alarm Log Correlation
Alarm Logging and Debugging Event Management System
Figure 1: ALDEMS Component Communications, on page 4 illustrates the relationship between the
components that constitute ALDEMS.
Correlator
The correlator receives messages from system logging (syslog) helper processes that are distributed across
the nodes on the router and forwards syslog messages to the syslog process. If a logging correlation rule is
configured, the correlator captures messages searching for a match with any message specified in the rule. If
the correlator finds a match, it starts a timer that corresponds to the timeout interval specified in the rule. The
correlator continues searching for a match to messages in the rule until the timer expires. If the root case
message was received, then a correlation occurs; otherwise, all captured messages are forwarded to the syslog.
When a correlation occurs, the correlated messages are stored in the logging correlation buffer. The correlator
tags each set of correlated messages with a correlation ID.
Note For more information about logging correlation, see the Logging Correlation, on page 5 section.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
4 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Logging Correlation
Alarm Logger
The alarm logger is the final destination for system logging messages forwarded on the router. The alarm
logger stores alarm messages in the logging events buffer. The logging events buffer is circular; that is, when
full, it overwrites the oldest messages in the buffer.
Note Alarms are prioritized in the logging events buffer. When it is necessary to overwrite an alarm record, the
logging events buffer overwrites messages in the following order: nonbistate alarms first, then bistate
alarms in the CLEAR state, and, finally, bistate alarms in the SET state. For more information about bistate
alarms, see the Bistate Alarms, on page 7 section.
When the table becomes full of messages caused by bistate alarms in the SET state, the earliest bistate message
(based on the message time stamp, not arrival time) is reclaimed before others. The buffer size for the logging
events buffer and the logging correlation buffer, thus, should be adjusted so that memory consumption is
within your requirements.
A table-full alarm is generated each time the logging events buffer wraps around. A threshold crossing
notification is generated each time the logging events buffer reaches the capacity threshold.
Messages stored in the logging events buffer can be queried by clients to locate records matching specific
criteria. The alarm logging mechanism assigns a sequential, unique ID to each alarm message.
Logging Correlation
Logging correlation can be used to isolate the most significant root messages for events affecting system
performance. For example, the original message describing a card online insertion and removal (OIR) of a
modular services card (MSC) can be isolated so that only the root-cause message is displayed and all subsequent
messages related to the same event are correlated. When correlation rules are configured, a common root
event that is generating secondary (non-root-cause) messages can be isolated and sent to the syslog, while
secondary messages are suppressed. An operator can retrieve all correlated messages from the logging correlator
buffer to view correlation events that have occurred.
Correlation Rules
Correlation rules can be configured to isolate root messages that may generate system alarms. Correlation
rules prevent unnecessary stress on ALDEMS caused by the accumulation of unnecessary messages. Each
correlation rule hinges on a message identification, consisting of a message category, message group name,
and message code. The correlator process scans messages for occurrences of the message.
If the correlator receives a root message, the correlator stores it in the logging correlator buffer and forwards
it to the syslog process on the RP. From there, the syslog process forwards the root message to the alarm
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 5
Implementing and Monitoring Alarms and Alarm Log Correlation
Application of Rules and Rule Sets
logger in which it is stored in the logging events buffer. From the syslog process, the root message may also
be forwarded to destinations such as the console, remote terminals, remote servers, the fault management
system, and the Simple Network Management Protocol (SNMP) agent, depending on the network device
configuration. Subsequent messages meeting the same criteria (including another occurrence of the root
message) are stored in the logging correlation buffer and are forwarded to the syslog process on the router.
If a message matches multiple correlation rules, all matching rules apply and the message becomes a part of
all matching correlation queues in the logging correlator buffer.
The following message fields are used to define a message in a logging correlation rule:
• Message category
• Message group
• Message code
Wildcards can be used for any of the message fields to cover wider set of messages. Configure the appropriate
set of messages in a logging correlation rule configuration to achieve correlation with a narrow or wide scope
(depending on your objective).
Types of Correlation
There are two types of correlation that are configured in rules to isolate root-cause messages:
Nonstateful Correlation—This correlation is fixed after it has occurred, and non-root-cause alarms that are
suppressed are never forwarded to the syslog process. All non-root-cause alarms remain buffered in correlation
buffers.
Stateful Correlation—This correlation can change after it has occurred, if the bistate root-cause alarm clears.
When the alarm clears, all the correlated non-root-cause alarms are sent to syslog and are removed from the
correlation buffer. Stateful correlations are useful to detect non-root-cause conditions that continue to exist
even if the suspected root cause no longer exists.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
6 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Alarm Severity Level and Filtering
that is also specified in the rule. A message search for a match continues until the timer expires. Correlation
occurs after the root-cause message is received.
The first message (with category, group, and code triplet) configured in a correlation rule defines the root-cause
message. A root-cause message is always forwarded to the syslog process. See the Correlation Rules, on page
5 section to learn how the root-cause message is forwarded and stored.
1 Alerts
2 Critical
3 Errors
4 Warnings
5 Notifications
6 Informational
Bistate Alarms
Bistate alarms are generated by state changes associated with system hardware, such as a change of interface
state from active to inactive, the online insertion and removal (OIR) of a modular service card (MSC), or a
change in component temperature. Bistate alarm events are reported to the logging events buffer by default;
informational and debug messages are not.
Cisco IOS XR software software provides the ability to reset and clear alarms. Clients interested in monitoring
alarms in the system can register with the alarm logging mechanism to receive asynchronous notifications
when a monitored alarm changes state.
Bistate alarm notifications provide the following information:
• The origination ID, which uniquely identifies the resource that causes an alarm to be raised or cleared.
This resource may be an interface, a line card, or an application-specific integrated circuit (ASIC). The
origination ID is a unique combination of the location, job ID, message group, and message context.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 7
Implementing and Monitoring Alarms and Alarm Log Correlation
Capacity Threshold Setting for Alarms
By default, the general format of bistate alarm messages is the same as for all syslog messages:
node-id:timestamp : process-name [ pid ] : %category-group-severity-code : message-text
The following is a sample bistate alarm message:
The message text includes the location of the process logging the alarm. In this example, the alarm was logged
by the line protocol on POS interface 0/2/0/2. Optionally, you can configure the output to include the location
of the actual alarm source, which may be different from the process that logged the alarm. This appears as an
additional display field before the message text.
When alarm source location is displayed, the general format becomes:
node-id:timestamp : process-name pid : %category-group-severity-code : source-location:message-text
The example above becomes:
For information about how to configure the output to include the location of the actual alarm source, see
Enabling Alarm Source Location Display Field for Bistate Alarms, on page 30.
Hierarchical Correlation
Hierarchical correlation takes effect when the following conditions are true:
• When a single alarm is both a root cause for one rule and a non-root cause for another rule.
• When alarms are generated that result in successful correlations associated with both rules.
Rule 2
Root Cause 2 Cat 2 Group 2 Code 2
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
8 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Context Correlation Flag
If three alarms are generated for Cause 1, 2, and 3, with all alarms arriving within their respective correlation
timeout periods, then the hierarchical correlation appears like this:
Cause 1 -> Cause 2 -> Cause 3
The correlation buffers show two separate correlations: one for Cause 1 and Cause 2 and the second for Cause
2 and Cause 3. However, the hierarchical relationship is implicitly defined.
Note Stateful behavior, such as reparenting and reissuing of alarms, is supported for rules that are defined as
stateful; that is, correlations that can change.
If the context correlation flag is not set on Rule 1, a scenario in which alarm A generated from context 1 and
alarm B generated from context 2 results in the rule applying to both contexts regardless of the type of context.
If the context correlation flag is now set on Rule 1 and the same alarms are generated, they are not correlated
as they are from different contexts.
With the flag set, the correlator analyzes alarms against the rule only if alarms arrive from the same context.
In other words, if alarm A is generated from context 1 and alarm B is generated from context 2, then a
correlation does not occur.
Reparent Flag
The reparent flag specifies what happens to non-root-cause alarms in a hierarchical correlation when their
immediate root cause clears.
The following example illustrates context correlation behavior:
• Rule 1 has a root cause A and an associated non-root cause B
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 9
Implementing and Monitoring Alarms and Alarm Log Correlation
Reissue Nonbistate Flag
In this scenario, if alarm A arrives generated from context 1 and alarm B generated from context 2, then a
correlation occurs—regardless of context.
If the context correlation flag is now set on Rule 1 and the same alarms are generated, they are not correlated,
because they are from different contexts.
Internal Rules
Internal rules are defined on Cisco IOS XR software and are used by protocols and processes within
Cisco IOS XR software. These rules are not customer configurable, but you may view them by using the
show logging correlator rule command. All internal rule names are prefixed with [INTERNAL].
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
10 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
How to Implement and Monitor Alarm Management and Logging Correlation
• Extract the generic pieces of correlation functionality from the existing syslog correlator
• Create DLLs and APIs suitable for reusing the functionality in other components
• Integrate the SNMP agent with the DLLs to enable SNMP trap correlation
The logging correlator mechanism, running on the active route processor, begins queueing messages matching
the ones specified in the correlation rules for the time specified in the timeout interval of the correlation rule.
The timeout interval begins when the correlator captures any alarm message specified for a given rule.
SUMMARY STEPS
1. configure
2. logging correlator rule correlation-rule { type { stateful | nonstateful }}
3. timeout [ milliseconds ]
4. Use one of these commands:
• end
• commit
5. show logging correlator rule {all | correlation-rule1 ... correlation-rule14 } [ context context1 ... context
6 ] [ location node-id1...node-id6 ] [ rulesource { internal | user }] [ ruletype { nonstateful | stateful
}] [ summary | detail ]
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 11
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring Logging Correlation Rules
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging correlator rule correlation-rule { type { Configures a logging correlation rule.
stateful | nonstateful }}
• Stateful correlations can change specifically if the root-cause
alarm is bistate.
Example:
• Nonstate correlations cannot change. All non-root-cause alarms
RP/0/RP0/CPU0:router(config)# logging
correlator rule rule_stateful remain in the correlation buffers.
Step 3 timeout [ milliseconds ] Specifies the collection period duration time for the logging correlator
rule message.
Example: • Timeout begins when the first alarm message identified by the
RP/0/RP0/CPU0:router(config-corr-rule-st)# correlation rule is logged.
timeout 60000
Step 5 show logging correlator rule {all | (Optional) Displays defined correlation rules.
correlation-rule1 ... correlation-rule14 } [ context
context1 ... context 6 ] [ location • The output describes the configuration of each rule name,
including the message category, group, and code information.
node-id1...node-id6 ] [ rulesource { internal | user
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
12 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring Logging Correlation Rule Sets
Example:
RP/0/RP0/CPU0:router# show logging
correlator rule all
SUMMARY STEPS
1. configure
2. logging correlator ruleset ruleset
3. rulename rulename
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging correlator ruleset ruleset Configures a logging correlation rule set.
Example:
RP/0/RP0/CPU0:router(config)# logging
correlator ruleset ruleset1
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 13
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring Root-cause and Non-root-cause Alarms
Example:
RP/0/RP0/CPU0:router(config-corr-ruleset)#
rulename stateful_rule
Step 5 show logging correlator ruleset { all | (Optional) Displays defined correlation rule sets.
correlation-ruleset1...correlation-ruleset14 } [ detail
| summary ]
Example:
RP/0/RP0/CPU0:router# show logging
correlator ruleset all
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
14 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring Root-cause and Non-root-cause Alarms
SUMMARY STEPS
1. configure
2. logging correlator rule correlation-rule { type { stateful | nonstateful }}
3. rootcause { msg-category group-name msg-code }
4. nonrootcause
5. alarm msg-category group-name msg-code
6. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging correlator rule correlation-rule { type { stateful Configures a logging correlation rule and enters submodes for
| nonstateful }} stateful and nonstateful rule types.
• Stateful correlations can change specifically if the
Example: root-cause alarm is bistate.
RP/0/RP0/CPU0:router(config)# logging correlator
rule rule_stateful • Nonstate correlations cannot change. All non-root-cause
alarms remain in the correlation buffers.
Example:
RP/0/RP0/CPU0:router(config-corr-rule-st)#
nonrootcause
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 15
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring Hierarchical Correlation Rule Flags
RP/0/RP0/CPU0:router(config-corr-rule-st-nonrc)#
alarm CAT_BI_2 GROUP_BI_2 CODE_BI_2 nonrootcause alarm msg-category group-name
msg-code
Step 7 show logging correlator rule { all | (Optional) Displays the correlator rules that are defined.
correlation-rule1...correlation-rule14 } [ context
context1...context 6 ] [ location node-id1...node-id6 ] [
rulesource { internal | user }] [ ruletype { nonstateful
| stateful }] [ summary | detail ]
Example:
RP/0/RP0/CPU0:router# show logging correlator
rule all
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
16 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring Hierarchical Correlation Rule Flags
There are cases in which you want to control the stateful behavior associated with these hierarchies and to
implement flags, such as reparenting and reissuing of nonbistate alarms. This task explains how to implement
these flags.
See the Reparent Flag, on page 9 and Reissue Nonbistate Flag, on page 10 sections for detailed information
about these flags.
SUMMARY STEPS
1. configure
2. logging correlator rule correlation-rule { type { stateful | nonstateful }}
3. reissue-nonbistate
4. reparent
5. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging correlator rule correlation-rule { type { Configures a logging correlation rule.
stateful | nonstateful }}
• Stateful correlations can change specifically if the root-cause
alarm is bistate.
Example:
• Nonstateful correlations cannot change. All non-root-cause
RP/0/RP0/CPU0:router(config)# logging
correlator rule rule_stateful type alarms remain in the correlation buffers.
nonstateful
Step 3 reissue-nonbistate Issues nonbistate alarm messages (events) from the correlator log
after its root-cause alarm clears.
Example:
RP/0/RP0/CPU0:router(config-corr-rule-st)#
reissue-nonbistate
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 17
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring Logging Suppression Rules
Step 6 show logging correlator rule { all | (Optional) Displays the correlator rules that are defined.
correlation-rule1...correlation-rule14 } [ context
context1...context 6 ] [ location node-id1...node-id6
] [ rulesource { internal | user }] [ ruletype {
nonstateful | stateful }] [ summary | detail ]
Example:
RP/0/RP0/CPU0:router# show logging correlator
rule all
What to Do Next
To activate a defined correlation rule and rule set, you must apply them by using the logging correlator apply
rule and logging correlator apply ruleset commands.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
18 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring Logging Suppression Rules
SUMMARY STEPS
1. configure
2. logging suppress rule rule-name [ alarm msg-category group-name msg-code | all-alarms ]
3. Do one of the following:
• all-alarms
• alarm msg-category group-name msg-code
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging suppress rule rule-name [ alarm Configures a logging suppression rule and enters logging suppression
msg-category group-name msg-code | all-alarms rule configuration mode.
]
Example:
RP/0/RP0/CPU0:router(config)# logging
suppress rule infobistate
Step 3 Do one of the following: • Specifies all types of alarms (if not done in previous step.
• all-alarms • Configures specific alarm criteria (if not done in previous step or
in addition to criteria specified in previous step).
• alarm msg-category group-name msg-code
Example:
RP/0/RP0/CPU0:router(config-suppr-rule)#
alarm MBGL COMMIT SUCCEEDED
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 19
Implementing and Monitoring Alarms and Alarm Log Correlation
Applying Logging Correlation Rules
Note When a rule is applied or if a rule set that contains this rule is applied, then the rule definition cannot be
modified through the configuration until the rule or rule set is once again unapplied.
Note It is possible to configure apply settings at the same time for both a rule and rule sets that contain the rule.
In this case, the apply settings for the rule are the union of all these apply configurations.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
20 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Applying Logging Correlation Rules
SUMMARY STEPS
1. configure
2. logging correlator apply rule correlation-rule
3. Do one of the following:
• all-of-router
• location node-id
• context name
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging correlator apply rule correlation-rule Applies and activates a correlation rule and enters correlation
apply rule configuration mode.
Example:
RP/0/RP0/CPU0:router(config)# logging
correlator apply-rule rule1
Step 3 Do one of the following: • Applies a logging correlation rule to all nodes on the router.
• all-of-router • Applies a logging correlation rule to a specific node on the
router.
• location node-id
◦The location of the node is specified in the format
• context name rack/slot/module.
RP/0/RP0/CPU0:router(config-corr-apply-rule)#
location 0/2/CPU0
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 21
Implementing and Monitoring Alarms and Alarm Log Correlation
Applying Logging Correlation Rule Sets
RP/0/RP0/CPU0:router(config-corr-apply-rule)#
logging correlator apply-rule rule2 context
POS_0_0_0_0
Step 5 show logging correlator rule { all | (Optional) Displays the correlator rules that are defined.
correlation-rule1...correlation-rule14 } [ context
context1...context 6 ] [ location node-id1...node-id6 ] [
rulesource { internal | user }] [ ruletype { nonstateful
| stateful }] [ summary | detail ]
Example:
RP/0/RP0/CPU0:router# show logging correlator
rule all
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
22 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Applying Logging Correlation Rule Sets
Note Rule definitions that were previously applied (singly or as part of another rule set) cannot be modified
until that rule or rule set is unapplied. Use the no form of the command to negate usage and then try to
reapply rule set.
SUMMARY STEPS
1. configure
2. logging correlator apply ruleset correlation-rule
3. Do one of the following:
• all-of-router
• location node-id
• context name
5. show logging correlator ruleset { all | correlation-ruleset1 ... correlation-ruleset14 } [ detail | summary
]
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging correlator apply ruleset correlation-rule Applies and activates a rule set and enters correlation apply rule set
configuration mode.
Example:
RP/0/RP0/CPU0:router(config)# logging
correlator apply ruleset ruleset2
Step 3 Do one of the following: • Applies a logging correlation rule set to all nodes on the router.
• all-of-router • Applies a logging correlation rule set to a specific node on the
router.
• location node-id
◦The location of the node is specified in the format
• context name rack/slot/module .
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 23
Implementing and Monitoring Alarms and Alarm Log Correlation
Applying Logging Correlation Rule Sets
RP/0/RP0/CPU0:router(config-corr-ruleset)#
location 0/2/CPU0
or
RP/0/RP0/CPU0:router(config-corr-ruleset)#
context POS_0_0_0_0
Step 5 show logging correlator ruleset { all | (Optional) Displays the correlator rules that are defined.
correlation-ruleset1 ... correlation-ruleset14 } [
detail | summary ]
Example:
RP/0/RP0/CPU0:router# show logging
correlator ruleset all
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
24 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Applying Logging Suppression Rules
SUMMARY STEPS
1. configure
2. logging suppress apply rule rule-name [ all-of-router | source location node-id ]
3. Do one of the following:
• all-of-router
• source location node-id
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging suppress apply rule rule-name [ all-of-router Applies and activates a logging suppression rule and enters logging
| source location node-id ] suppression apply rule configuration mode.
Example:
RP/0/RP0/CPU0:router(config)# logging suppress
apply rule infobistate
Step 3 Do one of the following: • Applies a logging suppression rule to all nodes on the router
(if not done in the previous step.)
• all-of-router
• Applies a logging suppression rule to a specific node on the
• source location node-id router.
◦The location of the node is specified in the format
Example: rack/slot/module .
RP/0/RP0/CPU0:router(config-suppr-apply-rule)#
all-of-router
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 25
Implementing and Monitoring Alarms and Alarm Log Correlation
Modifying Logging Events Buffer Settings
RP/0/RP0/CPU0:router(config-suppr-apply-rule)#
source location 0/RP0/CPU0
Caution Modifications to alarm settings that lower the severity level for reporting alarms and threshold for generating
capacity-warning alarms may slow system performance.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
26 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Modifying Logging Events Buffer Settings
Caution Modifying the logging events buffer size clears the buffer of all event records except for the bistate alarms
in the set state.
SUMMARY STEPS
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 3 logging events buffer-size bytes Specifies the size of the alarm record buffer.
• In this example, the buffer size is set to 50000 bytes.
Example:
RP/0/RP0/CPU0:router(config)#
logging events buffer-size 50000
Step 4 logging events threshold percent Specifies the percentage of the logging events buffer that must be filled before
the alarm logger generates a threshold-crossing alarm.
Example: • In this example, the alarm logger generates athreshold-crossing alarm
RP/0/RP0/CPU0:router(config)# notification when the event buffer reaches 85 percent of capacity.
logging events threshold 85
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 27
Implementing and Monitoring Alarms and Alarm Log Correlation
Modifying Logging Correlator Buffer Settings
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
Step 7 show logging events info (Optional) Displays the size of the logging events buffer (in bytes), percentage
of the buffer that is occupied by alarm-event records, capacity threshold for
Example: reporting alarms, total number of records in the buffer, and severity filter, if
any.
RP/0/RP0/CPU0:router# show logging
events info • This command is used to verify that all settings have been modified and
that the changes have been accepted by the system.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
28 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Modifying Logging Correlator Buffer Settings
SUMMARY STEPS
1. configure
2. logging correlator buffer-size bytes
3. exit
4. show logging correlator info
5. clear logging correlator delete correlation-id
6. clear logging correlator delete all-in-buffer
7. show logging correlator buffer { all-in-buffer [ ruletype [ nonstateful | stateful ]] | [ rulesource [
internal | user ]] | rule-name correlation-rule1...correlation-rule14 | correlationID
correlation-id1..correlation-id14 }
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging correlator buffer-size bytes Specifies the size of the logging correlator buffer.
• In this example, the size of the logging correlator buffer
Example: is set to 100,000 bytes.
RP/0/RP0/CPU0:router(config)# logging correlator
buffer-size 100000
Step 3 exit Exits global configuration mode and returns the router to
EXEC mode.
Example:
RP/0/RP0/CPU0:router(config)# exit
Step 4 show logging correlator info (Optional) Displays information about the size of the logging
correlator buffer and percentage of the buffer occupied by
Example: correlated messages
Step 5 clear logging correlator delete correlation-id (Optional) Removes a particular correlated event record or
records from the logging correlator buffer.
Example: • A range of correlation IDs can also be specified for
RP/0/RP0/CPU0:router# clear logging correlator removal (up to 32 correlation IDs, separated by a
delete 48 49 50 space).
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 29
Implementing and Monitoring Alarms and Alarm Log Correlation
Enabling Alarm Source Location Display Field for Bistate Alarms
Step 7 show logging correlator buffer { all-in-buffer [ ruletype (Optional) Displays the contents of the correlated event
[ nonstateful | stateful ]] | [ rulesource [ internal | user record.
]] | rule-name correlation-rule1...correlation-rule14 |
correlationID correlation-id1..correlation-id14 } • Use this step to verify that records for particular
correlation IDs have been removed from the correlated
event log.
Example:
RP/0/RP0/CPU0:router# show logging correlator
buffer all-in-buffer
SUMMARY STEPS
1. configure
2. logging events display-location
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging events display-location Enables the alarm source location display field for bistate alarms in the output
of the show logging and show logging events buffer commands.
Example:
RP/0/RP0/CPU0:router(config)#
logging events display location
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
30 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Displaying Alarms by Severity and Severity Range
SUMMARY STEPS
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 31
Implementing and Monitoring Alarms and Alarm Log Correlation
Displaying Alarms According to a Time Stamp Range
DETAILED STEPS
Step 4 show logging events buffer severity-hi-limit (Optional) Displays logging events occurring after the specified time
severity severity-lo-limit severity stamp and within a severity range. The month, day, and year arguments
timestamp-lo-limit hh : mm : ss [ month ] [ day default to the current month, date, and year, if not specified.
] [ year ]
• In this example, alarms with a severity of warnings (severity of 4),
errors (severity of 3), and critical (severity of 2) that occur after
Example: 22:00:00 on May 7, 2004 are displayed. All other messages
RP/0/RP0/CPU0:router# show logging events occurring before the time stamp are omitted.
buffer severity-lo-limit warnings
severity-hi-limit critical
timestamp-lo-limit 22:00:00 may 07 04
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
32 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Displaying Alarms According to Message Group and Message Code
This task explains how to display alarms according to a time stamp range.
SUMMARY STEPS
DETAILED STEPS
Step 2 show logging events buffer timestamp-hi-limit hh : (Optional) Displays logging events with a time stamp before the
mm : ss [ month ] [ day ] [ year ] specified time and date.
• The month, day, and year arguments default to the current
Example: month, date, and year if not specified.
RP/0/RP0/CPU0:router# show logging events
buffer timestamp-hi-limit 21:28:03 april 18 04 • The sample output displays events logged before 21:28:03
on April 18, 2004.
Step 3 show logging events buffer timestamp-hi-limit hh : (Optional) Displays logging events with a time stamp after and
mm : ss [ month ] [ day ] [ year ] timestamp-lo-limit before the specified time and date.
hh : mm : ss [ month ] [ day ] [ year ]
• The month, day, and year arguments default to the current
month, day, and year if not specified.
Example:
• The sample output displays events logged after 21:16:00 on
RP/0/RP0/CPU0:router# show logging events
buffer timestamp-hi-limit 21:28:00 april 18 04 April 18, 2003 and before 21:28:00 on April 18, 2004.
timestamp-lo-limit 21:16:00 april 18 03
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 33
Implementing and Monitoring Alarms and Alarm Log Correlation
Displaying Alarms According to a First and Last Range
Displaying alarms by message group and message code can be useful in isolating related events.
SUMMARY STEPS
DETAILED STEPS
Step 2 show logging events buffer message message-code (Optional) Displays logging events matching the specified
message code.
Example: • In this example, all events that contain the message code
RP/0/RP0/CPU0:router# show logging events ALARM are displayed.
buffer message ALARM
Step 3 show logging events buffer group message-group (Optional) Displays logging events matching the specified
message message-code message group and message code.
• In this example, all events that contain the message group
Example: SONET and message code ALARM are displayed.
RP/0/RP0/CPU0:router# show logging events
buffer group SONET message ALARM
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
34 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Displaying Alarms by Location
SUMMARY STEPS
DETAILED STEPS
Step 2 show logging events buffer last event-count (Optional) Displays logging events beginning with the last event in the
logging events buffer.
Example: • For the event-count argument, enter the number of events to be
RP/0/RP0/CPU0:router# show logging events displayed.
buffer last 20
• In this example, the last 20 events in the logging events buffer are
displayed.
Step 3 show logging events buffer first event-count (Optional) Displays the first and last events in the logging events buffer.
last event-count
• For the event-count argument, enter the number of events to be
displayed.
Example:
• In this example, both the first 20 and last 20 events in the logging
RP/0/RP0/CPU0:router# show logging events
buffer first 20 last 20 events buffer are displayed.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 35
Implementing and Monitoring Alarms and Alarm Log Correlation
Displaying Alarms by Event Record ID
SUMMARY STEPS
DETAILED STEPS
Step 2 show logging events buffer location node-id (Optional) Isolates the occurrence of the range of event IDs to
event-hi-limit event-id event-lo-limit event-id a particular node and narrows the range by specifying a high
and low limit of event IDs to be displayed.
Example: • The location of the node is specified in the format
RP/0/RP0/CPU0:router# show logging events buffer rack/slot/module.
location 0/2/CPU0 event-hi-limit 100
event-lo-limit 1
SUMMARY STEPS
DETAILED STEPS
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
36 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Displaying the Logging Correlation Buffer Size, Messages, and Rules
Example:
RP/0/RP0/CPU0:router# show logging events buffer
event-hi-limit 100 event-lo-limit 1
SUMMARY STEPS
DETAILED STEPS
Step 2 show logging correlator buffer all-in-buffer (Optional) Displays all messages in the logging
correlation buffer.
Example:
RP/0/RP0/CPU0:router# show logging correlator buffer
all-in-buffer
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 37
Implementing and Monitoring Alarms and Alarm Log Correlation
Clearing Alarm Event Records and Resetting Bistate Alarms
Step 4 show logging correlator buffer rule-name correlation-rule (Optional) Displays specific messages matching a
particular rule in the correlation buffer.
Example:
RP/0/RP0/CPU0:router# show logging correlator buffer
rule-name rule7
Step 5 show logging correlator rule all (Optional) Displays all defined correlation rules.
Example:
RP/0/RP0/CPU0:router# show logging correlator rule
all
Step 6 show logging correlator rule correlation-rule (Optional) Displays the specified correlation rule.
Example:
RP/0/RP0/CPU0:router# show logging correlator rule
rule7
Step 7 show logging correlator ruleset all (Optional) Displays all defined correlation rule sets.
Example:
RP/0/RP0/CPU0:router# show logging correlator ruleset
all
Step 8 show logging correlator ruleset ruleset-name (Optional) Displays the specified correlation rule set.
Example:
RP/0/RP0/CPU0:router# show logging correlator ruleset
ruleset_static
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
38 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Clearing Alarm Event Records and Resetting Bistate Alarms
SUMMARY STEPS
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# show logging events
buffer all-in-buffer
Step 2 clear logging events delete timestamp-lo-limit hh : (Optional) Deletes logging events occurring before the specified
mm : ss [ month ] [ day ] [ year ] time and date from the logging events buffer.
• The month, day, and year arguments default to the current
Example: month, day, and year if not specified.
RP/0/RP0/CPU0:router# clear logging events
delete timestamp-lo-limit 20:00:00 april 01 • In this example, all events occurring before April 1, 2004
2004 are removed.
Step 3 clear logging events delete event-hi-limit severity (Optional) Deletes logging events within a range of severity
event-lo-limit severity levels for logging alarm messages.
• In this example, all events with a severity level of
Example: warnings, notifications, and informational are deleted.
RP/0/RP0/CPU0:router# clear logging events
delete event-hi-limit warnings event-lo-limit
informational
Step 4 clear logging events delete location node-id (Optional) Deletes logging events from the logging events that
have occurred on a particular node.
Example: • The location of the node is specified in the format
RP/0/RP0/CPU0:router# clear logging events rack/slot/module.
delete location 0/2/CPU0
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 39
Implementing and Monitoring Alarms and Alarm Log Correlation
Defining SNMP Correlation Buffer Size
Step 6 clear logging events delete last event-count (Optional) Deletes logging events beginning with the last event
in the logging events buffer.
Example: • In this example, the last 20 events in the logging events
RP/0/RP0/CPU0:router# clear logging events buffer are cleared.
delete last 20
Step 7 clear logging events delete message message-code (Optional) Deletes logging events that contain the specified
message code.
Example: • In this example, all events that contain the message code
RP/0/RP0/CPU0:router# clear logging events SYS are deleted from the logging events buffer.
delete message sys
Step 8 clear logging events delete group message-group (Optional) Deletes logging events that contain the specified
message group.
Example: • In this example, all events that contain the message group
RP/0/RP0/CPU0:router# clear logging events CONFIG_I are deleted from the logging events buffer.
delete group config_i
Step 9 clear logging events reset all-in-buffer (Optional) Clears all bistate alarms in the SET state from the
logging events buffer.
Example:
RP/0/RP0/CPU0:router# clear logging events
reset all-in-buffer
Step 10 show logging events buffer all-in-buffer (Optional) Displays all messages in the logging events buffer.
Example:
RP/0/RP0/CPU0:router# show logging events
buffer all-in-buffer
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
40 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Defining SNMP Correlation Buffer Size
SUMMARY STEPS
1. configure
2. snmp-server correlator buffer-size bytes
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 snmp-server correlator buffer-size bytes Defines the buffer size that can store SNMP correlation traps. The default size
is 64KB. You can clear the correlation buffers manually or the buffer wraps
Example: automatically, wherein the oldest correlations are purged to accommodate the
newer correlations.
RP/0/RP0/CPU0:router(config)#
snmp-server correlator buffer-size
600
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 41
Implementing and Monitoring Alarms and Alarm Log Correlation
Defining SNMP Rulesets
SUMMARY STEPS
1. configure
2. snmp-server correlator ruleset name rulename name
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 snmp-server correlator ruleset name Specifies a ruleset that allows you to group two or more rules into a group
rulename name and apply that group to a set of hosts.
Example:
RP/0/RP0/CPU0:router(config)#
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
42 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring SNMP Correlation Rules
SUMMARY STEPS
1. configure
2. snmp-server correlator rule rule_name { nonrootcause trap trap_oid varbind vbind_OID { index |
value } regex line | rootcause trap trap_oid varbind vbind_OID { index | value } regex line | timeout
}
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 snmp-server correlator rule rule_name { Configures a SNMP correlation rule. You can specify the numeric rootcause
nonrootcause trap trap_oid varbind trap OID or non-rootcause trap matching definitions.
vbind_OID { index | value } regex line |
rootcause trap trap_oid varbind vbind_OID • Specifies a numeric non-rootcause trap OID and, optionally, one or
more numeric varbinds specific to the non-rootcause trap that must ALL
{ index | value } regex line | timeout }
also be matched to have found a valid non-rootcause for this rule. The
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 43
Implementing and Monitoring Alarms and Alarm Log Correlation
Applying SNMP Correlation Rules
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
44 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Applying SNMP Correlation Rules
SUMMARY STEPS
1. configure
2. snmp-server correlator apply rule rule-name [ all-hosts | host ipv4 address address [ port ]
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 snmp-server correlator apply rule rule-name Applies the SNMP trap correlation rules to specific trap destinations. You
[ all-hosts | host ipv4 address address [ port ] have an option of applying the rule to traps destined for all trap hosts, or
to a specific subset by specifying individual IP addresses and optional
Example: ports.
RP/0/RP0/CPU0:router#
snmp-server correlator apply rule
ifupdown
host ipv4 address 1.2.3.4
host ipv4 address 2.3.4.5 port 182
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 45
Implementing and Monitoring Alarms and Alarm Log Correlation
Applying SNMP Correlation Ruleset
SUMMARY STEPS
1. configure
2. snmp-server correlator apply ruleset ruleset-name [ all-hosts | host ipv4 address address [ port ]
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 snmp-server correlator apply ruleset Applies the SNMP trap correlation ruleset to specific trap destinations. You
ruleset-name [ all-hosts | host ipv4 address have an option of applying the set of two or more SNMP trap correlation
address [ port ] rules to traps destined for all trap hosts, or to a specific subset by specifying
individual IP addresses and optional ports.
Example:
RP/0/RP0/CPU0:router#
snmp-server correlator apply ruleset
ruleset_1
host ipv4 address 1.2.3.4
host ipv4 address 2.3.4.5 port 182
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
46 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuration Examples for Alarm Management and Logging Correlation
Increasing the Severity Level for Alarm Filtering to Display Fewer Events and
Modifying the Alarm Buffer Size and Capacity Threshold: Example
The following configuration example shows how to set the capacity threshold to 90 percent, to reduce the
size of the logging events buffer to 10,000 bytes from the default, and to increase the severity level to errors:
!
logging events threshold 90
logging events buffer-size 10000
logging events level errors
!
Increasing the severity level to errors reduces the number of alarms that are displayed in the logging events
buffer, because only alarms with a severity of errors or higher are displayed. Increasing the threshold capacity
to 90 percent reduces the time interval between the threshold crossing and wraparound events; the logging
events buffer thus does not generate a threshold-crossing alarm until it reaches 90 percent capacity. Reducing
the size of the logging events buffer to 10,000 bytes decreases the number of alarms that are displayed in the
logging events buffer and reduces the memory requirements for the component.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 47
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring a Nonstateful Correlation Rule to Permanently Suppress Node Status Messages: Example
timeout 4000
nonrootcause
all-of-router
In this example, three similar messages are identified as forwarded to the syslog process simultaneously after
a card boots:
PLATFORM-INVMGR-6-NODE_STATE_CHANGE : Node: 0/1/CPU0, state: IOS XR RUN
PLATFORM-SYSLDR-5-LC_ENABLED : LC in slot 1 is now running IOX
PLATFORM-ALPHA_DISPLAY-6-CHANGE : Alpha display on node 0/1/CPU0 changed to IOX RUN in
state default
These messages are similar. To see only one message appear in the logs, one of the messages is designated
as the root cause message (the one that appears in the logs), and the other messages are considered
non-root-cause messages.
The root-cause message is typically the one that arrives earliest, but that is not a requirement.
timeout 4000
nonrootcause
In this example, the correlation rule named node_status is configured to correlate the PLATFORM INVMGR
NODE_STATE_CHANGE alarm (the root-cause message) with the PLATFORM SYSLDR LC_ENABLED
and PLATFORM ALPHA_DISPLAY CHANGE alarms. The updown correlation rule is applied to the entire
router.
all-of-router
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
48 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring a Stateful Correlation Rule for LINK UPDOWN and SONET ALARM Alarms: Example
The show logging correlator buffer correlation ID command generates the following output after the one
minute interval expires. The output displays the alarms assigned correlation ID 12 in the logging correlator
buffer.
Because this rule was defined as nonstateful, these messages are held in the buffer indefinitely.
Configuring a Stateful Correlation Rule for LINK UPDOWN and SONET ALARM
Alarms: Example
The following example shows how to configure a correlation rule for the LINK UPDOWN and SONET
ALARM messages:
!
logging correlator rule updown type stateful
timeout 10000
nonrootcause
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 49
Implementing and Monitoring Alarms and Alarm Log Correlation
Configuring a Stateful Correlation Rule for LINK UPDOWN and SONET ALARM Alarms: Example
all-of-router
In this example, suppose that two routers are connected using Packet-over-SONET (POS) interface 0/7/0/0.
When the correlator receives a root-cause message, the correlator sends it directly to the syslog process.
Subsequent PKT_INFRA-LINK- UPDOWN or L2-SONET-ALARM messages matching the rule are considered
leaf messages and are stored in the logging correlator buffer. If, for any reason, a leaf message (such as the
L2-SONET-ALARM alarm in this example) is received first, the correlator does not send it to the logging
events buffer immediately; the correlator, instead, waits until the timeout interval expires. After the timeout,
if the root message is never received, all messages in the logging correlator buffer received during the timeout
interval are forwarded to the syslog process.
In this example, the correlation rule named updown is configured to correlate the
PKT_INFRA-LINK-UPDOWN alarm (the root message) and L2-SONET-ALARM alarms (leaf messages
associated with PKT_INFRA-LINK-UPDOWN alarms).
timeout 10000
nonrootcause
In this example, the updown correlation rule is applied to the entire router:
all-of-router
Suppose that a physical layer interface module (PLIM) card is removed from slot 7 on the adjacent remote
router, the PLIM slot in the remote router chassis in which the port for POS interface 0/7/0/0 resides. This
action brings down the link for POS interface 0/7/0/0. When the link goes down, PKT_INFRA-LINK-UPDOWN
and L2- SONET-ALARM messages are generated, which indicates that the POS interface link is down. The
first PKT_INFRA-LINK-UPDOWN message is forwarded to the syslog process. Subsequent PKT_INFRA-
LINK-UPDOWN and L2-SONET-ALARM messages, which are set as leaf alarms, remain in the logging
correlator buffer and are not forwarded to the syslog process.
The following example shows sample output from the show logging events buffer all-in-buffer command.
The output displays the alarms stored in the logging events buffer after the one minute time period expires
for the updown correlation rule configured:
Note Only the first LINK UPDOWN root message is forwarded to the syslog process during the timeout interval.
The following example shows output from the show logging correlator buffer correlationID command
generated after the one-minute interval expires. The output displays the alarms assigned correlation ID 46 in
the logging correlator buffer. In the example, the PKT_INFRA-LINK-UPDOWN root-cause message and
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
50 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Enabling Alarm Source Location Display Field for Bistate Alarms: Example
L2-SONET-ALARM leaf messages generated during the timeout interval assigned correlation ID 46 are
displayed:
SONET0_7_0_0: SLOS
Note The subsequent PKT_INFRA-LINK-UPDOWN and L2-SONET-ALARM leaf messages generated during
the timeout interval remain in the logging correlator buffer because they are leaf messages.
Suppose then that the PLIM card is reinserted into slot 7 on the adjacent remote router. This action brings the
link for POS interface 0/7/0/0 back up. When the POS interface comes back up, the
PKT_INFRA-LINK-UPDOWN root alarm is cleared. Because this is a stateful rule, it triggers forwarding of
the stored non-root-cause alarms for this correlation (that is, the L2-SONET-ALARM). If the SONET protocol
also comes back up, as a result, then the L2-SONET-ALARM also clears.
The following example shows output from the show logging correlator buffer correlationID command.
The output displays the alarms assigned to correlation IDs 46 and 47, the correlation IDs associated with the
PKT_INFRA-LINK-UPDOWN and L2-SONET-ALARM root-cause messages:
Enabling Alarm Source Location Display Field for Bistate Alarms: Example
The following example shows show logging output for bistate alarms before and after enabling the alarm
source location display field:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 51
Implementing and Monitoring Alarms and Alarm Log Correlation
Additional References
Additional References
The following sections provide references related to implementing and monitoring alarm logs and logging
correlation on the Cisco IOS XR Software.
Related Documents
Onboard Failure Logging (OBFL) configuration tasks Implementing Logging Services module in the
Cisco IOS XR System Monitoring Command
Reference for the Cisco CRS Router
Onboard Failure Logging (OBFL) commands Onboard Failure Logging Commands module in the
Cisco IOS XR System Monitoring Command
Reference for the Cisco CRS Router
Cisco IOS XR software XML API material Cisco IOS XR XML API Guide for the Cisco CRS
Router
Cisco IOS XR software getting started material Cisco IOS XR Getting Started Guide for the
Cisco CRS Router
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
52 OL-24731-01
Implementing and Monitoring Alarms and Alarm Log Correlation
Additional References
Standards
Standards Title
No new or modified standards are supported by this —
feature, and support for existing standards has not
been modified by this feature.
MIBs
RFCs
RFCs Title
No new or modified RFCs are supported by this —
feature, and support for existing RFCs has not been
modified by this feature.
Technical Assistance
Description Link
The Cisco Technical Support website contains http://www.cisco.com/cisco/web/support/index.html
thousands of pages of searchable technical content,
including links to products, technologies, solutions,
technical tips, and tools. Registered Cisco.com users
can log in from this page to access even more content.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 53
Implementing and Monitoring Alarms and Alarm Log Correlation
Additional References
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
54 OL-24731-01
CHAPTER 2
Configuring and Managing Embedded Event
Manager Policies
The Cisco IOS XR software Embedded Event Manager (EEM) functions as the central clearing house for
the events detected by any portion of the Cisco IOS XR software processor failover services. The EEM is
responsible for detection of fault events, fault recovery, and process reliability statistics in a Cisco IOS XR
software system. The EEM events are notifications that something significant has occurred within the system,
such as:
• Operating or performance statistics outside the allowable values (for example, free memory dropping
below a critical threshold).
• Online insertion or removal (OIR) of a modular services card (MSC).
• Termination of a process.
The EEM relies on software agents or event detectors to notify it when certain system events occur. When
the EEM has detected an event, it can initiate corrective actions. Actions are prescribed in routines called
policies. Policies must be registered before an action can be applied to collected events. No action occurs
unless a policy is registered. A registered policy informs the EEM about a particular event that is to be
detected and the corrective action to be taken if that event is detected. When such an event is detected, the
EEM enables the corresponding policy. You can disable a registered policy at any time.
The EEM monitors the reliability rates achieved by each process in the system, allowing the system to detect
the components that compromise the overall reliability or availability.
This module describes the new and revised tasks you need to configure and manage EEM policies on your
the Cisco IOS XR Software network and write and customize the EEM policies using Tool Command
Language (Tcl) scripts to handle Cisco IOS XR software faults and events.
Note For complete descriptions of the event management commands listed in this module, see the Related
Documents, on page 113 section of this module.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 55
Configuring and Managing Embedded Event Manager Policies
Prerequisites for Configuring and Managing Embedded Event Manager Policies
Feature History for Configuring and Managing Embedded Event Manager Policies
Release Modification
Release 2.0 This feature was introduced.
Release 3.3.0 Support was added for AAA authentication when executing a
script.
Release 3.6.0 Fault management was replaced with the Embedded Event
Manager (EEM) feature.
A section on writing and customizing EEM policies using Tcl
scripts was added.
The None event detector was supported.
• Prerequisites for Configuring and Managing Embedded Event Manager Policies, page 56
• Information About Configuring and Managing Embedded Event Manager Policies, page 56
• How to Configure and Manage Embedded Event Manager Policies, page 69
• Configuration Examples for Event Management Policies , page 101
• Configuration Examples for Writing Embedded Event Manager Policies Using Tcl , page 102
• Additional References, page 112
• Embedded Event Manager Policy Tcl Command Extension Reference, page 114
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
56 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Event Management
Event Management
Embedded Event Management (EEM) in the Cisco IOS XR software system essentially involves system event
management. An event can be any significant occurrence (not limited to errors) that has happened within the
system. The Cisco IOS XR software EEM detects those events and implements appropriate responses. The
EEM can also be used to prevent or contain faults and to assist in fault recovery.
The EEM enables a system administrator to specify appropriate action based on the current state of the system.
For example, a system administrator can use EEM to request notification by e-mail when a hardware device
needs replacement.
The EEM also maintains reliability metrics for each process in the system.
Reliability Metrics
The EEM monitors the reliability rates achieved by each process in the system. These metrics can be used
during testing to determine which components do not meet their reliability or availability goals so that corrective
action can be taken.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 57
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Management Policies
Note A difference exists between scripts with policy actions and scripts that subscribe to
receive events. Scripts with policy actions are expected to implement a policy. They are
bound by a rule to prevent recursion. Scripts that subscribe to notifications are not bound
by such a rule.
The following example shows the usage for the CLI in scripts:
if {$_cerrno != 0} {
set result [format "component=%s; subsys err=%s; posix err=%s;\n%s" \
$_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
error $result
}
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
58 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Scripts and the Scripting Interface (Tcl)
Script Language
The scripting language is Tool Command Language (Tcl) as implemented within the Cisco IOS XR software.
All Embedded Event Manager scripts are written in Tcl. This full Tcl implementation has been extended by
Cisco, and an eem command has been added to provide the interface between Tcl scripts and the EEM.
Tcl is a string-based command language that is interpreted at run time. The version of Tcl supported is Tcl
version 8.3.4, plus added script support. Scripts are defined using an ASCII editor on another device, not on
the networking device. The script is then copied to the networking device and registered with EEM. Tcl scripts
are supported by EEM. As an enforced rule, Embedded Event Manager policies are short-lived, run-time
routines that must be interpreted and executed in less than 20 seconds of elapsed time. If more than 20 seconds
of elapsed time are required, the maxrun parameter may be specified in the event_register statement to specify
any desired value.
EEM policies use the full range of the Tcl language's capabilities. However, Cisco provides enhancements to
the Tcl language in the form of Tcl command extensions that facilitate the writing of EEM policies. The main
categories of Tcl command extensions identify the detected event, the subsequent action, utility information,
counter values, and system information.
EEM allows you to write and implement your own policies using Tcl. Writing an EEM script involves:
• Selecting the event Tcl command extension that establishes the criteria used to determine when the
policy is run.
• Defining the event detector options associated with detecting the event.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 59
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Scripts and the Scripting Interface (Tcl)
To find out more about the Tcl language and its history, refer to the following URL:
http://www.scriptics.com/scripting/tclHistory.html
Note An EEM script cannot register to handle an event other than the event that caused it to be scheduled.
Note EEM callback scripts are free to use any of the EEM script services listed in Table 3: Embedded Event
Manager Tcl Command Extension Categories, on page 61, except for the eem event register keyword,
which is not allowed in an EEM callback script.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
60 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Scripts and the Scripting Interface (Tcl)
Note The Tcl command extensions available in each of these categories for use in all EEM policies are described
in later sections in this document.
Category Definition
EEM event Tcl command extensions(three types: These Tcl command extensions are represented by
event information, event registration, and event the event_register_xxx family of event-specific
publish) commands. There is a separate event information Tcl
command extension in this category as well:
event_reqinfo. This is the command used in policies
to query the EEM for information about an event.
There is also an EEM event publish Tcl command
extension event_publish that publishes an
application-specific event.
EEM action Tcl command extensions These Tcl command extensions (for example,
action_syslog) are used by policies to respond to or
recover from an event or fault. In addition to these
extensions, developers can use the Tcl language to
implement any action desired.
EEM utility Tcl command extensions These Tcl command extensions are used to retrieve,
save, set, or modify application information, counters,
or timers.
EEM system information Tcl command extensions These Tcl command extensions are represented by
the sys_reqinfo_xxx family of system-specific
information commands. These commands are used
by a policy to gather system information.
EEM context Tcl command extensions These Tcl command extensions are used to store and
retrieve a Tcl context (the visible variables and their
values).
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 61
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Built-in Actions
• A filename body part containing a two-character abbreviation (see Table 4: Two-Character Abbreviation
Specification, on page 62) for the first event specified; an underscore part; and a descriptive field part
that further identifies the policy.
• A filename suffix part defined as .tcl.
EEM e-mail template files consist of a filename prefix of email_template, followed by an abbreviation that
identifies the usage of the e-mail template.
EEM library filenames consist of a filename body part containing the descriptive field that identifies the usage
of the library, followed by _lib, and a filename suffix part defined as .tcl.
ct event_register_counter
st event_register_stat
no event_register_none
oi event_register_oir
pr event_register_process
rf event_register_rf
sl event_register_syslog
tm event_register_timer
ts event_register_timer_subscriber
wd event_register_wdsysmon
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
62 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Application-specific Embedded Event Management
Manually run an EEM policy Runs an EEM policy within a policy while the event
manager run command is running a policy in EXEC
mode.
Reload the Cisco IOS software Causes a router to be reloaded by using the EEM
action_reload command.
Send a short e-mail Sends the e-mail out using Simple Mail Transfer
Protocol (SMTP).
EEM handlers require the ability to run CLI commands. A command is available to the Tcl shell to allow
execution of CLI commands from within Tcl scripts.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 63
Configuring and Managing Embedded Event Manager Policies
Event Detection and Recovery
System EEM events are built into the EEM and are grouped based on the fault detector that raises them. They
are identified by a symbolic identifier defined within the API.
Some EEM system events are monitored by the EEM whether or not an application has requested monitoring.
These are called built-in EEM events. Other EEM events are monitored only if an application has requested
EEM event monitoring. EEM event monitoring is requested through an EEM application API or the EEM
scripting interface.
Some event detectors can be distributed to other hardware cards within the same secure domain router (SDR)
or within the administration plane to provide support for distributed components running on those cards.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
64 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Event Detection and Recovery
• Asks the System Manager to perform its default action for those events that do not match the screening
criteria.
The System Manager Event Detector interfaces with the System Manager to receive process startup and
termination notifications. The interfacing is made through a private API available to the System Manager. To
minimize overhead, a portion of the API resides within the System Manager process space. When a process
terminates, the System Manager invokes a helper process (if specified in the process.startup file) before calling
the Event Detector API.
Processes can be identified by component ID, System Manager assigned job ID, or load module pathname
plus process instance ID. POSIX wildcard filename pattern support using *, ?, or [...] is provided for load
module pathnames. Process instance ID is an integer assigned to a process to differentiate it from other
processes with the same pathname. The first instance of a process is assigned an instance ID value of 1, the
second 2, and so on.
The System Manager Event Detector handles EEM event monitoring requests for the EEM events shown in
this table.
Abnormal process termination EEM event—built in Occurs when a process matching the screening criteria
terminates abnormally.
Process startup EEM event—built in Occurs when a process matching the screening criteria
starts.
When System Manager Event Detector abnormal process termination events occur, the default action restarts
the process according to the built-in rules of the System Manager.
The relationship between the EEM and System Manager is strictly through the private API provided by the
EEM to the System Manager for the purpose of receiving process start and termination notifications. When
the System Manager calls the API, reliability metric data is collected and screening is performed for an EEM
event match. If a match occurs, a message is sent to the System Manager Event Detector. In the case of
abnormal process terminations, a return is made indicating that the EEM handles process restart. If a match
does not occur, a return is made indicating that the System Manager should apply the default action.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 65
Configuring and Managing Embedded Event Manager Policies
Event Detection and Recovery
Process event manager EEM event—built in Occurs when the event-processed count for a specified
process is either greater than or equal to a specified
maximum or is less than or equal to a specified
minimum.
Watchdog System Monitor (IOSXRWDSysMon) Event Detector for Cisco IOS XR software
The Cisco IOS XR software Watchdog System Monitor Event Detector publishes an event when one of the
following occurs:
• CPU utilization for a Cisco IOS XR software process crosses a threshold.
• Memory utilization for a Cisco IOS XR software process crosses a threshold.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
66 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Event Detection and Recovery
Note Cisco IOS XR software processes are used to distinguish them from Cisco IOS XR software Modularity
processes.
Two events may be monitored at the same time, and the event publishing criteria can be specified to require
one event or both events to cross their specified thresholds.
The Cisco IOS XR software Watchdog System Monitor Event Detector handles the events as shown in this
table.
Total percent CPU EEM event—built in Occurs when the CPU time for a specified processor
complex is either greater than or equal to a specified
maximum percentage of available CPU time or is less
than or equal to a specified minimum percentage of
available CPU time.
Process percent memory EEM event—built in Occurs when the memory used for a specified process
has either increased or decreased by a specified value.
Total percent available Memory EEM event—built Occurs when the available memory for a specified
in processor complex has either increased or decreased
by a specified value.
Total percent used memory EEM event—built in Occurs when the used memory for a specified
processor complex has either increased or decreased
by a specified value.
Watchdog System Monitor (WDSysMon) Event Detector for Cisco IOS XR software Modularity
The Cisco IOS XR software Software Modularity Watchdog System Monitor Event Detector detects infinite
loops, deadlocks, and memory leaks in Cisco IOS XR software Modularity processes.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 67
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Scheduling and Notification
Reliability Statistics
Reliability metric data for the entire processor complex is maintained by the EEM. The data is periodically
written to checkpoint.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
68 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Configure and Manage Embedded Event Manager Policies
hardware card disk ID plus process pathname plus process instance for those processes that have multiple
instances.
Process terminations include the following cases:
• Normal termination—Process exits with an exit value equal to 0.
• Abnormal termination by process—Process exits with an exit value not equal to 0.
• Abnormal termination by QNX—Neutrino operating system aborts the process.
• Abnormal termination by kill process API—API kill process terminates the process.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 69
Configuring and Managing Embedded Event Manager Policies
Configuring Environmental Variables
Environment Variables
By convention, the names of all environment variables defined by Cisco begin with an underscore character
to set them apart; for example, _show_cmd.
Spaces may be used in the var-value argument of the event manager environment command. The command
interprets everything after the var-name argument to the end of the line to be part of the var-value argument.
Use the show event manager environment command to display the name and value of all EEM environment
variables after they have been set using the event manager environment command.
SUMMARY STEPS
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# show event manager
environment
Example:
RP/0/RP0/CPU0:router# configure
Step 3 event manager environment var-name var-value Resets environment variables to new values.
• The var-name argument is the name assigned to the EEM
Example: environment configuration variable.
RP/0/RP0/CPU0:router(config)# event manager
environment _cron_entry 0-59/2 0-23/1 * * 0-7 • The var-value argument is the series of characters, including
embedded spaces, to be placed in the environment variable
var-name.
• By convention, the names of all environment variables defined
by Cisco begin with an underscore character to set them apart;
for example, _show_cmd.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
70 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Registering Embedded Event Manager Policies
Step 6 show event manager environment Displays the reset names and values of all EEM environment
variables; allows you to verify the environment variable names and
Example: values set in Step 3.
What to Do Next
After setting up EEM environment variables, find out what policies are available to be registered and then
register those policies, as described in the Registering Embedded Event Manager Policies, on page 71.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 71
Configuring and Managing Embedded Event Manager Policies
Registering Embedded Event Manager Policies
Note AAA authorization (such as the aaa authorization eventmanager command) must be configured before
EEM policies can be registered. See the Configuring AAA Services module of Configuring AAA Services
on Cisco IOS XR software for more information about AAA authorization configuration.
Persist-time
An optional persist-time keyword for the username can also be defined. The persist-time keyword defines
the number of seconds the username authentication is valid. When a script is first registered, the configured
username for the script is authenticated. After the script is registered, the username is authenticated again each
time a script is run. If the AAA server is down, the username authentication can be read from memory. The
persist-time keyword determines the number of seconds this username authentication is held in memory.
• If the AAA server is down and the persist-time keyword has not expired, then the username is
authenticated from memory and the script runs.
• If the AAA server is down, and the persist-time keyword has expired, then user authentication will fail
and the script will not run.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
72 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Registering Embedded Event Manager Policies
the same name in both the system policy directory and the user policy directory, the policy file in the system
policy directory takes precedence and is registered as a system policy.
Once policies have been registered, their registration can be verified through the show event manager policy
registered command. The output displays registered policy information in two parts. The first line in each
policy description lists the index number assigned to the policy, the policy type (system or user), the type of
event registered, the time when the policy was registered, and the name of the policy file. The remaining lines
of each policy description display information about the registered event and how the event is to be handled,
and come directly from the Tcl command arguments that make up the policy file.
SUMMARY STEPS
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 3 event manager policy policy-name Registers an EEM policy with the EEM.
username username [ persist-time {
seconds | infinite }] | type { system | user • An EEM script is available to be scheduled by the EEM until the no
form of this command is entered.
}
• Enter the required username keyword and argument, where username
Example: is the username that runs the script.
RP/0/RP0/CPU0:router(config)# event • Enter the optional persist-time keyword to determine how long the
manager policy cron.tcl username username authentication is held in memory:
tom type user
◦Enter the number of seconds for the persist-time keyword.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 73
Configuring and Managing Embedded Event Manager Policies
Registering Embedded Event Manager Policies
Step 6 show event manager policy registered Displays all EEM policies that are already registered, allowing verification of
Step 3.
Example:
RP/0/RP0/CPU0:router# show event
manager policy registered
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
74 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
SUMMARY STEPS
DETAILED STEPS
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 75
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Example:
RP/0/RP0/CPU0:router# configure
Step 3 event manager environment var-name [ var-value ] Resets environment variables to new values.
• The var-name argument is the name assigned to the EEM
Example: environment configuration variable.
RP/0/RP0/CPU0:router(config)# event manager
environment _cron_entry 0-59/2 0-23/1 * * 0-7 • The var-value argument is the series of characters, including
embedded spaces, to be placed in the environment variable
var-name .
• By convention, the names of all environment variables defined
by Cisco begin with an underscore character to set them apart;
for example, _show_cmd.
• Spaces may be used in the var-value argument. The command
interprets everything after the var-name argument to the end
of the line to be part of the var-value argument.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
76 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
SUMMARY STEPS
1. show event manager policy registered [ event-type type ] [ system | user ] [ time-ordered | name-ordered
]
DETAILED STEPS
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 77
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
SUMMARY STEPS
1. show event manager policy registered [ event-type type ] [ system | user ] [ time-ordered | name-ordered
]
2. configure
3. no event manager policy policy-name
4. Use one of these commands:
• end
• commit
5. Repeat Step 1, on page 78to ensure that the policy has been removed.
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 3 no event manager policy policy-name Removes the EEM policy from the configuration, causing the policy to
be unregistered.
Example:
RP/0/RP0/CPU0:router(config)# no event
manager policy tm_cli_cmd.tcl
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
78 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
SUMMARY STEPS
1. show event manager policy registered [event-type type] [system | user] [time-ordered | name-ordered
]
2. configure
3. event manager scheduler suspend
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 79
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Example:
RP/0/RP0/CPU0:router# configure
Step 3 event manager scheduler suspend Immediately suspends the execution of all EEM policies.
Example:
RP/0/RP0/CPU0:router(config)# event
manager scheduler suspend
Note This task applies only to EEM policies that are written using Tcl scripts.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
80 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
SUMMARY STEPS
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 3 event manager directory user {library path Specifies a directory to use for storing user library files or user-defined
| policy path} EEM policies.
• Use the path argument to specify the absolute pathname to the user
Example: directory.
RP/0/RP0/CPU0:router(config)# event
manager directory user library
disk0:/usr/lib/tcl
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 81
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
SUMMARY STEPS
1. show event manager metric process {all | job-id | process-name} location {all | node-id}
DETAILED STEPS
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
82 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
sl_sysdb_timeout.tcl This policy is triggered when the script looks for the
sysdb timeout ios_msgs and obtains the output of the
show commands. The output is written to a file named
after the blocking process.
For more details about the sample policies available and how to run them, see the EEM Event Detector Demo:
Example , on page 102.
SUMMARY STEPS
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 83
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# show event manager
policy available
Example:
RP/0/RP0/CPU0:router# configure
Step 3 event manager directory user {library path | policy Specifies a directory to use for storing user library files or
path} user-defined EEM policies.
Example:
RP/0/RP0/CPU0:router(config)# event manager
directory user library
disk0:/user_library
Step 4 event manager policy policy-name username Registers the EEM policy to be run when the specified event
username [persist-time [seconds | infinite] | type defined within the policy occurs.
[system | user]]
Example:
RP/0/RP0/CPU0:router(config)# event manager
policy test.tcl username user_a type
user
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
84 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
The start of every policy must describe and register the event to detect using an event_register Tcl command
extension. This part of the policy schedules the running of the policy. For a list of the available EEM
event_register Tcl command extensions, see the Embedded Event Manager Event Registration Tcl Command
Extensions, on page 114. The following example Tcl code shows how to register the event_register_timer
Tcl command extension:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 85
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
}
if {![info exists _email_from]} {
set result \
"Policy cannot be run: variable _email_from has not been set"
error $result $errorInfo
}
if {![info exists _email_to]} {
set result \
"Policy cannot be run: variable _email_to has not been set"
error $result $errorInfo
)
The namespace import section is optional and defines code libraries. The following example Tcl code shows
how to configure a namespace import section:
The following example Tcl code shows the code to query an event and to log a message as part of the body
section:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
86 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
XYSSSSSSSSSSSSSEEEEEEEEPPPPPPPPP
For example, the following error return value might be returned from an EEM Tcl command extension:
862439AE
10000110001001000011100110101110
This 32-bit integer is divided up into the five variables shown in this table.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 87
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Variable Description
XY The error class (indicates the severity of the error).
This variable corresponds to the first two bits in the
32-bit error return value; 10 in the preceding case,
which indicates CERR_CLASS_WARNING:
See Table 11: Error Class Encodings, on page 88
for the four possible error class encodings specific to
this variable.
01 CERR_CLASS_INFO
10 CERR_CLASS_WARNING
11 CERR_CLASS_FATAL
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
88 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
SUMMARY STEPS
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# show event
manager policy available
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 89
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Step 4 Add the appropriate namespace under Policy developers can use the new namespace ::cisco in Tcl policies to group all
the ::cisco hierarchy. the extensions used by Cisco IOS XR EEM. There are two namespaces under the
::cisco hierarchy. The following are the namespaces and the EEM Tcl command
extension categories that belongs under each namespace:
• ::cisco::eem
◦EEM event registration
◦EEM event information
◦EEM event publish
◦EEM action
◦EEM utility
◦EEM context library
◦EEM system information
◦CLI library
• ::cisco::lib
◦SMTP library
Note Ensure that the appropriate namespaces are imported, or use the
qualified command names when using the preceding commands.
Step 5 Program the must defines section to This is an optional step. Must defines is a section of the policy that tests whether
check for each environment variable any EEM environment variables that are required by the policy are defined before
that is used in this policy. the recovery actions are taken. The must defines section is not required if the
policy does not use any EEM environment variables. EEM environment variables
for EEM scripts are Tcl global variables that are defined external to the policy
before the policy is run. To define an EEM environment variable, use the EEM
configuration command event manager environment . By convention, all Cisco
EEM environment variables begin with "_" (an underscore). To avoid future
conflict, customers are urged not to define new variables that start with "_".
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
90 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Step 6 Program the body of the script. In this section of the script, you can define any of the following:
• The event_reqinfo event information Tcl command extension that is used
to query the EEM for information about the detected event.
• The action Tcl command extensions, such as action_syslog, that are used
to specify actions specific to EEM.
• The system information Tcl command extensions, such as
sys_reqinfo_routername, that are used to obtain general system
information.
• The context_save and context_retrieve Tcl command extensions that are
used to save Tcl variables for use by other policies.
• Use of the SMTP library (to send e-mail notifications) or the CLI library
(to run CLI commands) from a policy.
Step 7 Check the entry status to determine if If the prior policy is successful, the current policy may or may not require
a policy has previously run for this execution. Entry status designations may use one of three possible values: 0
event. (previous policy was successful), Not=0 (previous policy failed), and Undefined
(no previous policy was executed).
Step 8 Check the exit status to determine A value of zero means that the default action should not be performed. A value
whether or not to apply the default of nonzero means that the default action should be performed. The exit status is
action for this event, if a default action passed to subsequent policies that are run for the same event.
exists.
Step 9 Set Cisco Error Number (_cerrno) Tcl Some EEM Tcl command extensions set a Cisco Error Number Tcl global variable
global variables. _cerrno. Whenever _cerrno is set, four other Tcl global variables are derived from
_cerrno and are set along with it (_cerr_sub_num, _cerr_sub_err, _cerr_posix_err,
and _cerr_str).
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 91
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
For more details, see theCisco File Naming Convention for Embedded Event
Manager, on page 61.
Copy the file to the flash file system on the router—typically disk0:.
Example:
RP/0/RP0/CPU0:router# configure
Step 12 event manager directory user Specifies a directory to use for storing user library files or user-defined EEM
{library path | policy path} policies.
Example:
RP/0/RP0/CPU0:router(config)#
event manager directory user
library
disk0:/user_library
Step 13 event manager policy policy-name Registers the EEM policy to be run when the specified event defined within the
username username [persist-time policy occurs.
[seconds | infinite] | type [system |
user]]
Example:
RP/0/RP0/CPU0:router(config)#
event manager policy test.tcl
username user_a type
user
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
92 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 93
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
SUMMARY STEPS
1. On your workstation (UNIX, Linux, PC, or Mac) create a library directory and copy the Tcl library files
into the directory.
2. tclsh
3. auto_mkindex directory_name *.tcl
4. Copy the Tcl library files from Step 1, on page 94and the tclIndex file from Step 3, on page 95to the
directory used for storing user library files on the target router.
5. Copy a user-defined EEM policy file written in Tcl to the directory used for storing user-defined EEM
policies on the target router.
6. configure
7. event manager directory user library path
8. event manager directory user policy path
9. event manager policy policy-name username username [persist-time [seconds | infinite] | type [system
| user]]
10. event manager run policy [argument]
11. Use one of these commands:
• end
• commit
DETAILED STEPS
proc test1 {} {
puts "In procedure test1"
}
proc test2 {} {
puts "In procedure test2"
}
lib2.tcl
proc test3 {} {
puts "In procedure test3"
}
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
94 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Example:
workstation% tclsh
Step 3 auto_mkindex directory_name *.tcl Use the auto_mkindex command to create the tclIndex file. The tclIndex
file contains a directory of all the procedures contained in the Tcl library
Example: files. We recommend that you run auto_mkindex inside a directory,
because there can be only a single tclIndex file in any directory and you
workstation% auto_mkindex eem_library may have other Tcl files to be grouped together. Running auto_mkindex
*.tcl
in a directory determines which Tcl source file or files are indexed using
a specific tclIndex.
The following sample TclIndex is created when the lib1.tcl and lib2.tcl
files are in a library file directory and the auto_mkindex command is
run:
tclIndex
libtest.tcl
::cisco::eem::event_register_none
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
global auto_index auto_path
puts [array names auto_index]
if { [catch {test1} result]} {
puts "calling test1 failed result = $result $auto_path"
}
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 95
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Example:
RP/0/RP0/CPU0:router# configure
Step 7 event manager directory user library path Specifies the EEM user library directory; this is the directory to which
the files in Step 4, on page 95 were copied.
Example:
RP/0/RP0/CPU0:router(config)# event
manager directory user library
disk2:/eem_library
Step 8 event manager directory user policy path Specifies the EEM user policy directory; this is the directory to which
the file in Step 5, on page 95was copied.
Example:
RP/0/RP0/CPU0:router(config)# event
manager directory user policy
disk2:/eem_policies
Step 9 event manager policy policy-name username Registers a user-defined EEM policy.
username [persist-time [seconds | infinite] |
type [system | user]]
Example:
RP/0/RP0/CPU0:router(config)# event
manager policy libtest.tcl username
user_a
Step 10 event manager run policy [argument] Manually runs an EEM policy.
Example:
RP/0/RP0/CPU0:router(config)# event
manager run libtest.tcl
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
96 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 97
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
SUMMARY STEPS
1. On your workstation (UNIX, Linux, PC, or Mac) create a library directory and copy the Tcl package files
into the directory.
2. tclsh
3. pkg_mkindex directory_name *.tcl
4. Copy the Tcl package files from Step 1, on page 98and the pkgIndex file from Step 3, on page 98to the
directory used for storing user library files on the target router.
5. Copy a user-defined EEM policy file written in Tcl to the directory used for storing user-defined EEM
policies on the target router.
6. configure
7. event manager directory user library path
8. event manager directory user policy path
9. event manager policy policy-name username username [persist-time [seconds | infinite] | type [system
| user]]
10. event manager run policy [argument]
11. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
workstation% tclsh
Step 3 pkg_mkindex directory_name *.tcl Use the pkg_mkindex command to create the pkgIndex file. The
pkgIndex file contains a directory of all the packages contained in the
Example: Tcl library files. We recommend that you run the pkg_mkindex
command inside a directory, because there can be only a single
workstation% pkg_mkindex eem_library *.tcl pkgIndex file in any directory and you may have other Tcl files to be
grouped together. Running the pkg_mkindex command in a directory
determines which Tcl package file or files are indexed using a specific
pkgIndex.
The following example pkgIndex is created when some Tcl package
files are in a library file directory and the pkg_mkindex command is
run:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
98 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Example:
RP/0/RP0/CPU0:router# configure
Step 7 event manager directory user library path Specifies the EEM user library directory; this is the directory to which
the files in Step 4, on page 99were copied.
Example:
RP/0/RP0/CPU0:router(config)# event
manager directory user library
disk2:/eem_library
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 99
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl
Step 9 event manager policy policy-name username Registers a user-defined EEM policy.
username [persist-time [seconds | infinite] | type
[system | user]]
Example:
RP/0/RP0/CPU0:router(config)# event
manager policy packagetest.tcl username
user_a
Step 10 event manager run policy [argument] Manually runs an EEM policy.
Example:
RP/0/RP0/CPU0:router(config)# event
manager run packagetest.tcl
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
100 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Configuration Examples for Event Management Policies
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router#(config)# event manager environment _cron_entry 0-59/2 0-23/1 * * 0-7
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# event manager policy cron.tcl username tom user
=====================================
job id: 78, node name: 0/1/CPU0
process name: wd-critical-mon, instance: 1
--------------------------------
last event type: process start
recent start time: Mon Sep 10 21:36:49 2007
recent normal end time: n/a
recent abnormal end time: n/a
number of times started: 1
number of times ended normally: 0
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 101
Configuring and Managing Embedded Event Manager Policies
Configuration Examples for Writing Embedded Event Manager Policies Using Tcl
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
102 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
EEM Event Detector Demo: Example
This table describes the EEM environment variables that must be set before the sl_intf_down.tcl sample policy
is run.
This table describes the EEM environment variables that must be set before the tm_cli_cmd.tcl sample policy
is run.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 103
Configuring and Managing Embedded Event Manager Policies
EEM Event Detector Demo: Example
This table describes the EEM environment variables that must be set before the tm_crash_reporter.tcl sample
policy is run.
This table describes the EEM environment variables that must be set before the tm_fsys_usage.tcl sample
policy is run.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
104 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
EEM Event Detector Demo: Example
hostname cpu
event manager environment _domainname example.com
event manager environment _email_server ms.example.net
event manager environment _email_to [email protected]
event manager environment _email_from [email protected]
event manager environment _email_cc [email protected]
event manager environment _cron_entry 0-59/2 0-23/1 * * 0-7
event manager environment _show_cmd show event manager policy registered
event manager environment _syslog_pattern .*UPDOWN.*FastEthernet0/0
event manager environment _config_cmd1 interface Ethernet1/0
event manager environment _config_cmd2 no shutdown
event manager environment _crash_reporter_debug 1
event manager environment _crash_reporter_url
http://www.example.com/fm/interface_tm.cgi
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 105
Configuring and Managing Embedded Event Manager Policies
EEM Event Detector Demo: Example
end
enable
show event manager policy registered
show event manager policy available
configure terminal
event manager policy sl_intf_down.tcl
end
show event manager policy registered
show event manager environment
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
106 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
EEM Event Detector Demo: Example
mode and enter the show event manager policy registered command to verify that the policy has been
registered.
The timer event detector triggers an event for this case periodically, according to the CRON string set in the
EEM environment variable _cron_entry. The EEM server is notified, and the server runs the policy that is
registered to handle this event—tm_cli_cmd.tcl.
enable
show event manager policy registered
show event manager policy available
configure terminal
event manager policy tm_cli_cmd.tcl
end
show event manager policy registered
enable
show event manager policy registered
show event manager policy available
configure terminal
event manager policy tm_crash_reporter.tcl
end
show event manager policy registered
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 107
Configuring and Managing Embedded Event Manager Policies
Programming Policies with Tcl: Sample Scripts Example
The following sample configuration demonstrates how to use this policy. Starting in user EXEC mode, enter
the show event manager policy registered command to verify that no policies are currently registered. Next,
enter the show event manager policy available command to display which policies are available to be
installed. After you enter the configure command to reach global configuration mode, you can register the
tm_fsys_usage.tcl policy with EEM using the event manager policy command. Exit from global configuration
mode and enter the show event manager policy registered command again to verify that the policy has been
registered. If you had configured any of the optional environment variables that are used in the tm_fsys_usage.tcl
policy, the show event manager environment command displays the configured variables.
enable
show event manager policy registered
show event manager policy available
configure terminal
event manager policy tm_fsys_usage.tcl
end
show event manager policy registered
show event manager environment
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
108 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Programming Policies with Tcl: Sample Scripts Example
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 109
Configuring and Managing Embedded Event Manager Policies
Programming Policies with Tcl: Sample Scripts Example
# execute command
if [catch {cli_exec $cli1(fd) $_show_cmd} result] {
error $result $errorInfo
} else {
set cmd_output $result
# format output: remove trailing router prompt
regexp {\n*(.*\n)([^\n]*)$} $result dummy cmd_output
}
if [catch {cli_close $cli1(fd) $cli1(tty_id)} result] {
error $result $errorInfo
}
# 2. log the success of the CLI command
set msg [format "Command \"%s\" executed successfully" $_show_cmd]
action_syslog priority info msg $msg
if {$_cerrno != 0} {
set result [format "component=%s; subsys err=%s; posix err=%s;\n%s" \
$_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
error $result
}
# 3. if _log_file is defined, then attach it to the file
if {[info exists _log_file]} {
# attach output to file
if [catch {open $_log_file a+} result] {
error $result
}
set fileD $result
# save timestamp of command execution
# (Format = 00:53:44 PDT Mon May 02 2005)
set time_now [clock format $time_now -format "%T %Z %a %b %d %Y"]
puts $fileD "%%% Timestamp = $time_now"
puts $fileD $cmd_output
close $fileD
}
# 4. if _email_server is defined send the email out
if {[info exists _email_server]} {
set routername [info hostname]
if {[string match "" $routername]} {
error "Host name is not configured"
}
if [catch {smtp_subst [file join $tcl_library email_template_cmd.tm]} \
result] {
error $result $errorInfo
}
if [catch {smtp_send_email $result} result] {
error $result $errorInfo
}
}
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
110 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Programming Policies with Tcl: Sample Scripts Example
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 111
Configuring and Managing Embedded Event Manager Policies
Tracing Tcl set Command Operations: Example
The following e-mail template file is used with the preceding EEM sample policy:
email_template_cfg.tm
Mailservername: $_email_server
From: $_email_from
To: $_email_to
Cc: $_email_cc
Subject: From router $routername: Periodic $_show_cmd Output
$cmd_output
Additional References
The following sections provide references related to configuring and managing Embedded Event Manager
policies.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
112 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Additional References
Related Documents
Cisco IOS XR XML API material Cisco IOS XR XML API Guide for the Cisco CRS
Router
Cisco IOS XR getting started material Cisco IOS XR Getting Started Guide for the
Cisco CRS Router
Information about user groups and task IDs Configuring AAA Services module in the
Cisco IOS XR System Security Configuration Guide
for the Cisco CRS Router
Standards
Standards Title
No new or modified standards are supported by this —
feature, and support for existing standards has not
been modified by this feature.
MIBs
RFCs
RFCs Title
No new or modified RFCs are supported by this —
feature, and support for existing RFCs has not been
modified by this feature.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 113
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Policy Tcl Command Extension Reference
Technical Assistance
Description Link
The Cisco Technical Support website contains http://www.cisco.com/cisco/web/support/index.html
thousands of pages of searchable technical content,
including links to products, technologies, solutions,
technical tips, and tools. Registered Cisco.com users
can log in from this page to access even more content.
Note For all EEM Tcl command extensions, if there is an error, the returned Tcl result string contains the error
information.
Note Arguments for which no numeric range is specified take an integer from -2147483648 to 2147483647,
inclusive.
The following conventions are used for the syntax documented on the Tcl command extension pages:
• An optional argument is shown within square brackets, for example:
[type ?]
[queue_priority low|normal|high]
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
114 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
event_register_appl
Registers for an application event. Use this Tcl command extension to run a policy when an application event
is triggered following another policy's execution of an event_publish Tcl command extension; the event_publish
command extension publishes an application event.
To register for an application event, a subsystem must be specified. Either a Tcl policy or the internal EEM
API can publish an application event. If the event is being published by a policy, the sub_system argument
that is reserved for a policy is 798.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 115
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
If multiple conditions exist, the application event is raised when all the conditions are satisfied.
Result String
None
Set _cerrno
No
event_register_cli
Registers for a CLI event. Use this Tcl command extension to run a policy when a CLI command of a specific
pattern is entered based on pattern matching performed against an expanded CLI command. This will be
implemented as a new process in IOS-XR which will be dlrsc_tracker. This ED will not do pattern match on
admin commands of XR.
Note You can enter an abbreviated CLI command, such as sh mem summary, and the parser will expand the
command to show memory summary to perform the matching. The functionality provided in the CLI
event detector only allows a regular expression pattern match on a valid XR CLI command itself. This
does not include text after a pipe character when redirection is used.
Syntax
event_register_cli [tag ?]
[occurs ?] [period ?] pattern ? [default ?] [queue_priority low|normal|high|last] [maxrun
?] [nice 0|1]
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
116 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
If multiple conditions are specified, the CLI event will be raised when all the conditions are matched.
Result String
None
Set _cerrno
No
event_register_config
Registers for a change in running configuration. Use this Tcl command extension to trigger a policy when
there is any configuration change. This will be implemented as a new process in IOS-XR which will be
dlrsc_tracker. This ED will not check for admin config changes in XR.
Syntax
event_register_config
[queue_priority low|normal|high|last]
[maxrun ?] [nice 0|1]
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 117
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Arguments
If multiple conditions are specified, the syslog event will be raised when all the conditions are matched.
Result String
None
Set _cerrno
No
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
118 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
event_register_counter
Registers for a counter event as both a publisher and a subscriber. Use this Tcl command extension to run a
policy on the basis of a named counter crossing a threshold. This event counter, as a subscriber, identifies the
name of the counter to which it wants to subscribe and depends on another policy or another process to actually
manipulate the counter. For example, let policyB act as a counter policy, whereas policyA (although it does
not need to be a counter policy) uses register_counter, counter_modify, or unregister_counter Tcl command
extensions to manipulate the counter defined in policyB.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 119
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Result String
None
Set _cerrno
No
event_register_hardware
Registers for an environmental monitoring hardware device that is specified by the hardware event and
condition.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
120 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Result String
None
Set _cerrno
No
event_register_none
Registers for an event that is triggered by the event manager run command. These events are handled by the
None event detector that screens for this event.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 121
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Syntax
Arguments
Result String
None
Set _cerrno
No
event_register_oir
Registers for an online insertion and removal (OIR) event. Use this Tcl command extension to run a policy
on the basis of an event raised when a hardware card OIR occurs. These events are handled by the OIR event
detector that screens for this event.
Syntax
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
122 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Arguments
Result String
None
Set _cerrno
No
event_register_process
Registers for a process event. Use this Tcl command extension to run a policy on the basis of an event raised
when a Cisco IOS XR software modularity process starts or stops. These events are handled by the system
manager event detector that screens for this event. This Tcl command extension is supported only in software
modularity images.
Syntax
event_register_process abort|term|start
[job_id ?] [instance ?] [path ?] [node ?]
[queue_priority low|normal|high] [maxrun ?] [nice 0|1] [tag?]
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 123
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
124 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
If an optional argument is not specified, the event matches all possible values of the argument. If multiple
arguments are specified, the process event will be raised when all the conditions are matched.
Result String
None
Set _cerrno
No
event_register_snmp
Registers for a Simple Network Management Protocol (SNMP) statistics event. Use this Tcl command extension
to run a policy when a given counter specified by an SNMP object ID (oid) crosses a defined threshold. When
a snmp policy is registered, a poll timer is specified. Event matching occurs when the poll timer for the
registered event expires. The snmp-server manager CLI command must be enabled for the SNMP notifications
to work using Tcl policies.
Syntax
event_register_snmp [tag ?] oid ? get_type exact|next
entry_op gt|ge|eq|ne|lt|le entry_val ?
entry_type value|increment|rate
[exit_comb or|and]
[exit_op gt|ge|eq|ne|lt|le] [exit_val ?]
[exit_type value|increment|rate]
[exit_time ?] poll_interval ? [average_factor ?]
[queue_priority low|normal|high|last]
[maxrun ?] [nice 0|1]
Aruguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 125
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
126 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 127
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Result string
None
Set _cerrno
No
event_register_snmp_notification
Registers for a Simple Network Management Protocol (SNMP) notification trap event. Use this Tcl command
extension to run a policy when an SNMP trap with the specified SNMP object ID (oid) is encountered on a
specific interface or address. The snmp-server manager CLI command must be enabled for the SNMP
notifications to work using Tcl policies.
Syntax
event_register_snmp_notification [tag ?] oid ? oid_val ?
op {gt|ge|eq|ne|lt|le}
[src_ip_address ?]
[dest_ip_address ?]
[queue_priority {normal|low|high|last}]
[maxrun ?]
[nice {0|1}]
[default ?]
[direction {incoming|outgoing}]
[msg_op {drop|send}]
Argument
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
128 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Result String
None
Set _cerrno
No
event_register_stat
Registers for a statistics event. Use this Tcl command extension to run a policy when a given statistical counter
crosses a defined threshold.
The following three fields are listed to uniquely identify the statistics counter that the EEM keyword monitors:
• Data element name corresponds to the argument name. For example, the ifstats-generic name is defined
as interface generic statistics.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 129
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
• The first modifier of the data element corresponds to the modifier_1 argument. For example, Ethernet1_0
is defined as the first modifier for ifstats-generic, which qualifies the interface generic statistics to be
specific for the Ethernet interface.
• The second modifier of the data element corresponds to the modifier_2 argument. For example, input-ptks
is defined as the second modifier for ifstats-generic, which further qualifies the interface statistics for
the specific Ethernet interface is the number of packets received.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
130 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 131
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Note Exit criteria can be time-based, value-based, or both. Event monitoring is not reenabled until the exit
criteria is met.
If multiple conditions exist, the statistics event is raised when all of the conditions are satisfied.
Reslt String
None
Set _cerrno
No
event_register_syslog
Registers for a syslog event. Use this Tcl command extension to trigger a policy when a syslog message of a
specific pattern is logged after a certain number of occurrences during a certain period of time.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
132 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
If multiple conditions are specified, the syslog event is raised when all the conditions are matched.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 133
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Result String
None
Set _cerrno
No
event_register_timer
Creates a timer and registers for a timer event as both a publisher and a subscriber. Use this Tcl command
extension when there is a need to trigger a policy that is time specific or timer based. This event timer is both
an event publisher and a subscriber. The publisher part indicates the conditions under which the named timer
is to go off. The subscriber part identifies the name of the timer to which the event is subscribing.
Note Both the CRON and absolute time specifications work on local time.
Syntax
event_register_timer watchdog|countdown|absolute|cron
[name ?] [cron_entry ?]
[time ?]
[queue_priority low|normal|high] [maxrun ?]
[nice 0|1]
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
134 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 135
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
cron_entry
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
136 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 137
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Table 18: Time and Date When CRON Events Will Be Triggered
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
138 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
month 1-12 (or names, see Table 19: Special Strings for
cron_entry, on page 139 )
String Meaning
@yearly Trigger once a year, "0 0 1 1 *".
Result String
None
Set _cerrno
No
See Also
event_register_timer_subscriber, on page 139
event_register_timer_subscriber
Registers for a timer event as a subscriber. Use this Tcl command extension to identify the name of the timer
to which the event timer, as a subscriber, wants to subscribe. The event timer depends on another policy or
another process to actually manipulate the timer. For example, let policyB act as a timer subscriber policy,
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 139
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
but policyA (although it does not need to be a timer policy) uses register_timer, timer_arm, or timer_cancel
Tcl command extensions to manipulate the timer referenced in policyB.
Syntax
event_register_timer_subscriber watchdog|countdown|absolute|cron
name ? [queue_priority low|normal|high] [maxrun ?] [nice 0|1]
Arguments
Note An EEM policy that registers for a timer event or a counter event can act as both publisher and subscriber.
Result String
None
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
140 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Set _cerrno
No
See Also
event_register_timer, on page 134
event_register_track
Registers for a report event from the Object Tracking component in XR. Use this Tcl command extension to
trigger a policy on the basis of a Object Tracking component report for a specified track. This will be
implemented as a new process in IOS-XR which will be dlrsc_tracker. Please note that the manageability
package should be installed for the track ED to be functional.
Syntax
event_register_track ? [tag ?] [state up|down|any] [queue_priority low|normal|high|last]
[maxrun ?]
[nice 0|1]
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 141
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
If an optional argument is not specified, the event matches all possible values of the argument.
Result String
None
Set _cerrno
No
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
142 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
event_register_wdsysmon
Registers for a Watchdog system monitor event. Use this Tcl command extension to register for a composite
event which is a combination of several subevents or conditions. For example, you can use the
event_register_wdsysmon command to register for the combination of conditions wherein the CPU usage
of a certain process is over 80 percent, and the memory used by the process is greater than 50 percent of its
initial allocation. This Tcl command extension is supported only in Software Modularity images.
Syntax
event_register_wdsysmon [timewin ?]
[sub12_op and|or|andnot]
[sub23_op and|or|andnot]
[sub34_op and|or|andnot]
[sub1 subevent-description]
[sub2 subevent-description]
[sub3 subevent-description]
[sub4 subevent-description] [node ?]
[queue_priority low|normal|high]
[maxrun ?] [nice 0|1]
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 143
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
node<slot-number>/<cpu-number>
Subevents
The syntax of subevent descriptions can be one of seven cases.
For arguments in subevent description, the following constraints apply on the value of number arguments:
• For dispatch_mgr, val must be an integer between 0 and 4294967295, inclusive.
• For cpu_proc and cpu_tot, val must be an integer between 0 and 100, inclusive.
• For mem_proc, mem_tot_avail, and mem_tot_used, if is_percent is FALSE, val must be an integer
between 0 and 4294967295, inclusive.
1 deadlock procname ?
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
144 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Arguments
Arguments
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 145
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Arguments
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
146 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 147
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Registration Tcl Command Extensions
Arguments
Result String
None
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
148 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
Set _cerrno
No
event_reqinfo
Queries information for the event that caused the current policy to run.
Syntax
event_reqinfo
Arguments
None
Result String
If the policy runs successfully, the characteristics for the event that triggered the policy will be returned. The
following sections show the characteristics returned for each event detector.
For EEM_EVENT_APPLICATION
event_type_string ASCII string that represents the name of the event for
this event type.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 149
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
For EEM_EVENT_COUNTER
event_type_string ASCII string that represents the name of the event for
this event type.
For EEM_EVENT_NONE
event_type_string ASCII string that represents the name of the event for
this event type.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
150 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
For EEM_EVENT_OIR
event_type_string ASCII string that represents the name of the event for
this event type.
event_type_string ASCII string that represents the name of the event for
this event type.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 151
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
node_name Name of the node that the process is on. The node
name is a string that consists of the word “node”
followed by two fields separated by a slash character
using the following format:
node<slot-number>/<cpu-number>
The slot-number is the hardware slot number. The
cpu-number is the hardware CPU number.
For EEM_EVENT_RF
event_type_string ASCII string that represents the name of the event for
this event type.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
152 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
For EEM_EVENT_SYSLOG_MSG
event_type_string ASCII string that represents the name of the event for
this event type.
For EEM_EVENT_TIMER_ABSOLUTE
EEM_EVENT_TIMER_COUNTDOWN
EEM_EVENT_TIMER_WATCHDOG
event_type_string ASCII string that represents the name of the event for
this event type.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 153
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
For EEM_EVENT_TIMER_CRON
event_type_string ASCII string that represents the name of the event for
this event type.
For EEM_EVENT_TRACK
event_type_string ASCII string that represents the name of the event for
this event type.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
154 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
For EEM_EVENT_WDSYSMON
event_type_string ASCII string that represents the name of the event for
this event type.
"{node {%s} procname {%s} pid %u tid %u state %s b_node %s b_procname %s b_pid %u
b_tid %u}"
Assume that the entry describes the scenario in which Process A thread m is blocked on process B thread n:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 155
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
156 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
"{type %s node {%s} procname {%s} pid %u value %u sec %ld msec %ld}"
"{type %s node {%s} procname {%s} pid %u value %u sec %ld msec %ld}"
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 157
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
158 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
"{type %s node {%s} procname {%s} pid %u is_percent %s value %u diff %d sec %ld msec %ld}"
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 159
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
If the is_percent argument is FALSE, and the sec and msec arguments are specified as 0 or are unspecified
in the event registration Tcl command extension:
• value is the process used memory in the latest sample.
• diff is 0.
• sec and msec are both 0.
If the is_percent argument is FALSE, and a time window is specified as greater than zero in the event
registration Tcl command extension:
• value is the averaged process used memory sample value in the specified time window.
• diff is 0.
• sec and msec are both the actual time difference between the time stamps of the oldest and latest samples
in this time window.
If the is_percent argument is TRUE, and a time window is specified as greater than zero in the event registration
Tcl command extension:
• value is 0.
• diff is the percentage difference between the oldest and latest process used memory samples in the
specified time window.
• sec and msec are the actual time difference between the time stamps of the oldest and latest process used
memory samples in this time window.
If the is_percent argument is TRUE, and the sec and msec arguments are specified as 0 or are unspecified in
the event registration Tcl command extension:
• value is 0.
• diff is the percentage difference between the first process used memory sample ever collected and the
latest process used memory sample.
• sec and msec are the actual time difference between the time stamps of the first process used memory
sample ever collected and the latest process used memory sample.
"{type %s node {%s} is_percent %s used %u avail %u diff %d sec %ld msec %ld}"
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
160 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
If the is_percent argument is FALSE, and the sec and msec arguments are specified as 0 or are unspecified
in the event registration Tcl command extension:
• used is the total used memory in the latest sample.
• avail is the total available memory in the latest sample.
• diff is 0.
• sec and msec are both 0.
If the is_percent argument is FALSE, and a time window is specified as greater than zero in the event
registration Tcl command extension:
• used is 0.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 161
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
• avail is the averaged total available memory sample value in the specified time window.
• diff is 0.
• sec and msec are both the actual time difference between the time stamps of the oldest and latest total
available memory samples in this time window.
If the is_percent argument is TRUE, and a time window is specified as greater than zero in the event registration
Tcl command extension:
• used is 0.
• avail is 0.
• diff is the percentage difference between the oldest and latest total available memory samples in the
specified time window.
• sec and msec are both the actual time difference between the time stamps of the oldest and latest total
available memory samples in this time window.
If the is_percent argument is TRUE, and the sec and msec arguments are specified as 0 or are unspecified in
the event registration Tcl command extension:
• used is 0.
• avail is 0.
• diff is the percentage difference between the first total available memory sample ever collected and the
latest total available memory sample.
• sec and msec are the actual time difference between the time stamps of the first total available memory
sample ever collected and the latest total available memory sample.
"{type %s node {%s} is_percent %s used %u avail %u diff %d sec %ld msec %ld}"
node Name of the node for which the total used memory
is being monitored.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
162 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
If the is_percent argument is FALSE, and the sec and msec arguments are specified as 0 or are unspecified
in the event registration Tcl command extension:
• used is the total used memory in the latest sample,
• avail is the total available memory in the latest sample,
• diff is 0,
• sec and msec are both 0,
If the is_percent argument is FALSE, and a time window is specified as greater than zero in the event
registration Tcl command extension:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 163
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Information Tcl Command Extension
• used is the averaged total used memory sample value in the specified time window,
• avail is 0,
• diff is 0,
• sec and msec are both the actual time difference between the time stamps of the oldest and latest total
used memory samples in this time window,
If the is_percent argument is TRUE, and a time window is specified as greater than zero in the event registration
Tcl command extension:
• used is 0.
• avail is 0.
• diff is the percentage difference between the oldest and latest total used memory samples in the specified
time window.
• sec and msec are both the actual time difference between the time stamps of the oldest and latest total
used memory samples in this time window.
If the is_percent argument is TRUE, and the sec and msec arguments are specified as 0 or are unspecified in
the event registration Tcl command extension:
• used is 0.
• avail is 0.
• diff is the percentage difference between the first total used memory sample ever collected and the latest
total used memory sample.
• sec and msec are the actual time difference between the time stamps of the first total used memory sample
ever collected and the latest total used memory sample.
Set _cerrno
Yes
event_reqinfo_multi
Adds a new function to retrieve the event_reqinfo data for every event that contributed to the triggering of
the script. The data returned will be a list of result strings indexed by event specification tag. Error processing
is the same as in event_reqinfo function.
Syntax
event_reqinfo_multi
Arguments
None
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
164 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Publish Tcl Command Extension
Result String
The following section shows the result string from the event reqinfo multi call:
"<ev-tag> {event_id %u event_type %u event_type_string
{%s} event_pub_sec %ld event_pub_msec %ld timer_type {%s} timer_time_sec
%ld timer_time_msec %ld timer_remain_sec %ld timer_remain_msec %ld}
<ev-tag> {event_id %u event_type %u event_type_string
{%s} event_pub_sec %ld event_pub_msec %ld oid {%s} val {%s} delta_val
{%s} exit_event {%s}}"
Typical usage for a multi-event consisting of both a timer event and an
SNMP event might be:
array set arr_minfo [event_reqinfo_multi]
if {$_cerrno != 0} {
set result [format "component=%s; subsys err=%s; posix err=%s;\n%s" \
$_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
error $result
}
array set arr_einfo $arr_minfo(<ev-tag-for-timer-event-spec>)
global timer_type timer_time_sec
set timer_type $arr_einfo(timer_type)
set timer_time_sec $arr_einfo(timer_time_sec)
The output of event_reqinfo_multi is ordered from most recent to least recent event that contributed to the
triggering of the policy.
event_publish appl
Publishes an application-specific event.
Syntax
Arguments
Result String
None
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 165
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Publish Tcl Command Extension
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
Sample Usage
This example demonstrates how to use the event_publish appl Tcl command extension to execute a script n
times repeatedly to perform some function (for example, to measure the amount of CPU time taken by a given
group of Tcl statements). This example uses two Tcl scripts.
Script1 publishes a type 9999 EEM event to cause Script2 to run for the first time. Script1 is registered as a
none event and is run using the Cisco IOS XR software CLI event manager run command. Script2 is registered
as an EEM application event of type 9999, and this script checks to see if the application publish arg1 data
(the iteration number) exceeds the EEM environment variable test_iterations value. If the test_iterations value
is exceeded, the script writes a message and exits; otherwise the script executes the remaining statements and
reschedules another run. To measure the CPU utilization for Script2, use a value of test_iterations that is a
multiple of 10 to calculate the amount of average CPU time used by Script2.
To run the Tcl scripts, enter the following Cisco IOS XR software commands:
configure terminal
event manager environment test_iterations 100
event manager policy script1.tcl
event manager policy script2.tcl
end
event manager run script1.tcl
The Tcl script Script2 is executed 100 times. If you execute the script without the extra processing and derive
the average CPU utilization, and then add the extra processing and repeat the test, you can subtract the former
CPU utilization from the later CPU utilization to determine the average for the extra processing.
Script1 (script1.tcl)
::cisco::eem::event_register_none
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
166 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Event Publish Tcl Command Extension
Script2 (script2.tcl)
# Use the arg1 info from the previous run to determine when to end.
if {$iter >= $test_iterations} {
# Log a message.
action_syslog priority info msg "EEM application_publish test end"
if {$_cerrno != 0} {
set result [format \
"component=%s; subsys err=%s; posix err=%s;\n%s" \
$_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
error $result
}
exit 0
}
set iter [expr $iter + 1]
# Log a message.
set msg [format "EEM application_publish test iteration %s" $iter]
action_syslog priority info msg $msg
if {$_cerrno != 0} {
set result [format "component=%s; subsys err=%s; posix err=%s;\n%s" \
$_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
error $result
}
# Cause the next iteration to run. Note that the iteration is passed to the
# next operation as arg1.
event_publish sub_system 798 type 9999 arg1 $iter
if {$_cerrno != 0} {
set result [format \
"component=%s; subsys err=%s; posix err=%s;\n%s" \
$_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
error $result
}
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 167
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Multiple Event Support Tcl Command Extensions
Attribute
Specifies a complex event used for Multi Event Support.
Syntax
attribute tag ? [occurs ?]
Arguments
Result String
None
Example:
attribute tag 1 occurs 1
Correlate
Builds a single complex event and allows Boolean logic to relate events.
Syntax
correlate event ? event ?
Arguments
event Specifies the event that can be used with the trigger
command to support multiple event statements within
an script.
If the event associated with the event-tag argument
occurs for the number of times specified by the
trigger command, the result is true. If not, the result
is false.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
168 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Multiple Event Support Tcl Command Extensions
Result String
None
Example:
correlate event 1 or event 2 and event 3
Trigger
Specifies the multiple event configuration ability of Embedded Event Manager (EEM) events. A multiple
event is one that can involve one or more event occurrences and a time period for the event to occur. The
events are raised based on the specified parameters.
Syntax
trigger [occurs ?] [period ?] [period-start ?] [delay ?]
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 169
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Action Tcl Command Extensions
Result String
None
Example:
trigger occurs 1 period-start "0 8 * * 1-5" period 720
action_process
Starts, restarts, or shuts down a Software Modularity process. This Tcl command extension is supported only
in Software Modularity images.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
170 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Action Tcl Command Extensions
Result String
None
Set _cerrno
Yes
This error means that the action command requested was unknown.
This error means that an internal SYSMGR request for memory failed.
This error means that the process name was not known.
This error means that the operation was invalid for the process.
action_program
Allows a Tcl script to run a POSIX process (program), optionally with a given argument string, environment
string, Standard Input (stdin) pathname, Standard Output (stdout) pathname, or Standard Error (stderr)
pathname. This Tcl command extension is supported only in Software Modularity images.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 171
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Action Tcl Command Extensions
Result String
None
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the action command requested was unknown.
This error means that the object length or number exceeded the maximum.
action_script
Allows a Tcl script to enable or disable the execution of all Tcl scripts (enables or disables the script scheduler).
Syntax
Arguments
Result String
None
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
172 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Action Tcl Command Extensions
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the action command requested was unknown.
action_setnode
Switches to the given node to enable subsequent EEM commands to be performed on that node. The following
EEM commands use action_setnode to set their target node:
• action_process
• sys_reqinfo_proc
• sys_reqinfo_proc_all
• sys_reqinfo_crash_history
• sys_reqinfo_proc_version
Syntax
action_setnode [node ?]
Arguments
Result String
None
Set _cerrno
Yes
action_syslog
Logs a message.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 173
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Action Tcl Command Extensions
Syntax
Arguments
Result String
None
Set _cerrno
Yes
This error means that the action command requested was unknown.
action_track_read
Reads the state of a tracked object when an Embedded Event Manager (EEM) script is triggered.
Syntax
action_track_read ?
Arguments
Result String
name {%s}
state {%s}
Set _cerrno
Yes
FH_ENOTRACK
This error means that the tracked object name was not found.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
174 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
appl_read
Reads Embedded Event Manager (EEM) application volatile data. This Tcl command extension provides
support for reading EEM application volatile data. EEM application volatile data can be published by a
Cisco IOS XR software process that uses the EEM application publish API. EEM application volatile data
cannot be published by an EEM policy.
Note Currently there are no Cisco IOS XR software processes that publish application volatile data.
Syntax
Arguments
Result String
data %s
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the application event detector info key or other ID was not found.
This error means that an internal EEM request for memory failed.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 175
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
appl_reqinfo
Retrieves previously saved information from the Embedded Event Manager (EEM). This Tcl command
extension provides support for retrieving information from EEM that has been previously saved with a unique
key, which must be specified in order to retrieve the information. Note that retrieving the information deletes
it from EEM. It must be resaved if it is to be retrieved again.
Syntax
appl_reqinfo key ?
Arguments
Result String
data %s
Where data is the application string data to be retrieved.
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the application event detector info key or other ID was not found.
appl_setinfo
Saves information in the EEM. This Tcl command extension provides support for saving information in the
EEM that can be retrieved later by the same policy or by another policy. A unique key must be specified. This
key allows the information to be retrieved later.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
176 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
Result String
None
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the application event detector info key or other ID was a duplicate.
This error means that an internal EEM request for memory failed.
This error means that the object length or number exceeded the maximum.
This error means that the API message length was invalid.
counter_modify
Modifies a counter value.
Syntax
Arguments
val (Mandatory)
• If op is set, this argument represents the counter
value that is to be set.
• If op is inc, this argument is the value by which
to increment the counter.
• If op is dec, this argument is the value by which
to decrement the counter.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 177
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
op (Mandatory)
• nop—Retrieves the current counter value.
• set—Sets the counter value to the given value.
• inc—Increments the counter value by the given
value.
• dec—Decrements the counter value by the given
value.
Result String
val_remain %d
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the event specification ID could not be matched when the event was being registered
or that an event detector internal event structure is corrupt.
This error means that an internal EEM event detector pointer was null when it should have contained a value.
This error means that the counter event detector set or modify operator was invalid.
fts_get_stamp
Returns the time period elapsed since the last software boot. Use this Tcl command extension to return the
number of nanoseconds since boot in an array “nsec nnnn” where nnnn is the number of nanoseconds.
Syntax
fts_get_stamp
Arguments
None
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
178 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
Result String
nsec %d
Where nsec is the number of nanoseconds since boot.
Set _cerrno
No
register_counter
Registers a counter and returns a counter event ID. This Tcl command extension is used by a counter publisher
to perform this registration before using the event ID to manipulate the counter.
Syntax
register_counter name ?
Arguments
Result String
event_id %d
event_spec_id %d
Where event_id is the counter event ID for the specified counter; it can be used to manipulate the counter by
the unregister_counter or counter_modify Tcl command extensions. The event_spec_id argument is the
event specification ID for the specified counter.
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the request to register the specific event was made before the EEM event detector had
completed its initialization.
This error means that the event type specified in the internal event specification was invalid.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 179
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
This error means that an internal EEM request for memory failed.
This error means that the internal EEM API context structure is corrupt.
This error means that the event specification ID could not be matched when the event was being registered
or that an event detector internal event structure is corrupt.
This error means that the event ID could not be matched when the event was being registered or that an event
detector internal event structure is corrupt.
This error means that the context pointer that is used with each EEM API call is incorrect.
This error means that a control block address that was passed in the EEM API was incorrect.
This error means that an internal EEM event detector pointer was null when it should have contained a value.
This error means that the number of timer or counter subscribers exceeded the maximum.
This error means that the EEM event detector that handles this request is not available.
register_timer
Registers a timer and returns a timer event ID. This Tcl command extension is used by a timer publisher to
perform this registration before using the event ID to manipulate the timer if it does not use the
event_register_timer command extension to register as a publisher and subscriber.
Syntax
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
180 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
Arguments
Result String
event_id %u
Where event_id is the timer event ID for the specified timer (can be used to manipulate the timer by the
timer_arm or timer_cancel command extensions).
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the request to register the specific event was made before the EEM event detector had
completed its initialization.
This error means that the event type specified in the internal event specification was invalid.
This error means that an internal EEM request for memory failed.
This error means that the internal EEM API context structure is corrupt.
This error means that the event specification ID could not be matched when the event was being registered
or that an event detector internal event structure is corrupt.
This error means that the context pointer that is used with each EEM API call is incorrect.
This error means that a control block address that was passed in the EEM API was incorrect.
This error means that an internal EEM event detector pointer was null when it should have contained a value.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 181
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
This error means that the number of timer or counter subscribers exceeded the maximum.
This error means that the EEM event detector that handles this request is not available.
timer_arm
Arms a timer. The type could be CRON, watchdog, countdown, or absolute.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
182 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
Result String
Where sec_remain and msec_remain are the remaining time before the next expiration of the timer.
Note A value of 0 is returned for the sec_remain and msec_remain arguments if the timer type is CRON.
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the event type specified in the internal event specification was invalid.
This error means that an internal EEM request for memory failed.
This error means that the event specification ID could not be matched when the event was being registered
or that an event detector internal event structure is corrupt.
This error means that the event ID could not be matched when the event was being registered or that an event
detector internal event structure is corrupt.
This error means that an internal EEM event detector pointer was null when it should have contained a value.
This error means that the time specified to arm a timer was zero.
This error means that the EEM event detector that handles this request is not available.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 183
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
timer_cancel
Cancels a timer.
Syntax
timer_cancel event_id ?
Arguments
Result String
Note A value of 0 will be returned for sec_remain and msec_remain if the timer type is CRON.
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that the event type specified in the internal event specification was invalid.
This error means that the application event detector info key or other ID was not found.
This error means that the event specification ID could not be matched when the event was being registered
or that an event detector internal event structure is corrupt.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
184 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager Utility Tcl Command Extensions
This error means that the event ID could not be matched when the event was being registered or that an event
detector internal event structure is corrupt.
This error means that an internal EEM event detector pointer was null when it should have contained a value.
This error means that the EEM event detector that handles this request is not available.
unregister_counter
Unregisters a counter. This Tcl command extension is used by a counter publisher to unregister a counter that
was previously registered with the register_counter Tcl command extension.
Syntax
Arguments
Result String
None
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 185
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
This error means that an internal EEM request for memory failed.
This error means that the event specification ID could not be matched when the event was being registered
or that an event detector internal event structure is corrupt.
This error means that an internal EEM event detector pointer was null when it should have contained a value.
This error means that the EEM event detector that handles this request is not available.
Note All EEM system information commands—sys_reqinfo _xxx—have the Set _cerrno section set to yes.
sys_reqinfo_cpu_all
Queries the CPU utilization of the top processes (both POSIX processes and IOS processes) during a specified
time period and in a specified order. This Tcl command extension is supported only in Software Modularity
images.
Syntax
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
186 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Result String
rec_list {{process CPU info string 0},{process CPU info string 1}, ...}
Set _cerrno
Yes
sys_reqinfo_crash_history
Queries the crash information of all processes that have ever crashed. This Tcl command extension is supported
only in Software Modularity images.
Syntax
sys_reqinfo_crash_history
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 187
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Arguments
None
Result String
Set _cerrno
Yes
sys_reqinfo_mem_all
Queries the memory usage of the top processes (both POSIX and IOS) during a specified time period and in
a specified order. This Tcl command extension is supported only in Software Modularity images.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
188 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Syntax
Arguments
Result String
rec_list {{process mem info string 0},{process mem info string 1}, ...}
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 189
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Set _cerrno
Yes
sys_reqinfo_proc
Queries the information about a single POSIX process. This Tcl command extension is supported only in
Software Modularity images.
Syntax
sys_reqinfo_proc job_id ?
Arguments
Result String
job_id %u component_id 0x%x name {%s} helper_name {%s} helper_path {%s} path {%s}
node_name {%s} is_respawn %u is_mandatory %u is_hold %u dump_option %d
max_dump_count %u respawn_count %u fail_count %u dump_count %u
last_respawn_sec %ld last_respawn_msec %ld inst_id %u proc_state %s
level %d exit_status 0x%x exit_type %d
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
190 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 191
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Set _cerrno
Yes
sys_reqinfo_proc_all
Queries the information of all POSIX processes. This Tcl command extension is supported only in Software
Modularity images.
Syntax
sys_reqinfo_proc_all
Arguments
None
Result String
Set _cerrno
Yes
sys_reqinfo_proc_version
Queries the version of the given process.
Syntax
sys_reqinfo_proc_version [job_id ?]
Arguments
Result String
version_id %02d.%02d.%04d
Where version_id is the version manager that is assigned the version number of the process.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
192 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Set _cerrno
Yes
sys_reqinfo_routername
Queries the router name.
Syntax
sys_reqinfo_routername
Arguments
None
Result String
routername %s
Where routername is the name of the router.
Set _cerrno
Yes
sys_reqinfo_syslog_freq
Queries the frequency information of all syslog events.
Syntax
sys_reqinfo_syslog_freq
Arguments
None
Result String
rec_list {{event frequency string 0}, {log freq str 1}, ...}
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 193
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that an internal EEM request for memory failed.
This error means that an internal EEM event detector pointer was null when it should have contained a value.
This error means that the event detector sequence or workset number was invalid.
This error means that the event detector registration list was empty.
sys_reqinfo_syslog_history
Queries the history of the specified syslog message.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
194 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Syntax
sys_reqinfo_syslog_history
Arguments
None
Result String
rec_list {{log hist string 0}, {log hist str 1}, ...}
Set _cerrno
Yes
This error means that the operating system reported an error. The POSIX errno value that is reported with the
error should be used to determine the cause of the operating system error.
This error means that an internal EEM event detector pointer was null when it should have contained a value.
This error means that the event detector sequence or workset number was invalid.
sys_reqinfo_stat
Queries the value of the statistic entity that is specified by name, and optionally the first modifier and the
second modifier.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 195
Configuring and Managing Embedded Event Manager Policies
Embedded Event Manager System Information Tcl Command Extensions
Syntax
Arguments
Result String
name %s value %s
name Statistics data element name.
Set _cerrno
Yes
sys_reqinfo_snmp
Queries the value of the entity specified by a Simple Network Management Protocol (SNMP) object ID.
Syntax
sys_reqinfo_snmp oid ? get_type exact|next
Arguments
Result String
oid {%s} value {%s}
oid SNMP OID.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
196 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
SMTP Library Command Extensions
sys_reqinfo_snmp_trap
This command is used to send a trap.
Syntax
sys_reqinfo_snmp_trap enterprise_oid ent-oid generic_trapnum gen-trapnum specific_trapnum
spe-trapnum
trap_oid oid trap_var varname
• Use the enterprise_oid argument to specify the enterprise oid of the trap.
• Use the generic_trapnum argument to specify generic trap number of the trap.
• Use the specific_trapnum argument to specify specific trap number of the trap.
• Use the trap_oid argument to specify oid of the trap to send.
• Use the trap_var argument to specify the variable of oid(s) to send.
Example
sys_reqinfo_snmp_trap enterprise_oid 1.3.6.1.4.1.9.9.41.2 generic_trapnum 6 specific_trapnum 1 trap_oid
1.3.6.1.4.1.9.9.41.2.0.1 trap_var var1
sys_reqinfo_snmp_trapvar
This command is used to setup an array of oid and value given a trap variable. Similar to IOS, the trap variable
can contain a list of 10 multiple oids and values.
Syntax
sys_reqinfo_snmp_trapvar var varname oid oid int|uint|counter|gauge|octet|string|ipv4 value
Example
sys_reqinfo_snmp_trapvar var var1 oid 1.3.6.1.4.1.9.9.41.1.2.3.1.3 int 4
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 197
Configuring and Managing Embedded Event Manager Policies
SMTP Library Command Extensions
the desired e-mail context with the To address, CC address, From address, and Subject line properly configured
using the configured e-mail server.
E-Mail Template
The e-mail template file has the following format:
Mailservername: $_email_server
From: $_email_from
To: $_email_to
Cc: $_email_cc
Subject: From router $routername: Process terminated
smtp_send_email
Given the text of an e-mail template file with all global variables already substituted, sends the e-mail out
using Simple Mail Transfer Protocol (SMTP). The e-mail template specifies the candidate mail server addresses,
To addresses, CC addresses, From address, subject line, and e-mail body.
Note A list of candidate e-mail servers can be provided so that the library will try to connect the servers on the
list one by one until it can successfully connect to one of them.
Syntax
smtp_send_email text
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
198 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
SMTP Library Command Extensions
Result String
None
Set _cerrno
• Wrong 1st line format—Mailservername:list of server names.
• Wrong 2nd line format—From:from-address.
• Wrong 3rd line format—To:list of to-addresses.
• Wrong 4th line format—CC:list of cc-addresses.
• Error connecting to mail server:—$sock closed by remote server (where $sock is the name of the socket
opened to the mail server).
• Error connecting to mail server:—$sock reply code is $k instead of the service ready greeting (where
$sock is the name of the socket opened to the mail server; $k is the reply code of $sock).
• Error connecting to mail server:—cannot connect to all the candidate mail servers.
• Error disconnecting from mail server:—$sock closed by remote server (where $sock is the name of the
socket opened to the mail server).
Sample Scripts
After all needed global variables in the e-mail template are defined:
smtp_subst
Given an e-mail template file e-mail_template, substitutes each global variable in the file by its user-defined
value. Returns the text of the file after substitution.
Syntax
smtp_subst e-mail_template
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 199
Configuring and Managing Embedded Event Manager Policies
CLI Library Command Extensions
Result String
The text of the e-mail template file with all the global variables substituted.
Set _cerrno
• cannot open e-mail template file
• cannot close e-mail template file
cli_close
Closes the exec process and releases the VTY and the specified channel handler connected to the command-line
interface (CLI).
Syntax
cli_close fd tty_id
Arguments
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
200 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
CLI Library Command Extensions
Result String
None
Set _cerrno
Cannot close the channel.
cli_exec
Writes the command to the specified channel handler to execute the command. Then reads the output of the
command from the channel and returns the output.
Syntax
cli_exec fd cmd
Arguments
Result String
The output of the CLI command executed.
Set _cerrno
Error reading the channel.
cli_get_ttyname
Returns the real and pseudo tty names for a given TTY ID.
Syntax
cli_get_ttyname tty_id
Arguments
Result String
pty %s tty %s
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 201
Configuring and Managing Embedded Event Manager Policies
CLI Library Command Extensions
Set _cerrno
None
cli_open
Calls vty_connect to open a vty channel to an EXEC session and passes the username and associated taskmap
value for the script to be executed. The EXEC session first attempts to authorize the user using whichever
AAA method was configured for the EEM vty pool. If this fails, the EXEC session attempts to authorize the
user using the taskmap value. Returns an array including the vty channel handler.
Note To configure authorization methods for the EEM vty pool, you must configure an AAA method list, create
a vty line template for the EEM vty pool, enable the AAA method list on the vty line template, and
configure the EEM vty pool to use the vty line template you created. For information about AAA
authorization configuration, see Configuring AAA Services module of Cisco IOS XR System Security
Configuration Guide for the Cisco CRS Router.
Note Each call to cli_open initiates a Cisco IOS XR software EXEC session that allocates a Cisco IOS XR
software vty. The vty remains in use until the cli_close routine is called. Vtys are allocated from the pool
of vtys that are configured using the line vty vty-pool CLI configuration command. Be aware that the
cli_open routine fails when two or fewer vtys are available, preserving the remaining vtys for Telnet use.
Syntax
cli_open
Arguments
None
Result String
Set _cerrno
• Cannot get pty for EXEC.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
202 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
CLI Library Command Extensions
cli_read
Reads the command output from the specified command-line interface (CLI) channel handler until the pattern
of the router prompt occurs in the contents read. Returns all the contents read up to the match.
Syntax
cli_read fd
Arguments
Result String
All the contents read.
Set _cerrno
Cannot get router name.
Note This Tcl command extension blocks waiting for the router prompt to show up in the contents read.
cli_read_drain
Reads and drains the command output of the specified command-line interface (CLI) channel handler. Returns
all the contents read.
Syntax
cli_read_drain fd
Arguments
Result String
All the contents read.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 203
Configuring and Managing Embedded Event Manager Policies
CLI Library Command Extensions
Set _cerrno
None
cli_read_line
Reads one line of the command output from the specified command-line interface (CLI) channel handler.
Returns the line read.
Syntax
cli_read_line fd
Arguments
Result String
The line read.
Set _cerrno
None
Note This Tcl command extension blocks waiting for the end of line to show up in the contents read.
cli_read_pattern
Reads the command output from the specified command-line interface (CLI) channel handler until the pattern
that is to be matched occurs in the contents read. Returns all the contents read up to the match.
Note The pattern matching logic attempts a match by looking at the command output data as it is delivered from
the Cisco IOS XR software command. The match is always done on the most recent 256 characters in the
output buffer unless there are fewer characters available, in which case the match is done on fewer
characters. If more than 256 characters in the output buffer are required for the match to succeed, the
pattern will not match.
Syntax
cli_read_pattern fd ptn
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
204 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
CLI Library Command Extensions
Arguments
Result String
All the contents read.
Set _cerrno
None
Note This Tcl command extension blocks waiting for the specified pattern to show up in the contents read.
cli_write
Writes the command that is to be executed to the specified CLI channel handler. The CLI channel handler
executes the command.
Syntax
cli_write fd cmd
Arguments
Result String
None
Set _cerrno
None
Sample Usage
As an example, use configuration CLI commands to bring up Ethernet interface 1/0:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 205
Configuring and Managing Embedded Event Manager Policies
CLI Library Command Extensions
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
206 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
CLI Library Command Extensions
For example, use CLI commands to do squeeze bootflash: and save the output of this command in the Tcl
variable cmd_output.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 207
Configuring and Managing Embedded Event Manager Policies
Tcl Context Library Command Extensions
Exported Commands
context_retrieve
Retrieves Tcl variable(s) identified by the given context name, and possibly the scalar variable name, the array
variable name, and the array index. Retrieved information is automatically deleted.
Note Once saved information is retrieved, it is automatically deleted. If that information is needed by another
policy, the policy that retrieves it (using the context_retrieve command extension) should also save it
again (using the context_save command extension).
Syntax
Arguments
Note The index_if_array argument is ignored when the var argument is a scalar variable.
If var is unspecified, retrieves the whole variable table saved in the context.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
208 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Tcl Context Library Command Extensions
If var is specified and index_if_array is not specified, or if index_if_array is specified but var is a scalar
variable, retrieves the value of var.
If var is specified, and index_if_array is specified, and var is an array variable, retrieves the value of the
specified array element.
Result String
Resets the Tcl global variables to the state that they were in when the save was performed.
Set _cerrno
• A string displaying _cerrno, _cerr_sub_num, _cerr_sub_err, _cerr_posix_err, _cerr_str due to appl_reqinfo
error.
• Variable is not in the context.
Sample Usage
The following examples show how to use the context_save and context_retrieve command extension
functionality to save and retrieve data. The examples are shown in save and retrieve pairs.
Example 1: Save
If var is unspecified or if a pattern if specified, saves multiple variables to the context.
::cisco::eem::event_register_none
Example 1: Retrieve
If var is unspecified, retrieves multiple variables from the context.
::cisco::eem::event_register_none
if {[catch {foreach {var value} [context_retrieve TESTCTX] {set $var $value}} errmsg]} {
action_syslog msg "context_retrieve failed: $errmsg"
} else {
action_syslog msg "context_retrieve succeeded"
}
if {[info exists testvara]} {
action_syslog msg "testvara exists and is $testvara"
} else {
action_syslog msg "testvara does not exist"
}
if {[info exists testvarb]} {
action_syslog msg "testvarb exists and is $testvarb"
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 209
Configuring and Managing Embedded Event Manager Policies
Tcl Context Library Command Extensions
} else {
action_syslog msg "testvarb does not exist"
}
if {[info exists testvarc]} {
action_syslog msg "testvarc exists and is $testvarc"
} else {
action_syslog msg "testvarc does not exist"
}
Example 2: Save
If var is specified, saves the value of var.
::cisco::eem::event_register_none
Example 2: Retrieve
If var is specified and index_if_array is not specified, or if index_if_array is specified but var is a scalar
variable, retrieves the value of var.
::cisco::eem::event_register_none
Example 3: Save
If var is specified, saves the value of var even if it is an array.
::cisco::eem::event_register_none
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
210 OL-24731-01
Configuring and Managing Embedded Event Manager Policies
Tcl Context Library Command Extensions
Example 3: Retrieve
If var is specified, and index_if_array is not specified, and var is an array variable, retrieves the entire array.
::cisco::eem::event_register_none
Example 4: Save
If var is specified, saves the value of var even if it is an array.
::cisco::eem::event_register_none
Example 4: Retrieve
If var is specified, and index_if_array is specified, and var is an array variable, retrieves the specified array
element value.
::cisco::eem::event_register_none
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 211
Configuring and Managing Embedded Event Manager Policies
Tcl Context Library Command Extensions
context_save
Saves Tcl variables that match a given pattern in current and global namespaces with the given context name
as identification. Use this Tcl command extension to save information outside of a policy. Saved information
can be retrieved by a different policy using the context_retrieve command extension.
Note Once saved information is retrieved, it is automatically deleted. If that information is needed by another
policy, the policy that retrieves it (using the context_retrieve command extension) should also save it
again (using the context_save command extension).
Syntax
Arguments
Result String
None
Set _cerrno
A string displaying _cerrno, _cerr_sub_num, _cerr_sub_err, _cerr_posix_err,
_cerr_str due to appl_setinfo error.
Sample Usage
For examples showing how to use the context_save and context_retrieve command extension functionality
to save and retrieve data, see the Sample Usage, on page 209.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
212 OL-24731-01
CHAPTER 3
Implementing IP Service Level Agreements
IP Service Level Agreements (IP SLAs) is a portfolio of technology embedded in most devices that run
Cisco IOS XR software, which allows you to analyze IP service levels for IP applications and services,
increase productivity, lower operational costs, and reduce the frequency of network outages.
Using IP SLA, service provider customers can measure and provide service level agreements. IP SLA can
perform network assessments, verify quality of service (QoS), ease the deployment of new services, and
assist administrators with network troubleshooting.
Note For a complete description of the IP SLA commands used in this chapter, refer to the IP Service Level
Agreement Commands on the Cisco IOS XR Software module of Cisco IOS XR System Management
Command Reference for the Cisco CRS Router.
Release Modification
Release 3.3.0 This feature was introduced.
Release 3.4.0 Support was added for MPLS LSP ping and MPLS LSP trace
operations.
Support was added for the use of nondefault VPN routing and
forwarding (VRF) tables.
Release 3.7.0 The LSP Path Discovery configuration task was expanded.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 213
Implementing IP Service Level Agreements
Prerequisites for Implementing IP Service Level Agreements
IP SLA originated from the technology previously known as Service Assurance Agent (SAA). IP SLA performs
active monitoring by generating and analyzing traffic to measure performance, either between the router or
from a router to a remote IP device such as a network application server. Measurement statistics, which are
provided by the various IP SLA operations, are used for troubleshooting, problem analysis, and designing
network topologies.
Depending on the specific IP SLA operation, statistics of delay, packet loss, jitter, packet sequence, connectivity,
and path are monitored by and stored in the router and provided through command-line interface (CLI),
Extensive Markup Language (XML), and SNMP MIBs. IP SLA uses the Cisco RTTMON MIB to interact
between external Network Management System (NMS) applications and the IP SLA operations that are
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
214 OL-24731-01
Implementing IP Service Level Agreements
Service Level Agreements
running on Cisco devices. For a complete description of the object variables that are referenced by IP SLA,
see the text of the CISCO-RTTMON-MIB.my file that is available from the Cisco MIB Locator.
This table lists the improvements with IP SLA over a traditional service level agreement.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 215
Implementing IP Service Level Agreements
Benefits of IP Service Level Agreements
Benefit Description
IP SLA monitoring Provides service level agreement monitoring,
measurement, and verification.
Network performance monitoring Measure the jitter, latency, or packet loss in the
network. In addition, IP SLA provides continuous,
reliable, and predictable measurements along with
proactive notification.
IP service network health assessment Verifies that the existing QoS is sufficient for the new
IP services.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
216 OL-24731-01
Implementing IP Service Level Agreements
Measuring Network Performance with IP Service Level Agreements
uses an IP SLA component at the receiving end (for example, IP SLA Responder), the reply packet includes
information about the delay at the target device. The source device uses this information to improve the
accuracy of the measurements. An IP SLA operation is a network measurement to a destination in the network
from the source device using a specific protocol, such as User Datagram Protocol (UDP) for the operation.
Operations are divided into two classes, which depend on whether they rely on the IP SLA Responder
component to be running at the target device or not. The former is used only with Cisco devices; whereas,
the latter is used with any device that has IP connectivity. Operations that are based on Internet Control
Message Protocol (ICMP) are examples of the second class; whereas, UDP-based operations are examples
of the first.
In responder-based operations, the IP SLA Responder is enabled in the destination device and provides
information such as the processing delays of IP SLA packets. The responder-based operation has improved
accuracy over the ICMP operation discussed above, and offers the capability of unidirectional measurements.
In replies to the IP SLA source device, the responder includes information about processing delays. The IP
SLA source device removes the delays in its final performance calculation. Use of the responder is optional
for the UDP echo operation, but it is required for the UDP jitter operation. If no IP SLA Responder is used,
the target device should support the UDP echo operation.
In ICMP operations, the source IP SLA device sends several ICMP packets to the destination. The destination
device, which is any IP device, echoes with replies. The source IP SLA device uses the sent and received time
stamps to calculate the response time. The ICMP echo operation resembles the traditional extended ping
utility, and it measures only the response time between the source device and the destination device. ICMP
path-echo and path-jitter operations use the traceroute mechanism to identify the whole path. Subsequent
ICMP packets are sent to each path node, and the measurements are correlated to provide hop-by-hop round-trip
delay and jitter information.
To implement IP SLA network performance measurement, perform these tasks:
1 Enable the IP SLA Responder, if appropriate.
2 Configure the required IP SLA operation type.
3 Configure any options available for the specified IP SLA operation type.
4 Configure reaction conditions, if required.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 217
Implementing IP Service Level Agreements
Operation Types for IP Service Level Agreements
5 Schedule the operation to run. Then, let the operation run for a period of time to gather statistics.
6 Display and interpret the results of the operation using Cisco IOS XR software CLI, XML, or an NMS
system with SNMP.
Operation Description
UDP echo Measures round-trip delay and helps in accurate
measurement of response time of UDP traffic.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
218 OL-24731-01
Implementing IP Service Level Agreements
IP SLA Responder and IP SLA Control Protocol
Operation Description
MPLS LSP ping Tests the connectivity of a label switched paths (LSP)
and measures round-trip delay of the LSP in an MPLS
network. The following Forwarding Equivalence
Classes (FECs) are supported:
• IPv4 Label Distribution Protocol (LDP)
• Traffic engineering (TE) tunnels
• Pseudowire
MPLS LSP trace Traces the hop-by-hop route of an LSP path and
measures the hop-by-hop round-trip delay for IPv4
LDP prefixes and TE tunnel FECs in an MPLS
network.
An echo request packet is sent data to the control
plane of each transit LSR, which checks if it is a
transit LSR for this path. Each transit LSR also returns
information related to the label bound to the FEC that
is being tested. Only a default VRF table is supported.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 219
Implementing IP Service Level Agreements
Response Time Computation for IP SLA
Note The IP SLA responder needs at least one second to open a socket and program Local Packet Transport
Services (LPTS). Therefore, configure the IP SLA timeout to at least 2000 milli seconds.
The IP SLA Responder must be used with the UDP jitter operation, but it is optional for UDP echo operation.
If services that are already provided by the target router are chosen, the IP SLA Responder need not be enabled.
For devices that are not Cisco devices, the IP SLA Responder cannot be configured, and the IP SLA can send
operational packets only to services native to those devices.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
220 OL-24731-01
Implementing IP Service Level Agreements
IP SLA Operation Scheduling
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 221
Implementing IP Service Level Agreements
MPLS LSP Monitoring
Note More than one MPLS LSP monitor instance can be running on a particular PE router at the same time.
For example, one MPLS LSP monitor instance can be configured to discover BGP next-hop neighbors
belonging to the VRF named VPN1. On the same PE router, another MPLS LSP monitor instance can be
configured to discover neighbors belonging to the VRF named VPN2. In this case, if a BGP next-hop
neighbor belonged to both VPN1 and VPN2, then the PE router would create two IP SLA operations for
this neighbor—one for VPN1 and one for VPN2.
Adding and Deleting IP SLA Operations from the MPLS LSP Monitor Database
The MPLS LSP monitor instance receives periodic notifications about BGP next-hop neighbors that have
been added to or removed from a particular VPN. This information is stored in a queue maintained by the
MPLS LSP monitor instance. Based on the information in the queue and user-specified time intervals, new
IP SLA operations are automatically created for newly discovered PE routers and existing IP SLA operations
are automatically deleted for any PE routers that are no longer valid.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
222 OL-24731-01
Implementing IP Service Level Agreements
MPLS LSP Monitoring
routing tables. As routing updates are received, new BGP next-hop neighbors are added immediately to the
database. However, BGP next-hop neighbors that are no longer valid are removed from the database only
periodically, as defined by the user.
Figure 6: BGP Next-hop Neighbor Discovery for a Simple VPN, on page 223shows how BGP next-hop
neighbor discovery works for a simple VPN scenario for an Internet service provider (ISP). In this example,
there are three VPNs associated with router PE1: red, blue, and green. From the perspective of router PE1,
these VPNs are reachable remotely through BGP next-hop neighbors PE2 (router ID: 12.12.12.12) and PE3
(router ID: 13.13.13.13). When the BGP next-hop neighbor discovery process is enabled on router PE1, a
database is generated based on the local VRF and global routing tables. The database in this example contains
two BGP next-hop router entries, PE2 12.12.12.12 and PE3 13.13.13.13. The routing entries are maintained
per next-hop router to distinguish which next-hop routers belong within which particular VRF. For each
next-hop router entry, the IPv4 Forward Equivalence Class (FEC) of the BGP next-hop router in the global
routing table is provided so that it can be used by the MPLS LSP ping operation.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 223
Implementing IP Service Level Agreements
LSP Path Discovery
The IP SLA LSP ping and IP SLA LSP traceroute operations are based on the same infrastructure used by
the MPLS LSP Ping and MPLS LSP Traceroute features, respectively, for sending and receiving echo reply
and request packets to test LSPs.
Note Newly created IP SLA operations (for newly discovered BGP next-hop neighbors) are added to the same
schedule period as the operations that are currently running. To prevent too many operations from starting
at the same time, the multioperation scheduling feature schedules the operations to begin at random
intervals uniformly distributed over the schedule period.
Note LPD functionality may create considerable CPU demands when large numbers of path discovery requests
are received by the LSPV server at one time.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
224 OL-24731-01
Implementing IP Service Level Agreements
How to Implement IP Service Level Agreements
As the paths for the sending and receiving of data may be different (asymmetric), the per-direction data allows
you to more readily identify where congestion or other problems are occurring in the network.
The UDP jitter operation functions by generating synthetic (simulated) UDP traffic. By default, ten
packet-frames (N), each with a payload size of 32 bytes (S) are generated every 20 ms (T), and the operation
is repeated every 60 seconds (F). Each of these parameters is user-configurable, so as to best simulate the IP
service you are providing, or want to provide.
This section contains the following procedures:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 225
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
To use a dynamic port, use the ipsla responder command, as shown in the following example:
configure
ipsla responder
The dynamic port is opened through the IP SLA control protocol on the responder side when you start an
operation on the agent side.
The example is configured as a permanent port on the responder. UDP echo and UDP jitter can use a dynamic
port or a permanent port. If you use a permanent port for UDP jitter, not all of the statistics are collected. For
example, RTT is collected even if you use a permanent port for UDP jitter.
SUMMARY STEPS
1. configure
2. ipsla responder
3. type udp ipv4 address ip-address port port
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla responder Enables the IP SLA Responder for UDP echo or jitter operations.
Example:
RP/0/RP0/CPU0:router(config)# ipsla
responder
RP/0/RP0/CPU0:router(config-ipsla-resp)#
Step 3 type udp ipv4 address ip-address port port Enables the permanent address and port on the IP SLA Responder.
Example:
RP/0/RP0/CPU0:router(config-ipsla-resp)#
type udp ipv4 address 12.25.26.10 port
10001
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
226 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
What to Do Next
After enabling the IP SLA Responder, see the Configuring and Scheduling a UDP Jitter Operation on the
Source Device, on page 227 section.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 227
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
228 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
Configuring and Scheduling a Basic UDP Jitter Operation on the Source Device
You can configure and schedule a UDP jitter operation.
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type udp jitter
4. destination address ipv4address
5. destination port port
6. packet count count
7. packet interval interval
8. frequency seconds
9. exit
10. ipsla schedule operation op-num
11. life { forever | seconds}
12. ageout seconds
13. recurring
14. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss]
15. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Specifies the operation number. The range is from 1 to 2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation
432
Step 3 type udp jitter Configures the operation as a UDP jitter operation, and
configures characteristics for the operation.
Example:
RP/0/RP0/CPU0:router(config-ipsla-op)# type
udp jitter
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 229
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
Step 5 destination port port Specifies the destination port number, in the range from 1 to
65535.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
destination port 11111
Step 6 packet count count (Optional) Specifies the number of packets to be transmitted
during a probe. For UDP jitter operation, the range is 1 to 60000.
Example: For ICMP path-jitter operation, the range is 1 to 100.
Step 7 packet interval interval (Optional) Specifies the time between packets. The default
interval between packets is 20 milliseconds.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
packet interval 30
Step 8 frequency seconds (Optional) Sets the rate at which a specified IP SLA operation
is sent into the network.
Example: • (Optional) Use the seconds argument to specify the number
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)# of seconds between the IP SLA operations. Valid values
frequency 300 are in the range from 1 to 12604800 seconds. The default
is 60 seconds.
Step 9 exit Exits from IP SLA configuration mode and operational mode,
and returns the CLI to global configuration mode.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
exit
RP/0/RP0/CPU0:router(config-ipsla-op)# exit
RP/0/RP0/CPU0:router(config-ipsla)# exit
RP/0/RP0/CPU0:router(config)#
Step 10 ipsla schedule operation op-num Schedules the start time of the operation. You can configure a
basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
230 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
Step 12 ageout seconds (Optional) Specifies the number of seconds to keep the operation
in memory when it is not actively collecting information. The
Example: default value of 0 seconds means that the operation never times
out.
RP/0/RP0/CPU0:router(config-ipsla-sched)#
ageout 3600
Step 13 recurring (Optional) Specifies that the operation starts automatically at the
specified time and for the specified duration every day.
Example:
RP/0/RP0/CPU0:router(config-ipsla-sched)#
recurring
Step 14 start-time [hh:mm:ss {day | month day} | now | Specifies a time for the operation to start. The following
pending | after hh:mm:ss] keywords are described:
• (Optional) Use the pending keyword to configure the
Example: operation to remain in a pending (unstarted) state. The
RP/0/RP0/CPU0:router(config-ipsla-sched)# default is inactive. If the start-time command is not
start-time 01:00:00 specified, no information is collected until the start time is
configured or a trigger occurs that performs an immediate
start.
• (Optional) Use the now keyword to indicate that the
operation should start immediately.
• (Optional) Use the after keyword and associated arguments
to specify the time after which the operation starts
collecting information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 231
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
232 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type udp jitter
4. vrf vrf-name
5. destination address ipv4address
6. destination port port
7. frequency seconds
8. statistics [hourly | interval seconds]
9. buckets hours
10. distribution count slot
11. distribution interval interval
12. datasize request size
13. timeout milliseconds
14. tos number
15. exit
16. ipsla schedule operation op-num
17. life {forever | seconds}
18. ageout seconds
19. recurring
20. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss ]
21. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Specifies the operation number. The range is from 1 to 2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation
432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 233
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
Step 4 vrf vrf-name (Optional) Enables the monitoring of a VPN (using a nondefault
routing table) in a UDP jitter operation. Maximum length is 32
Example: alphanumeric characters.
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
vrf VPN-A
Step 5 destination address ipv4address Specifies the IP address of the destination for the proper
operation type.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
destination address 12.25.26.10
Step 6 destination port port Specifies the destination port number, in the range from 1 to
65535.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
destination port 11111
Step 7 frequency seconds (Optional) Sets the rate at which a specified IP SLA operation
is sent into the network.
Example: • (Optional) Use the seconds argument to specify the number
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)# of seconds between the IP SLA operations. Valid values
frequency 300 are in the range from 1 to 12604800 seconds. The default
is 60 seconds.
Step 8 statistics [hourly | interval seconds] (Optional) Specifies the statistics collection parameters for UDP
jitter operation.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
statistics hourly
RP/0/RP0/CPU0:router(config-ipsla-op-stats)#
Step 9 buckets hours (Optional) Sets the number of hours in which statistics are
maintained for the IP SLA operations. This command is valid
Example: only with the statistics command with hourly keyword. The
range is 0 to 25 hours. The default value is 2 hours.
RP/0/RP0/CPU0:router(config-ipsla-op-stats)#
buckets 10
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
234 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
RP/0/RP0/CPU0:router(config-ipsla-op-stats)#
distribution count 15
Step 11 distribution interval interval (Optional) Sets the time interval for each statistical distribution.
The range is 1 to 100 ms. The default value is 20 ms.
Example:
RP/0/RP0/CPU0:router(config-ipsla-op-stats)#
distribution interval 20
Step 12 datasize request size (Optional) Sets the data size in the payload of the operation's
request packets. For UDP jitter, the range is from 16 to 1500
Example: bytes.
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
datasize request 512
Step 13 timeout milliseconds Sets the time that the specified IP SLA operation waits for a
response from its request packet.
Example: • (Optional) Use the milliseconds argument to specify the
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)# number of milliseconds that the operation waits to receive
timeout 10000 a response.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
tos 255
Step 15 exit Exits from IP SLA configuration mode and operational mode,
and returns the CLI to global configuration mode.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-jitter)#
exit
RP/0/RP0/CPU0:router(config-ipsla-op)# exit
RP/0/RP0/CPU0:router(config-ipsla)# exit
RP/0/RP0/CPU0:router(config)#
Step 16 ipsla schedule operation op-num Schedules the start time of the operation. You can configure a
basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 235
Implementing IP Service Level Agreements
Configuring IP Service Levels Using the UDP Jitter Operation
Step 18 ageout seconds (Optional) Specifies the number of seconds to keep the operation
in memory when it is not actively collecting information. The
Example: default value of 0 seconds means that the operation never times
out.
RP/0/RP0/CPU0:router(config-ipsla-sched)#
ageout 3600
Step 20 start-time [hh:mm:ss {day | month day} | now | (Optional) Specifies a time for the operation to start. The
pending | after hh:mm:ss ] following keywords are described:
• (Optional) Use the pending keyword to configure the
Example: operation to remain in a pending (unstarted) state. The
RP/0/RP0/CPU0:router(config-ipsla-sched)# default is inactive. If the start-time command is not
start-time 01:00:00 specified, no information is collected until the start time
is configured or a trigger occurs that performs an
immediate start.
• (Optional) Use the now keyword to indicate that the
operation should start immediately.
• (Optional) Use the after keyword and associated arguments
to specify the time after which the operation starts
collecting information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
236 OL-24731-01
Implementing IP Service Level Agreements
Configuring the IP SLA for a UDP Echo Operation
Example:
RP/0/RP0/CPU0:router# show ipsla statistics
432
Step 23 show ipsla statistics aggregated [operation-number ] Returns the hourly statistics (aggregated data) on the
performance of the network.
Example: The UDP jitter operation provides the following hourly statistics:
RP/0/RP0/CPU0:router# show ipsla statistics • Jitter statistics—Interprets telephony and multimedia
aggregated 432
conferencing requirements.
• Packet loss and packet sequencing statistics—Interprets
telephony, multimedia conferencing, streaming media, and
other low-latency data requirements.
• One-way latency and delay statistics—Interprets telephony,
multimedia conferencing, and streaming media
requirements.
Note The UDP echo operation requires a Cisco device that is running the IP SLA Responder or a non-Cisco
device that is running the UDP echo service.
Depending on whether you want to configure a basic UDP echo operation or to configure a UDP echo operation
with optional parameters, perform one of the following tasks:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 237
Implementing IP Service Level Agreements
Configuring the IP SLA for a UDP Echo Operation
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type udp echo
4. destination address ipv4address
5. destination port port
6. frequency seconds
7. exit
8. ipsla schedule operation op-num
9. life [forever | seconds]
10. ageout seconds
11. recurring
12. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss ]
13. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Specifies the operation number. The range is from 1 to 2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation
432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
238 OL-24731-01
Implementing IP Service Level Agreements
Configuring the IP SLA for a UDP Echo Operation
Step 4 destination address ipv4address Specifies the IP address of the destination for the proper operation
type.You can configure a permanent port on the IP SLA Responder
Example: side, or you can use an UDP echo server.
RP/0/RP0/CPU0:router(config-ipsla-udp-echo)#
destination address 12.25.26.10
Step 5 destination port port Specifies the destination port number, in the range from 1 to 65535.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-echo)#
destination port 11111
Step 6 frequency seconds (Optional) Sets the rate at which a specified IP SLA operation is
sent into the network.
Example: • (Optional) Use the seconds argument to specify the number
RP/0/RP0/CPU0:router(config-ipsla-udp-echo)# of seconds between the IP SLA operations. Valid values are
frequency 300 in the range from 1 to 12604800 seconds. The default is 60
seconds.
Step 8 ipsla schedule operation op-num Schedules the start time of the operation. You can configure a basic
schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Step 9 life [forever | seconds] The forever keyword schedules the operation to run indefinitely.
The seconds argument schedules the lifetime of the operation, in
Example: seconds. The default lifetime of an operation is 3600 seconds (one
hour).
RP/0/RP0/CPU0:router(config-ipsla-sched)#
life 1
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 239
Implementing IP Service Level Agreements
Configuring the IP SLA for a UDP Echo Operation
Step 11 recurring (Optional) Specifies that the operation starts automatically at the
specified time and for the specified duration every day.
Example:
RP/0/RP0/CPU0:router(config-ipsla-sched)#
recurring
Step 12 start-time [hh:mm:ss {day | month day} | now | (Optional) Specifies a time for the operation to start. The following
pending | after hh:mm:ss ] keywords are described:
• (Optional) Use the pending keyword to configure the
Example: operation to remain in a pending (unstarted) state. This is the
RP/0/RP0/CPU0:router(config-ipsla-sched)# default value. If the start-time command is not specified, no
start-time 01:00:00 information is collected until the start time is configured or
a trigger occurs that performs an immediate start.
• (Optional) Use the now keyword to indicate that the operation
should start immediately.
• (Optional) Use the after keyword and associated arguments
to specify the time after which the operation starts collecting
information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
240 OL-24731-01
Implementing IP Service Level Agreements
Configuring the IP SLA for a UDP Echo Operation
Example:
RP/0/RP0/CPU0:router# show ipsla statistics
432
Step 15 show ipsla statistics aggregated [operation-number] Displays the hourly statistical errors and the hourly statistics for
all the IP SLA operations or specified operation.
Example:
RP/0/RP0/CPU0:router# show ipsla statistics
aggregated 1
Configuring and Scheduling a UDP Echo Operation with Optional Parameters on the Source
Device
You can enable a UDP echo operation on the source device and configure some optional IP SLA parameters.
The source device is the location at which the measurement statistics are stored.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 241
Implementing IP Service Level Agreements
Configuring the IP SLA for a UDP Echo Operation
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type udp echo
4. vrf vrf-name
5. destination address ipv4address
6. destination port port
7. frequency seconds
8. datasize request size
9. tos number
10. timeout milliseconds
11. tag text
12. exit
13. ipsla schedule operation op-num
14. life {forever | seconds}
15. ageout seconds
16. recurring
17. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss]
18. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Specifies the operation number. The range is from 1 to 2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation
432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
242 OL-24731-01
Implementing IP Service Level Agreements
Configuring the IP SLA for a UDP Echo Operation
Step 4 vrf vrf-name (Optional) Enables the monitoring of a VPN (using a nondefault
routing table) in a UDP echo operation. Maximum length is 32
Example: alphanumeric characters.
RP/0/RP0/CPU0:router(config-ipsla-udp-echo)#
vrf VPN-A
Step 5 destination address ipv4address Specifies the IP address of the destination for the proper operation
type.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-echo)#
destination address 12.25.26.10
Step 6 destination port port Specifies the destination port number, in the range from 1 to 65535.
Example:
RP/0/RP0/CPU0:router(config-ipsla-udp-echo)#
destination port 11111
Step 7 frequency seconds (Optional) Sets the rate at which a specified IP SLA operation is
sent into the network.
Example: • (Optional) Use the seconds argument to specify the number
RP/0/RP0/CPU0:router(config-ipsla-udp-echo)# of seconds between the IP SLA operations. Valid values are
frequency 300 in the range from 1 to 12604800 seconds. The default is 60
seconds.
Step 8 datasize request size (Optional) Sets the protocol data size in the payload of the IP SLA
operation's request packet.
Example: • Use the size argument to specify the protocol data size in
RP/0/RP0/CPU0:router(config-ipsla-udp-echo)# bytes. The range is from 0 to the maximum of the protocol.
datasize request 512 The default is 1 byte.
Step 9 tos number Defines a type of service (ToS) byte in the IP header of IP SLA
operations.
Example: Note The ToS byte is converted to a Differentiated Services
RP/0/RP0/CPU0:router(config-ipsla-udp-echo)# Code Point (DSCP) value, but you cannot enter the DSCP
tos 255 value directly. To use a DSCP value, multiply it by 4 and
enter the result as the value of the number argument.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 243
Implementing IP Service Level Agreements
Configuring the IP SLA for a UDP Echo Operation
Step 13 ipsla schedule operation op-num Schedules the start time of the operation. You can configure a
basic schedule or schedule multiple operations using group
Example: scheduling.
Step 14 life {forever | seconds} The forever keyword schedules the operation to run indefinitely.
The seconds argument schedules the lifetime of the operation, in
Example: seconds. The default lifetime of an operation is 3600 seconds (one
hour).
RP/0/RP0/CPU0:router(config-ipsla-sched)#
life 30
Step 15 ageout seconds (Optional) Specifies the number of seconds to keep the operation
in memory when it is not actively collecting information. The
Example: default value of 0 seconds means that the operation never times
out.
RP/0/RP0/CPU0:router(config-ipsla-sched)#
ageout 3600
Step 16 recurring (Optional) Specifies that the operation starts automatically at the
specified time and for the specified duration every day.
Example:
RP/0/RP0/CPU0:router(config-ipsla-sched)#
recurring
Step 17 start-time [hh:mm:ss {day | month day} | now | Specifies a time for the operation to start. The following keywords
pending | after hh:mm:ss] are described:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
244 OL-24731-01
Implementing IP Service Level Agreements
Configuring the IP SLA for a UDP Echo Operation
Step 19 show ipsla statistics enhanced aggregated Displays the enhanced history statistics. You must configure the
[operation-number] interval seconds enhanced history statistics to display the sample output.
Example:
RP/0/RP0/CPU0:router# show ipsla statistics
enhanced aggregated 432
Example:
RP/0/RP0/CPU0:router# show ipsla statistics
432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 245
Implementing IP Service Level Agreements
Configuring an ICMP Echo Operation
Note The ICMP echo operation does not require the IP SLA Responder to be enabled.
Depending on whether you want to configure and schedule a basic ICMP echo operation or configure and
schedule an ICMP echo operation with optional parameters, perform one of the following procedures:
Configuring and Scheduling a Basic ICMP Echo Operation on the Source Device
You can enable and schedule an ICMP echo operation without any optional parameters.
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type icmp echo
4. destination address ipv4address
5. frequency seconds
6. exit
7. ipsla schedule operation op-num
8. life {forever | seconds}
9. ageout seconds
10. recurring
11. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss]
12. Use one of these commands:
• end
• commit
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
246 OL-24731-01
Implementing IP Service Level Agreements
Configuring an ICMP Echo Operation
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Specifies the operation number. The range is from 1 to 2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation
432
Example:
RP/0/RP0/CPU0:router(config-ipsla-op)# type
icmp echo
Step 4 destination address ipv4address Specifies the IP address of the destination for the proper operation
type.
Example:
RP/0/RP0/CPU0:router(config-ipsla-icmp-echo)#
destination address 12.25.26.10
Step 5 frequency seconds (Optional) Sets the rate at which a specified IP SLA operation is
sent into the network.
Example: • (Optional) Use the seconds argument to specify the number
RP/0/RP0/CPU0:router(config-ipsla-icmp-echo) of seconds between the IP SLA operations. Valid values are
frequency 300 in the range from 1 to 12604800 seconds. The default is 60
seconds.
Step 7 ipsla schedule operation op-num Schedules the start time of the operation. You can configure a
basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 247
Implementing IP Service Level Agreements
Configuring an ICMP Echo Operation
Step 9 ageout seconds (Optional) Specifies the number of seconds to keep the operation
in memory when it is not actively collecting information. The
Example: default value of 0 seconds means that the operation never times
out.
RP/0/RP0/CPU0:router(config-ipsla-sched)#
ageout 3600
Step 10 recurring (Optional) Specifies that the operation starts automatically at the
specified time and for the specified duration every day.
Example:
RP/0/RP0/CPU0:router(config-ipsla-sched)#
recurring
Step 11 start-time [hh:mm:ss {day | month day} | now | Specifies a time for the operation to start. The following keywords
pending | after hh:mm:ss] are described:
• (Optional) Use the pending keyword to configure the
Example: operation to remain in a pending (unstarted) state. The
RP/0/RP0/CPU0:router(config-ipsla-sched)# default value is inactive. If the start-time command is not
start-time 01:00:00 specified, no information is collected until the start time is
configured or a trigger occurs that performs an immediate
start.
• (Optional) Use the now keyword to indicate that the
operation should start immediately.
• (Optional) Use the after keyword and associated arguments
to specify the time after which the operation starts collecting
information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
248 OL-24731-01
Implementing IP Service Level Agreements
Configuring an ICMP Echo Operation
Example:
RP/0/RP0/CPU0:router# show ipsla statistics
432
Configuring and Scheduling an ICMP Echo Operation with Optional Parameters on the Source
Device
You can enable an ICMP echo operation on the source device and configure some optional IP SLA parameters.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 249
Implementing IP Service Level Agreements
Configuring an ICMP Echo Operation
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type icmp echo
4. vrf vrf-name
5. destination address ipv4address
6. frequency seconds
7. datasize request size
8. tos number
9. timeout milliseconds
10. tag text
11. exit
12. ipsla schedule operation op-num
13. life {forever | seconds}
14. ageout seconds
15. recurring
16. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss]
17. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Specifies the operation number. The range is from 1 to 2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation
432
Example:
RP/0/RP0/CPU0:router(config-ipsla-op)# type
icmp echo
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
250 OL-24731-01
Implementing IP Service Level Agreements
Configuring an ICMP Echo Operation
RP/0/RP0/CPU0:router(config-ipsla-icmp-echo)#
vrf VPN-A
Step 5 destination address ipv4address Specifies the IP address of the destination for the proper operation
type.
Example:
RP/0/RP0/CPU0:router(config-ipsla-icmp-echo)#
destination address 12.25.26.10
Step 6 frequency seconds (Optional) Sets the rate at which a specified IP SLA operation is
sent into the network.
Example: • (Optional) Use the seconds argument to specify the number
RP/0/RP0/CPU0:router(config-ipsla-icmp-echo)# of seconds between the IP SLA operations. Valid values are
frequency 300 in the range from 1 to 12604800 seconds. The default is 60
seconds.
Step 7 datasize request size (Optional) Sets the protocol data size in the payload of the request
packet for the specified IP SLA operation.
Example: • Use the bytes argument to specify the protocol data size in
RP/0/RP0/CPU0:router(config-ipsla-icmp-echo)# bytes. The range is from 0 to 16384. The default is 36 bytes
datasize request 512 for ICMP echo operation.
Step 8 tos number Defines a type of service (ToS) byte in the IP header of IP SLA
operations.
Example: Note The ToS byte can be converted to a Differentiated
RP/0/RP0/CPU0:router(config-ipsla-icmp-echo)# Services Code Point (DSCP) value, but you cannot enter
tos 1 the DSCP value directly. To use a DSCP value, multiply
it by 4 and enter the result as the value of the number
argument.
Step 9 timeout milliseconds Sets the time that the IP SLA operation waits for a response from
its request packet.
Example: • Use the milliseconds argument to specify the number of
RP/0/RP0/CPU0:router(config-ipsla-icmp-echo)# milliseconds that the operation waits to receive a response.
timeout 10000
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 251
Implementing IP Service Level Agreements
Configuring an ICMP Echo Operation
Step 12 ipsla schedule operation op-num Schedules the start time of the operation. You can configure a
basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Step 13 life {forever | seconds} The forever keyword schedules the operation to run indefinitely.
The seconds argument schedules the lifetime of the operation, in
Example: seconds. The default lifetime of an operation is 3600 seconds (one
hour).
RP/0/RP0/CPU0:router(config-ipsla-sched)# life
30
Step 14 ageout seconds (Optional) Specifies the number of seconds to keep the operation
in memory when it is not actively collecting information. The
Example: default value of 0 seconds means that the operation never times
out.
RP/0/RP0/CPU0:router(config-ipsla-sched)#
ageout 3600
Step 15 recurring (Optional) Specifies that the operation starts automatically at the
specified time and for the specified duration every day.
Example:
RP/0/RP0/CPU0:router(config-ipsla-sched)#
recurring
Step 16 start-time [hh:mm:ss {day | month day} | now | Specifies a time for the operation to start. The following keywords
pending | after hh:mm:ss] are described:
• (Optional) Use the pending keyword to configure the
Example: operation to remain in a pending (unstarted) state. The
RP/0/RP0/CPU0:router(config-ipsla-sched)# default value is inactive. If the start-time command is not
start-time 01:00:00 specified, no information is collected until the start time is
configured or a trigger occurs that performs an immediate
start.
• (Optional) Use the now keyword to indicate that the
operation should start immediately.
• (Optional) Use the after keyword and associated arguments
to specify the time after which the operation starts collecting
information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
252 OL-24731-01
Implementing IP Service Level Agreements
Configuring the ICMP Path-echo Operation
Example:
RP/0/RP0/CPU0:router# show ipsla statistics
432
Note The ICMP path-echo operation does not require the IP SLA Responder to be enabled.
Depending on whether you want to configure and schedule a basic ICMP path-echo operation or configure
and schedule an ICMP path-echo operation with optional parameters, perform one of the following procedures:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 253
Implementing IP Service Level Agreements
Configuring the ICMP Path-echo Operation
Configuring and Scheduling a Basic ICMP Path-echo Operation on the Source Device
You can enable and schedule an ICMP path-echo operation without any optional parameters.
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type icmp path-echo
4. destination address ipv4address
5. frequency seconds
6. exit
7. ipsla schedule operation op-num
8. life {forever | seconds}
9. ageout seconds
10. recurring
11. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss]
12. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Specifies the operation number. The range is from 1 to 2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation 432
Example:
RP/0/RP0/CPU0:router(config-ipsla-op)# type icmp
path-echo
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-echo)#
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
254 OL-24731-01
Implementing IP Service Level Agreements
Configuring the ICMP Path-echo Operation
Step 5 frequency seconds (Optional) Sets the rate at which a specified IP SLA operation
is sent into the network.
Example: • (Optional) Use the seconds argument to specify the
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-echo)# number of seconds between the IP SLA operations.
frequency 300 Valid values are in the range from 1 to 12604800
seconds. The default is 60 seconds.
Step 7 ipsla schedule operation op-num Schedules the start time of the operation. You can configure
a basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Step 8 life {forever | seconds} The forever keyword schedules the operation to run
indefinitely. The seconds argument schedules the lifetime
Example: of the operation, in seconds. The default lifetime of an
operation is 3600 seconds (one hour).
RP/0/RP0/CPU0:router(config-ipsla-sched)# life 30
Step 9 ageout seconds (Optional) Specifies the number of seconds to keep the
operation in memory when it is not actively collecting
Example: information. The default value of 0 seconds means that the
operation never times out.
RP/0/RP0/CPU0:router(config-ipsla-sched)# ageout
3600
Step 11 start-time [hh:mm:ss {day | month day} | now | pending | Specifies a time for the operation to start. The following
after hh:mm:ss] keywords are described:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 255
Implementing IP Service Level Agreements
Configuring the ICMP Path-echo Operation
Example:
RP/0/RP0/CPU0:router# show ipsla statistics 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
256 OL-24731-01
Implementing IP Service Level Agreements
Configuring the ICMP Path-echo Operation
Configuring and Scheduling an ICMP Path-echo Operation with Optional Parameters on the
Source Device
You can enable an ICMP path-echo operation on the source device and configure some optional IP SLA
parameters.
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type icmp path-echo
4. vrf vrf-name
5. lsr-path ip-address
6. destination address ipv4address
7. frequency seconds
8. datasize request size
9. tos number
10. timeout milliseconds
11. tag text
12. lsr-path ipaddress1 {ipaddress2 {... {ipaddress8}}}
13. exit
14. ipsla schedule operation op-num
15. life {forever | seconds}
16. ageout seconds
17. recurring
18. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss]
19. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 257
Implementing IP Service Level Agreements
Configuring the ICMP Path-echo Operation
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation 432
Example:
RP/0/RP0/CPU0:router(config-ipsla-op)# type icmp
path-echo
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-echo)#
RP/0/RP0/CPU0:router(config-ipsla-imcp-path-echo)#
vrf VPN-A
Step 5 lsr-path ip-address Specifies that a loose source routing path is to be used.
Example:
RP/0/RP0/CPU0:router(config-ipsla-imcp-path-echo)#
lsr-path 20.25.22.1
Step 6 destination address ipv4address Specifies the IP address of the destination for the proper
operation type.
Example:
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-echo)#
destination address 12.25.26.10
Step 7 frequency seconds (Optional) Sets the rate at which a specified IP SLA
operation is sent into the network.
Example: • (Optional) Use the seconds argument to specify the
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-echo)# number of seconds between the IP SLA operations.
frequency 300 Valid values are in the range from 1 to 12604800
seconds. The default is 60 seconds.
Step 8 datasize request size (Optional) Sets the protocol data size in the payload of the
request packet for the specified IP SLA operation.
Example: • Use the bytes argument to specify the protocol data
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-echo)# size in bytes. The range is from 0 to 16384. The default
datasize request 512 is 36 bytes.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
258 OL-24731-01
Implementing IP Service Level Agreements
Configuring the ICMP Path-echo Operation
Step 12 lsr-path ipaddress1 {ipaddress2 {... {ipaddress8}}} Specifies the path in which to measure the ICMP echo
response time.
Example: • (Optional) Use the ip address argument of the
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-echo)# intermediate node or nodes in a path to the destination.
lsr-path 20.25.22.1
Step 14 ipsla schedule operation op-num Schedules the start time of the operation. You can configure
a basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Step 15 life {forever | seconds} The forever keyword schedules the operation to run
indefinitely. The seconds argument schedules the lifetime
Example: of the operation, in seconds. The default lifetime of an
operation is 3600 seconds (one hour).
RP/0/RP0/CPU0:router(config-ipsla-sched)# life 1
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 259
Implementing IP Service Level Agreements
Configuring the ICMP Path-echo Operation
RP/0/RP0/CPU0:router(config-ipsla-sched)# recurring
Step 18 start-time [hh:mm:ss {day | month day} | now | pending | Specifies a time for the operation to start. The following
after hh:mm:ss] keywords are described:
• (Optional) Use the pending keyword to configure the
Example: operation to remain in a pending (unstarted) state. The
RP/0/RP0/CPU0:router(config-ipsla-sched)# default value is inactive. If the start-time command
start-time 01:00:00 is not specified, no information is collected until the
start time is configured or a trigger occurs that
performs an immediate start.
• (Optional) Use the now keyword to indicate that the
operation should start immediately.
• (Optional) Use the after keyword and associated
arguments to specify the time after which the operation
starts collecting information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
260 OL-24731-01
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
Example:
RP/0/RP0/CPU0:router# show ipsla statistics 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 261
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
Depending on whether you want to configure and schedule a basic ICMP path-jitter operation or configure
and schedule an ICMP jitter operation with additional parameters, perform one of the following procedures:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
262 OL-24731-01
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type icmp path-jitter
4. destination address ipv4address
5. packet count count
6. packet interval interval
7. frequency seconds
8. exit
9. ipsla schedule operation op-num
10. life {forever | seconds}
11. ageout seconds
12. recurring
13. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss]
14. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Specifies the operation number. The range is from 1 to
2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation 432
Example:
RP/0/RP0/CPU0:router(config-ipsla-op)# type icmp
path-jitter
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 263
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
Step 6 packet interval interval (Optional) Specifies the time between packets. The default
interval between packets is 20 milliseconds.
Example:
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-jitter)#
packet interval 30
Step 7 frequency seconds (Optional) Sets the rate at which a specified IP SLA
operation is sent into the network.
Example: • (Optional) Use the seconds argument to specify the
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-jitter)# number of seconds between the IP SLA operations.
frequency 300 Valid values are in the range from 1 to 12604800
seconds. The default is 60 seconds.
Step 9 ipsla schedule operation op-num Schedules the start time of the operation. You can
configure a basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Step 10 life {forever | seconds} The forever keyword schedules the operation to run
indefinitely. The seconds argument schedules the lifetime
Example: of the operation, in seconds. The default lifetime of an
operation is 3600 seconds (one hour).
RP/0/RP0/CPU0:router(config-ipsla-sched)# life 30
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
264 OL-24731-01
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
RP/0/RP0/CPU0:router(config-ipsla-sched)# recurring
Step 13 start-time [hh:mm:ss {day | month day} | now | pending | (Optional) Specifies a time for the operation to start. The
after hh:mm:ss] following keywords are described:
• (Optional) Use the pending keyword to configure
Example: the operation to remain in a pending (unstarted) state.
RP/0/RP0/CPU0:router(config-ipsla-sched)# start-time The default value is inactive. If the start-time
01:00:00 command is not specified, no information is collected
until the start time is configured or a trigger occurs
that performs an immediate start.
• (Optional) Use the now keyword to indicate that the
operation should start immediately.
• (Optional) Use the after keyword and associated
arguments to specify the time after which the
operation starts collecting information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 265
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
Example:
RP/0/RP0/CPU0:router# show ipsla statistics 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
266 OL-24731-01
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type icmp path-jitter
4. vrf vrf-name
5. lsr-path ip-address
6. destination address ipv4address
7. packet count count
8. packet interval interval
9. frequency seconds
10. datasize request size
11. tos number
12. timeout milliseconds
13. tag text
14. exit
15. ipsla schedule operation op-num
16. life {forever | seconds}
17. ageout seconds
18. recurring
19. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss]
20. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Specifies the operation number. The range is from 1 to
2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 267
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
Example:
RP/0/RP0/CPU0:router(config-ipsla-op)# type icmp
path-jitter
RP/0/RP0/CPU0:router(config-ipsla-imcp-path-jitter)#
vrf VPN-A
Step 5 lsr-path ip-address Specifies that a loose source routing path is to be used.
Example:
RP/0/RP0/CPU0:router(config-ipsla-imcp-path-jitter)#
lsr-path 20.25.22.1
Step 6 destination address ipv4address Specifies the IP address of the destination for the proper
operation type.
Example:
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-jitter)#
destination address 12.25.26.10
Step 8 packet interval interval (Optional) Specifies the time between packets. The default
interval between packets is 20 milliseconds
Example:
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-jitter)#
packet interval 30
Step 9 frequency seconds (Optional) Sets the rate at which a specified IP SLA
operation is sent into the network.
Example: • (Optional) Use the seconds argument to specify the
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-jitter)# number of seconds between the IP SLA operations.
frequency 300 Valid values are in the range from 1 to 12604800
seconds. The default is 60 seconds.
Step 10 datasize request size (Optional) Sets the protocol data size in the payload of
the request packet for the specified IP SLA operation.
Example: • Use the size argument to specify the protocol data
RP/0/RP0/CPU0:router(config-ipsla-icmp-path-jitter)# size in bytes. The default for jitter is 36 bytes. The
datasize request 512 range is 0 to 16384 bytes.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
268 OL-24731-01
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
Step 15 ipsla schedule operation op-num Schedules the start time of the operation. You can
configure a basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Step 16 life {forever | seconds} The forever keyword schedules the operation to run
indefinitely. The seconds argument schedules the lifetime
Example: of the operation, in seconds. The default lifetime of an
operation is 3600 seconds (one hour).
RP/0/RP0/CPU0:router(config-ipsla-sched)# life 30
Step 17 ageout seconds (Optional) Specifies the number of seconds to keep the
operation in memory when it is not actively collecting
Example: information. The default value of 0 seconds means that
the operation never times out.
RP/0/RP0/CPU0:router(config-ipsla-sched)# ageout 3600
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 269
Implementing IP Service Level Agreements
Configuring the ICMP Path-jitter Operation
RP/0/RP0/CPU0:router(config-ipsla-sched)# recurring
Step 19 start-time [hh:mm:ss {day | month day} | now | pending | Specifies a time for the operation to start. The following
after hh:mm:ss] keywords are described:
• (Optional) Use the pending keyword to configure
Example: the operation to remain in a pending (unstarted) state.
RP/0/RP0/CPU0:router(config-ipsla-sched)# start-time The default value is inactive. If the start-time
01:00:00 command is not specified, no information is
collected until the start time is configured or a trigger
occurs that performs an immediate start.
• (Optional) Use the now keyword to indicate that the
operation should start immediately.
• (Optional) Use the after keyword and associated
arguments to specify the time after which the
operation starts collecting information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
270 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA MPLS LSP Ping and Trace Operations
Example:
RP/0/RP0/CPU0:router# show ipsla statistics 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 271
Implementing IP Service Level Agreements
Configuring IP SLA MPLS LSP Ping and Trace Operations
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type mpls lsp ping
4. output interface type interface-path-id
5. target {ipv4 destination-address destination-mask | traffic-eng tunnel tunnel-interface | pseudowire
destination-address circuit-id}
6. lsp selector ipv4 ip-address
7. force explicit-null
8. reply dscp dscp-bits
9. reply mode {control-channel | router-alert}
10. exp exp-bits
11. ttl time-to-live
12. exit
13. ipsla schedule operation operation-number
14. start-time [hh:mm:ss {day | month day} | now | pending | after hh:mm:ss]
15. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Configures an IP SLA operation and specifies the operation
number. The range is from 1 to 2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation 432
Step 3 type mpls lsp ping Configures an MPLS LSP ping operation and enters IP SLA
MPLS LSP Ping configuration mode.
Example:
RP/0/RP0/CPU0:router(config-ipsla-op)# type mpls
lsp ping
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
272 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA MPLS LSP Ping and Trace Operations
Example:
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
target ipv4 10.25.26.10 255.255.255.255
or
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
target ipv4 10.25.26.10/32
or
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
target traffic-eng tunnel 12
or
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-trace)#
target pseudowire 192.168.1.4 4211
Step 6 lsp selector ipv4 ip-address (Optional) Specifies the local host IPv4 address used to select
the LSP in an MPLS LSP ping operation.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
lsp selector ipv4 127.0.0.2
Step 7 force explicit-null (Optional) Adds an explicit null label to the label stack of
an LSP when an echo request is sent.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
force explicit-null
Step 8 reply dscp dscp-bits (Optional) Specifies the differentiated services codepoint
(DSCP) value to be used in echo reply packets.Valid values
Example: are from 0 to 63.
Step 9 reply mode {control-channel | router-alert} (Optional) Sets echo requests to send echo reply packets by
way of a control channel in an MPLS LSP ping operation,
Example: or to reply as an IPv4 UDP packet with IP router alert. The
router-alert reply mode forces an echo reply packet to be
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
reply mode router-alert
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 273
Implementing IP Service Level Agreements
Configuring IP SLA MPLS LSP Ping and Trace Operations
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
exp 5
Step 11 ttl time-to-live (Optional) Specifies the time-to-live (TTL) value used in the
MPLS label of echo request packets. Valid values are from
Example: 1 to 255.
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
ttl 200
Step 12 exit Exits IP SLA MPLS LSP Ping configuration mode and IP
SLA configuration mode. Returns to global configuration
Example: mode.
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
exit
RP/0/RP0/CPU0:router(config-ipsla-op)# exit
RP/0/RP0/CPU0:router(config-ipsla)# exit
RP/0/RP0/CPU0:router(config)#
Step 13 ipsla schedule operation operation-number Schedules the start time of the operation. You can configure
a basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Step 14 start-time [hh:mm:ss {day | month day} | now | pending | Specifies a time for the operation to start. The following
after hh:mm:ss] keywords are described:
• (Optional) Use the pending keyword to configure the
Example: operation to remain in a pending (unstarted) state. The
RP/0/RP0/CPU0:router(config-ipsla-sched)# default value is inactive. If the start-time command is
start-time 01:00:00 not specified, no information is collected until the start
time is configured or a trigger occurs that performs an
immediate start.
• (Optional) Use the now keyword to indicate that the
operation should start immediately.
• (Optional) Use the after keyword and associated
arguments to specify the time after which the operation
starts collecting information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
274 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA MPLS LSP Ping and Trace Operations
Step 16 show ipsla statistics [operation-number] Displays IP SLA statistics for the current MPLS LSP ping
operation.
Example:
RP/0/RP0/CPU0:router# show ipsla statistics 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 275
Implementing IP Service Level Agreements
Configuring IP SLA MPLS LSP Ping and Trace Operations
SUMMARY STEPS
1. configure
2. ipsla operation operation-number
3. type mpls lsp trace
4. output interface type interface-path-id
5. Do one of the following:
• target ipv4 destination-address destination-mask
• target traffic-eng tunnel tunnel-interface
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla operation operation-number Configures an IP SLA operation and specifies the operation
number. The range is from 1 to 2048.
Example:
RP/0/RP0/CPU0:router(config)# ipsla operation 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
276 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA MPLS LSP Ping and Trace Operations
Step 4 output interface type interface-path-id (Optional) Configures the echo request output interface to
be used for LSP trace operations.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-ping)#
output interface pos 0/1/0/0
Step 5 Do one of the following: Specifies the target destination of the MPLS LSP trace
operation as an LDP IPv4 address or MPLS traffic
• target ipv4 destination-address destination-mask engineering tunnel.
• target traffic-eng tunnel tunnel-interface
Example:
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-trace)#
target ipv4 10.25.26.10 255.255.255.255
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-trace)#
target ipv4 10.25.26.10/32
or
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-trace)#
target traffic-eng tunnel 12
Step 6 lsp selector ipv4 ip-address (Optional) Specifies the local host IPv4 address used to select
the LSP in the MPLS LSP ping operation.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-trace)#
lsp selector ipv4 127.0.0.2
Step 7 force explicit-null (Optional) Adds an explicit null label to the label stack of
an LSP when an echo request is sent.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-trace)#
force explicit-null
Step 8 reply dscp dscp-bits (Optional) Specifies the differentiated services codepoint
(DSCP) value to be used in echo reply packets.Valid values
Example: are from 0 to 63.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 277
Implementing IP Service Level Agreements
Configuring IP SLA MPLS LSP Ping and Trace Operations
Step 10 exp exp-bits (Optional) Specifies the MPLS experimental field (EXP)
value to be used in the header of echo reply packets. Valid
Example: values are from 0 to 7.
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-trace)#
exp 5
Step 11 ttl time-to-live (Optional) Specifies the time-to-live (TTL) value used in
the MPLS label of echo request packets. Valid values are
Example: from 1 to 255.
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-trace)#
ttl 20
Step 12 exit Exits IP SLA MPLS LSP Trace configuration mode and IP
SLA configuration mode. Returns to global configuration
Example: mode.
RP/0/RP0/CPU0:router(config-ipsla-mpls-lsp-trace)#
exit
RP/0/RP0/CPU0:router(config-ipsla-op)# exit
RP/0/RP0/CPU0:router(config-ipsla)# exit
RP/0/RP0/CPU0:router(config)#
Step 13 ipsla schedule operation operation-number Schedules the start time of the operation. You can configure
a basic schedule.
Example:
RP/0/RP0/CPU0:router(config)# ipsla schedule
operation 432
RP/0/RP0/CPU0:router(config-ipsla-sched)#
Step 14 start-time [hh:mm:ss {day | month day} | now | pending | Specifies a time for the operation to start. The following
after hh:mm:ss] keywords are described:
• (Optional) Use the pending keyword to configure the
Example: operation to remain in a pending (unstarted) state. The
RP/0/RP0/CPU0:router(config-ipsla-sched)# default value is inactive. If the start-time command
start-time 01:00:00 is not specified, no information is collected until the
start time is configured or a trigger occurs that
performs an immediate start.
• (Optional) Use the now keyword to indicate that the
operation should start immediately.
• (Optional) Use the after keyword and associated
arguments to specify the time after which the operation
starts collecting information.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
278 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
Step 16 show ipsla statistics [operation-number] Displays the current IP SLA statistics for the trace operation.
Example:
RP/0/RP0/CPU0:router# show ipsla statistics 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 279
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [connection-loss]
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the control
of the IP SLA agent. The operation-number argument is the number
Example: of the IP SLA operations for the reactions that are configured. The
range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
280 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [jitter-average {dest-to-source | source-to-dest}]
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the control
of the IP SLA agent. The operation-number argument is the
Example: number of the IP SLA operations for the reactions that are
configured. The range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 281
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
282 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [packet-loss [dest-to-source | source-to-dest]]
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the control
of the IP SLA agent. The operation-number argument is the number
Example: of the IP SLA operations for the reactions that are configured. The
range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Step 3 react [packet-loss [dest-to-source | source-to-dest]] Specifies an element to be monitored for a reaction.
The reaction on packet loss value violation is specified. The
Example: following options are listed for the packet-loss keyword:
RP/0/RP0/CPU0:router(config-ipsla-react)# react • dest-to-source—Specifies the packet loss destination to
packet-loss dest-to-source
RP/0/RP0/CPU0:router(config-ipsla-react-cond)# source (DS) violation.
• source-to-dest—Specifies the packet loss source to
destination (SD) violation.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 283
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [rtt]
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the control
of the IP SLA agent. The operation-number argument is the number
Example: of the IP SLA operations for the reactions that are configured. The
range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
284 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [timeout]
4. Use one of these commands:
• end
• commit
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 285
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the control
of the IP SLA agent. The operation-number argument is the number
Example: of the IP SLA operations for the reactions that are configured. The
range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
286 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [verify-error]
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the control
of the IP SLA agent. The operation-number argument is the number
Example: of the IP SLA operations for the reactions that are configured. The
range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 287
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
For example, you can specify that a reaction can occur for a particular element as soon as you observe the
condition of interest by using the threshold type immediate command or when you observe the condition
for three consecutive times by using the threshold type consecutive command.
The type of threshold defines the type of threshold violation (or combination of threshold violations) that
triggers an event.
This table lists the threshold violation types.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
288 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [connection-loss | jitter-average {dest-to-source | source-to-dest} | packet-loss [dest-to-source
| source-to-dest] | rtt | timeout | verify-error]
4. threshold type immediate
5. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the
control of the IP SLA agent. The operation-number argument is
Example: the number of the IP SLA operations for the reactions that are
configured. The range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 289
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
Example:
RP/0/RP0/CPU0:router(config-ipsla-react)# react
timeout
RP/0/RP0/CPU0:router(config-ipsla-react-cond)#
Step 4 threshold type immediate Takes action immediately upon a threshold violation.
Example:
RP/0/RP0/CPU0:router(config-ipsla-react-cond)#
threshold type immediate
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
290 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [connection-loss | jitter-average {dest-to-source | source-to-dest} | packet-loss [dest-to-source
| source-to-dest] | rtt | timeout | verify-error]
4. threshold type consecutive occurrences
5. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the
control of the IP SLA agent. The operation-number argument is
Example: the number of the IP SLA operations for the reactions that are
configured. The range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Step 3 react [connection-loss | jitter-average {dest-to-source Specifies an element to be monitored for a reaction.
| source-to-dest} | packet-loss [dest-to-source | A reaction is specified if there is a connection-loss for the
source-to-dest] | rtt | timeout | verify-error] monitored operation.
Example:
RP/0/RP0/CPU0:router(config-ipsla-react)# react
connection-loss
RP/0/RP0/CPU0:router(config-ipsla-react-cond)#
Step 4 threshold type consecutive occurrences Takes action after a number of consecutive violations. When the
reaction condition is set for a consecutive number of occurrences,
Example: there is no default value. The number of occurrences is set when
specifying the threshold type. The number of consecutive violations
RP/0/RP0/CPU0:router(config-ipsla-react-cond)# is from 1 to 16.
threshold type consecutive 8
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 291
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [connection-loss | jitter-average {dest-to-source | source-to-dest} | packet-loss [dest-to-source
| source-to-dest] | rtt | timeout | verify-error]
4. threshold type xofy X value Y value
5. Use one of these commands:
• end
• commit
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
292 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the control
of the IP SLA agent. The operation-number argument is the number
Example: of the IP SLA operations for the reactions that are configured. The
range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Step 3 react [connection-loss | jitter-average {dest-to-source Specifies that a reaction occurs if the round-trip value violates the
| source-to-dest} | packet-loss [dest-to-source | upper threshold or lower threshold.
source-to-dest] | rtt | timeout | verify-error]
Example:
RP/0/RP0/CPU0:router(config-ipsla-react)# react
rtt
RP/0/RP0/CPU0:router(config-ipsla-react-cond)#
Step 4 threshold type xofy X value Y value When the reaction condition, such as threshold violations, are met
for the monitored element after some x number of violations within
Example: some other y number of probe operations (for example, x of y), the
action is performed as defined by the action command. The default
RP/0/RP0/CPU0:router(config-ipsla-react-cond)# is 5 for both x value and y value; for example, xofy 5 5. The valid
threshold type xofy 7 7
range for each value is from 1 to 16.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 293
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [connection-loss | jitter-average {dest-to-source | source-to-dest} | packet-loss [dest-to-source
| source-to-dest] | rtt | timeout | verify-error]
4. threshold type average number-of-probes
5. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the
control of the IP SLA agent. The operation-number argument is
Example: the number of the IP SLA operations for the reactions that are
configured. The range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Step 3 react [connection-loss | jitter-average {dest-to-source Specifies an element to be monitored for a reaction.
| source-to-dest} | packet-loss [dest-to-source | The reaction on packet loss value violation is specified. The
source-to-dest] | rtt | timeout | verify-error] following options are listed for the packet-loss keyword:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
294 OL-24731-01
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
Step 4 threshold type average number-of-probes Takes action on average values to violate a threshold.
Example:
RP/0/RP0/CPU0:router(config-ipsla-react-cond)#
threshold type average 8
You can specify reaction events. The react command with the connection-loss keyword is used as an example.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 295
Implementing IP Service Level Agreements
Configuring IP SLA Reactions and Threshold Monitoring
SUMMARY STEPS
1. configure
2. ipsla reaction operation operation-number
3. react [connection-loss | jitter-average {dest-to-source | source-to-dest} | packet-loss [dest-to-source
| source-to-dest] | rtt | timeout | verify-error]
4. action [logging | trigger]
5. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 ipsla reaction operation operation-number Configures certain actions that are based on events under the control
of the IP SLA agent. The operation-number argument is the number
Example: of the IP SLA operations for the reactions that are configured. The
range is from 1 to 2048.
RP/0/RP0/CPU0:router(config)# ipsla reaction
operation 432
Step 3 react [connection-loss | jitter-average {dest-to-source Specifies a reaction if there is a connection-loss for the monitored
| source-to-dest} | packet-loss [dest-to-source | operation.
source-to-dest] | rtt | timeout | verify-error]
Example:
RP/0/RP0/CPU0:router(config-ipsla-react)# react
connection-loss
RP/0/RP0/CPU0:router(config-ipsla-react-cond)#
Step 4 action [logging | trigger] Specifies what action or combination of actions the operation
performs when you configure the react command or when threshold
Example: events occur. The following action types are described:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
296 OL-24731-01
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 297
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
SUMMARY STEPS
1. configure
2. ipsla
3. mpls discovery vpn
4. interval minutes
5. exit
6. mpls lsp-monitor
7. monitor monitor-id
8. type mpls lsp ping
9. vrf vrf-name
10. scan interval scan-interval
11. scan delete-factor factor-value
12. timeout milliseconds
13. datasize request size
14. lsp selector ipv4 ip-address
15. force explicit-null
16. reply dscp dscp-bits
17. reply mode router-alert
18. ttl time-to-live
19. tag text
20. exp exp-bits
21. statistics hourly [buckets hours]
22. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
298 OL-24731-01
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
Step 4 interval minutes (Optional) Specifies the time interval at which routing
entries that are no longer valid are removed from the
Example: BGP next-hop neighbor discovery database of an MPLS
VPN. The default time interval is 60 minutes.
RP/0/RP0/CPU0:router(config-ipsla-mpls-discovery-vpn)#
interval 120
Example:
RP/0/RP0/CPU0:router(config-ipsla-mpls-discovery-vpn)#
exit
Step 6 mpls lsp-monitor Enters MPLS LSP monitor mode. From this mode you
can configure an LSP monitor instance, configure a
Example: reaction for an LSP monitor instance, or schedule an
LSP monitor instance.
RP/0/RP0/CPU0:router(config-ipsla)# mpls lsp-monitor
RP/0/RP0/CPU0:router(config-ipsla-mplslm)#
Step 7 monitor monitor-id Configures an MPLS LSP monitor instance and enters
IP SLA MPLS LSP monitor configuration mode.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mplslm)# monitor 1
RP/0/RP0/CPU0:router(config-ipsla-mplslm-def)#
Step 8 type mpls lsp ping Automatically creates an MPLS LSP ping operation for
each discovered BGP next-hop address and enters the
Example: corresponding configuration mode to configure the
parameters.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-def)# type
mpls lsp ping
Step 10 scan interval scan-interval (Optional) Specifies the time interval (in minutes) at
which the MPLS LSP monitor instance checks the scan
Example: queue for BGP next-hop neighbor updates. The default
time interval is 240 minutes.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
scan interval 300 At each interval, a new IP SLA operation is
automatically created for each newly discovered BGP
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 299
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
Step 11 scan delete-factor factor-value (Optional) Specifies the number of times the MPLS LSP
monitor instance should check the scan queue before
Example: automatically deleting IP SLA operations for BGP
next-hop neighbors that are no longer valid.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
scan delete-factor 2 The default scan factor is 1. In other words, each time
the MPLS LSP monitor instance checks the scan queue
for updates, it deletes IP SLA operations for BGP
next-hop neighbors that are no longer valid.
If the scan factor is set to 0, IP SLA operations are never
deleted by the MPLS LSP monitor instance. We do not
recommend this configuration.
Step 12 timeout milliseconds (Optional) Specifies the amount of time that each MPLS
LSP operation waits for a response from the LSP
Example: verification (LSPV) server. The default value is 5000
milliseconds.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
timeout 50000
Step 13 datasize request size (Optional) Specifies the payload size of the MPLS LSP
echo request packets. The default value is 100 bytes.
Example: Note This command is available in MPLS LSP ping
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)# mode only.
datasize request 512
Step 14 lsp selector ipv4 ip-address (Optional) Specifies a local host IP address (127.x.x.x)
that is used to select the label switched path (LSP) from
Example: among multiple LSPs. The default value is 127.0.0.1.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
lsp selector ipv4 127.10.10.1
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
force explicit-null
Step 16 reply dscp dscp-bits (Optional) Specifies the differentiated services codepoint
(DSCP) value to be used in the IP header of MPLS LSP
Example: echo reply packets.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
reply dscp 5
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
300 OL-24731-01
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
reply mode router-alert
Step 18 ttl time-to-live (Optional) Specifies the maximum hop count for an echo
request packet to be used for MPLS LSP operations.
Example: The default value is 255.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
ttl 200
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
exp 7
Step 21 statistics hourly [buckets hours] (Optional) Specifies the statistics collection parameters
for the operations in the MPLS LSP monitoring instance.
Example: The default number of hours is 2.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
statistics hourly buckets 2
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 301
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
What to Do Next
• Configure the reaction conditions.
• Schedule the MPLS LSP monitoring instance operations.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
302 OL-24731-01
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
SUMMARY STEPS
1. configure
2. ipsla
3. mpls discovery vpn
4. interval minutes
5. exit
6. mpls lsp-monitor
7. monitor monitor-id
8. type mpls lsp trace
9. vrf vrf-name
10. scan interval scan-interval
11. scan delete-factor factor-value
12. timeout milliseconds
13. lsp selector ipv4 ip-address
14. force explicit-null
15. reply dscp dscp-bits
16. reply mode router-alert
17. ttl time-to-live
18. tag text
19. exp exp-bits
20. statistics hourly [buckets hours]
21. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 303
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
Step 6 mpls lsp-monitor Enters MPLS LSP monitor mode. From this
mode you can configure an LSP monitor
Example: instance, configure a reaction for an LSP
monitor instance, or schedule an LSP
RP/0/RP0/CPU0:router(config-ipsla)# mpls lsp-monitor monitor instance.
RP/0/RP0/CPU0:router(config-ipsla-mplslm)#
RP/0/RP0/CPU0:router(config-ipsla-mplslm)# monitor 1
RP/0/RP0/CPU0:router(config-ipsla-mplslm-def)#
Step 8 type mpls lsp trace Automatically creates an MPLS LSP trace
operation for each discovered BGP next-hop
Example: address and enters the corresponding
configuration mode to configure the
RP/0/RP0/CPU0:router(config-ipsla-mplsm-def)# type mpls lsp trace parameters.
Step 10 scan interval scan-interval (Optional) Specifies the time interval (in
minutes) at which the MPLS LSP monitor
Example: instance checks the scan queue for BGP
next-hop neighbor updates. The default time
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-trace)# scan interval interval is 240 minutes.
300
At each interval, a new IP SLA operation is
automatically created for each newly
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
304 OL-24731-01
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
Step 11 scan delete-factor factor-value (Optional) Specifies the number of times the
MPLS LSP monitor instance should check
Example: the scan queue before automatically deleting
IP SLA operations for BGP next-hop
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-trace)# scan neighbors that are no longer valid.
delete-factor 2
The default scan factor is 1. In other words,
each time the MPLS LSP monitor instance
checks the scan queue for updates, it deletes
IP SLA operations for BGP next-hop
neighbors that are no longer valid.
If the scan factor is set to 0, IP SLA
operations are never deleted by the MPLS
LSP monitor instance. We do not recommend
this configuration.
Step 13 lsp selector ipv4 ip-address (Optional) Specifies a local host IP address
(127.x.x.x) that is used to select the label
Example: switched path (LSP) from among multiple
LSPs. The default value is 127.0.0.1.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-trace)# lsp selector
ipv4 127.10.10.1
Step 16 reply mode router-alert (Optional) Enables the use of the router alert
option in MPLS LSP echo reply packets.
Example: This is disabled by default.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 305
Implementing IP Service Level Agreements
Configuring the MPLS LSP Monitoring Instance on a Source PE Router
Step 20 statistics hourly [buckets hours] (Optional) Specifies the statistics collection
parameters for the operations in the MPLS
Example: LSP monitoring instance. The default number
of hours is 2.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-trace)# statistics
hourly buckets 2
RP/0/RP0/CPU0:router(config)# commit
◦Entering yes saves configuration
changes to the running
configuration file, exits the
configuration session, and returns
the router to EXEC mode.
◦Entering no exits the
configuration session and returns
the router to EXEC mode without
committing the configuration
changes.
◦Entering cancel leaves the router
in the current configuration
session without exiting or
committing the configuration
changes.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
306 OL-24731-01
Implementing IP Service Level Agreements
Configuring the Reaction Conditions for an MPLS LSP Monitoring Instance on a Source PE Router
What to Do Next
• Configure the reaction conditions.
• Schedule the MPLS LSP monitoring instance operations.
SUMMARY STEPS
1. configure
2. ipsla
3. mpls lsp-monitor
4. reaction monitor monitor-id
5. react {connection-loss | timeout}
6. action logging
7. threshold type {consecutive occurrences | immediate}
8. Use one of these commands:
• end
• commit
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 307
Implementing IP Service Level Agreements
Configuring the Reaction Conditions for an MPLS LSP Monitoring Instance on a Source PE Router
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 3 mpls lsp-monitor Enters MPLS LSP monitor mode. From this mode you
can configure an LSP monitor instance, configure a
Example: reaction for an LSP monitor instance, or schedule an LSP
monitor instance.
RP/0/RP0/CPU0:router(config-ipsla)# mpls lsp-monitor
RP/0/RP0/CPU0:router(config-ipsla-mplslm)#
Step 4 reaction monitor monitor-id Configures an MPLS LSP monitor instance reaction and
enters IP SLA MPLS LSP monitor reaction configuration
Example: mode.
RP/0/RP0/CPU0:router(config-ipsla-mplslm)# reaction
monitor 2
RP/0/RP0/CPU0:router(config-ipsla-mplslm-react)#
Step 5 react {connection-loss | timeout} Specifies that a reaction occurs if there is a one-way
connection loss or timeout for the monitored operation.
Example: The reaction applies when the condition comes up for any
of the automatically created operations.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-react)# react
connection-loss
Step 6 action logging Specifies that an event be logged as a result of the reaction
condition and threshold.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mplslm-react-cond)#
action logging
Step 7 threshold type {consecutive occurrences | immediate} Specifies that the designated action is taken after the
specified number of consecutive violations or
Example: immediately. The valid range of occurrences is 1 to 16.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-react-cond)#
threshold type consecutive
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
308 OL-24731-01
Implementing IP Service Level Agreements
Scheduling an MPLS LSP Monitoring Instance on a Source PE Router
What to Do Next
• Schedule the MPLS LSP monitoring instance operations.
SUMMARY STEPS
1. configure
2. ipsla
3. mpls lsp-monitor
4. schedule monitor monitor-id
5. frequency seconds
6. schedule period seconds
7. start-time hh:mm:ss [day | month day]
8. Use one of these commands:
• end
• commit
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 309
Implementing IP Service Level Agreements
Scheduling an MPLS LSP Monitoring Instance on a Source PE Router
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 3 mpls lsp-monitor Enters MPLS LSP monitor mode. From this mode you can
configure an LSP monitor instance, configure a reaction for an
Example: LSP monitor instance, or schedule an LSP monitor instance.
RP/0/RP0/CPU0:router(config-ipsla)# mpls
lsp-monitor
RP/0/RP0/CPU0:router(config-ipsla-mplslm)#
Step 4 schedule monitor monitor-id Enters IP SLA MPLS LSP monitor schedule configuration mode
to schedule the MPLS LSP monitor instance.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mplslm)#
schedule monitor 2
RP/0/RP0/CPU0:router(config-ipsla-mplslm-sched)#
Step 5 frequency seconds (Optional) Specifies the frequency at which the schedule period
is run. The default value is same as schedule period. The
Example: schedule period is specified using the schedule period
command. You must specify this value before scheduling an
RP/0/RP0/CPU0:router(config-ipsla-mplslm-sched)# MPLS LSP monitor instance start time.
frequency 600
Step 6 schedule period seconds Specifies the amount of time, in seconds, during which all of
the operations are scheduled to run. All operations are scheduled
Example: equally spaced throughout the schedule period.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-sched)# Use the frequency command to specify how often the entire set
schedule period 300 of operations is performed. The frequency value must be greater
than or equal to the schedule period.
You must specify this value before scheduling an MPLS LSP
monitor instance start time.
Step 7 start-time hh:mm:ss [day | month day] Specifies the time when the MPLS LSP monitor instance starts
collecting information. You must specify the scheduled time;
Example: otherwise, no information is collected.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-sched)#
start-time 11:45:00 July 4
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
310 OL-24731-01
Implementing IP Service Level Agreements
LSP Path Discovery
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 311
Implementing IP Service Level Agreements
LSP Path Discovery
SUMMARY STEPS
1. configure
2. ipsla
3. mpls lsp-monitor
4. monitor monitor-id
5. type mpls lsp ping
6. path discover
7. echo interval time
8. echo maximum lsp selector ipv4 host address
9. echo multipath bitmap-size size
10. echo retry count
11. echo timeout value
12. path retry range
13. path secondary frequency {both | connection-loss | timeout} value}
14. scan period value
15. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 3 mpls lsp-monitor Enters MPLS LSP monitor mode. From this mode you
can configure an LSP monitor instance, configure a
Example: reaction for an LSP monitor instance, or schedule an LSP
monitor instance.
RP/0/RP0/CPU0:router(config-ipsla)# mpls lsp-monitor
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
312 OL-24731-01
Implementing IP Service Level Agreements
LSP Path Discovery
Example:
RP/0/RP0/CPU0:router(config-ipsla-mplslm)# monitor
2
Step 5 type mpls lsp ping Verifies the end-to-end connectivity of a label switched
path (LSP) and the integrity of an MPLS network.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mplslm-def)# type
mpls lsp ping
Example:
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-ping)#
path discover
Step 7 echo interval time Configures the interval (in milliseconds) between MPLS
LSP echo requests sent during path discovery. Range is
Example: 0 to 3600000. Default is 0.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-lpd)#
echo interval 777
Step 8 echo maximum lsp selector ipv4 host address Configures a local host IP address (127.x.x.x) that is the
maximum selector value to be used during path discovery.
Example: Default is 127.255.255.255.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-lpd)#
echo maximum lsp selector ipv4 host_one
127.100.100.100
Step 9 echo multipath bitmap-size size Configures the maximum number of selectors sent in the
downstream mapping of an MPLS LSP echo request
Example: during path discovery. Range is 1 to 256. Default is 32.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-lpd)#
echo multipath bitmap-size 50
Step 10 echo retry count Configures the number of timeout retry attempts for MPLS
LSP echo requests sent during path discovery. Range is
Example: 0 to 10. Default is 3.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-lpd)#
echo retry 3
Step 11 echo timeout value Configures the timeout value for echo requests during
path discovery. Range is 0 to 3600 in milliseconds. Default
Example: is 5.
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-lpd)#
echo timeout 300
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 313
Implementing IP Service Level Agreements
LSP Path Discovery
Step 13 path secondary frequency {both | connection-loss | Enables secondary frequency for:
timeout} value}
• Both timeout and connection loss
Example: • Only connection loss
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-lpd)# • Only timeout
path secondary frequency both 600
Note There is no default
value.
Step 14 scan period value Configures MPLS LSP scan time period value. Range is
0 to 7200 minutes. Default is 5.
Example:
RP/0/RP0/CPU0:router(config-ipsla-mplslm-lsp-lpd)#
scan period 60
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
314 OL-24731-01
Implementing IP Service Level Agreements
Configuration Examples for Implementing IP Service Level Agreements
configure
ipsla operation 432
type udp echo
destination address 12.25.26.10
destination port 11111
frequency 300
exit
exit
ipsla schedule operation 432
life 30
ageout 3600
recurring
start-time after 01:00:00
end
configure
ipsla operation 1
type icmp echo
timeout 5000
destination address 223.255.254.254
frequency 10
statistics interval 30
buckets 3
end
configure
ipsla operation 2
type icmp path-echo
destination address 223.255.254.254
frequency 5
end
configure
ipsla reaction operation 1
react timeout
action trigger
threshold type immediate
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 315
Implementing IP Service Level Agreements
Configuring IP SLA MPLS LSP Monitoring: Example
exit
exit
react rtt
action logging
threshold lower-limit 4 upper-limit 5
end
Operation 1 checks for timeout occurrence. If applicable, operation 1 generates a trigger event. If the rtt
keyword exceeds 5, an error is logged.
If operation 1 generates a trigger event, operation 2 is started. The following example shows how to configure
a reaction trigger operation by using the ipsla reaction trigger command:
configure
ipsla reaction trigger 1 2
end
ipsla
mpls lsp-monitor
monitor 1
type mpls lsp ping
vrf SANJOSE
scan interval 300
scan delete-factor 2
timeout 10000
datasize request 256
lsp selector ipv4 127.0.0.10
force explicit-null
reply dscp af
reply mode router-alert
ttl 30
exp 1
statistics hourly
buckets 1
!
!
!
reaction monitor 1
react timeout
action logging
threshold type immediate
!
react connection-loss
action logging
threshold type immediate
!
!
schedule monitor 1
frequency 300
schedule period 120
start-time 11:45:00 July 4
!
!
mpls discovery vpn
interval 600
!
!
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
316 OL-24731-01
Implementing IP Service Level Agreements
Configuring LSP Path Discovery: Example
configure
ipsla
mpls lsp-monitor
monitor 1
type mpls lsp ping
path discover
path retry 12
path secondary frequency both 12
Additional References
The following sections provide references related to IP Service Level Agreements.
Related Documents
Information about user groups and task IDs Configuring AAA Services module in the
Cisco IOS XR System Security Configuration Guide
for the Cisco CRS Router
Standards Title
No new or modified standards are supported by this —
feature, and support for existing standards has not
been modified by this feature.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 317
Implementing IP Service Level Agreements
Additional References
RFCs
RFCs Title
No new or modified RFCs are supported by this —
feature, and support for existing RFCs has not been
modified by this feature.
Technical Assistance
Description Link
The Cisco Technical Support website contains http://www.cisco.com/cisco/web/support/index.html
thousands of pages of searchable technical content,
including links to products, technologies, solutions,
technical tips, and tools. Registered Cisco.com users
can log in from this page to access even more content.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
318 OL-24731-01
CHAPTER 4
Implementing Logging Services
This module describes the new and revised tasks you need to implement logging services on the router.
The Cisco IOS XR software provides basic logging services. Logging services provide a means to gather
logging information for monitoring and troubleshooting, to select the type of logging information captured,
and to specify the destinations of captured system logging (syslog) messages.
Note For more information about logging services on the Cisco IOS XR software and complete descriptions of
the logging commands listed in this module, see the Related Documents, on page 348 section of this
module.
Release Modification
Release 2.0 This feature was introduced.
Release 3.7.0 The logging on command was removed. The logging process
is enabled by default.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 319
Implementing Logging Services
Prerequisites for Implementing Logging Services
Note For more information about how the syslog process functions within the Alarms and Debugging Event
Management System (ALDEMS) infrastructure on Cisco IOS XR software, see Implementing and
Monitoring Alarms and Alarm Log Correlation on Cisco IOS XR Software.
Field Description
node-id Node from which the syslog message originated.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
320 OL-24731-01
Implementing Logging Services
Duplicate Message Suppression
Field Description
timestamp Time stamp in the form month day HH:MM:SS,
indicating when the message was generated.
Note The time-stamp format can be modified
using the service timestamps command.
See the Modifying the Format of Time
Stamps, on page 337 section.
process-name Process that generated the syslog message.
% category -group- severity -code Message category, group name, severity, and message
code associated with the syslog message.
For information about configuring this feature, see the Suppressing Duplicate Syslog Messages, on page 340.
Message Suppression
The first occurrence of an event is always logged immediately, but subsequent identical messages are suppressed
during three different time intervals. Initially, duplicate messages are suppressed for 30 seconds after the first
event, then for 120 seconds, and finally every 600 seconds (10 minutes). At the end of each interval, the next
identical event triggers the “last message repeated nn times” message, and resets the count of duplicate messages.
The end of the interval does not automatically trigger a message, so the summary message can be delayed
well beyond the suppression interval.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 321
Implementing Logging Services
Duplicate Message Suppression
For example, the following syslog excerpt shows the log entries for repeated Telnet failures when the suppress
duplicate feature s is enabled. In this case, Telnet failures occur at the rate of four per minute:
RP/0/RP0/CPU0:router#
RP/0/RP0/CPU0:router#
RP/0/RP0/CPU0:router#
RP/0/RP0/CPU0:router#
RP/0/RP0/CPU0:router#run
Mon Dec 3 12:30:39.798 UTC
#
# while true
> do
> logger -s alert -c 1 "LOGGING SUPRESS DUPLICATE TESTING "
> done
RP/0/RP0/CPU0:router#
RP/0/RP0/CPU0:router#
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
322 OL-24731-01
Implementing Logging Services
Syslog Message Destinations
The logging history and syslog entries are the same in this case, but they can be different under other conditions.
They can differ because of the severity level configured for each type of log and because of the timing of the
log messages. Also, if there are just a few repeated messages that occur in less than 30 seconds, the reporting
of duplicates can seem to be suppressed altogether. These duplicates ultimately are reported however, just
before the next new event is logged.
Command Description
logging buffered Specifies the logging buffer as a destination for syslog
messages.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 323
Implementing Logging Services
Syslog Messages Sent to Syslog Servers
Command Description
logging monitor Specifies terminal lines other than the console as
destinations for syslog messages.
The logging buffered command copies logging messages to the logging buffer. The buffer is circular, so
newer messages overwrite older messages after the buffer is full. To display the syslog messages that are
logged in the logging buffer, use the show logging command. The first message displayed is the oldest message
in the buffer. To clear the current contents of the logging buffer, use the clear logging command. To disable
logging to the logging buffer, use the no logging buffered command in global configuration mode.
The logging command identifies a syslog server host to receive logging messages. By issuing this command
more than once, you build a list of syslog servers that receive logging messages. To delete the syslog server
with the specified IP address or hostname from the list of available syslog servers, use the no logging command
in global configuration mode.
The logging monitor command globally enables the logging of syslog messages to terminal lines other than
the console, such as vtys. To disable logging to terminal lines other than the console, use the no logging
monitor command in global configuration mode.
Guidelines for Sending Syslog Messages to Destinations Other Than the Console
The logging process sends syslog messages to destinations other than the console terminal and the process is
enabled by default. Logging is enabled to the logging buffer, terminal lines and syslog servers.
Note The terminal monitor and terminal monitor disable commands are set locally and will not remain in
effect after the terminal session is ended.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
324 OL-24731-01
Implementing Logging Services
Syslog Messages Sent to Syslog Servers
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 325
Implementing Logging Services
UNIX Syslog Daemon Configuration
local7.debug /usr/adm/logs/cisco.log
The debugging keyword specifies the syslog level; see Table 32: Syslog Message Severity Levels, on page
329 for a general description of other keywords. The local7 keyword specifies the logging facility to be used;
see Table 28: Logging Facility Type Keywords, on page 325 for a general description of other keywords.
The syslog daemon sends messages at this level or at a more severe level to the file specified in the next field.
The file must already exist, and the syslog daemon must have permission to write to it.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
326 OL-24731-01
Implementing Logging Services
Archiving Logging Messages on a Local Storage Device
Command Description
archive-length weeks Specifies the maximum number of weeks that the
archive logs are maintained in the archive. Any logs
older than this number are automatically removed
from the archive.
device {disk0 | disk1 | harddisk} Specifies the local storage device where syslogs are
archived. By default, the logs are created under the
directory <device>/var/log. If the device is not
configured, then all other logging archive
configurations are rejected. We recommend that
syslogs be archived to the harddisk because it has
more capacity than flash disks.
file-size size Specifies the maximum file size (in megabytes) that
a single log file in the archive can grow to. Once this
limit is reached, a new file is automatically created
with an increasing serial number.
harddisk:/var/log/2006/02/26
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 327
Implementing Logging Services
Severity Levels
Severity Levels
You can limit the number of messages sent to a logging destination by specifying the severity level of syslog
messages sent to a destination (see Table 32: Syslog Message Severity Levels, on page 329 for severity level
definitions).
This table lists the commands used to control the severity level of syslog messages.
Table 30: Commands Used to Control the Severity Level of Syslog Messages
Command Description
logging buffered [severity] Limits the syslog messages sent to the logging buffer
based on severity.
logging console [severity] Limits the syslog messages sent to the console
terminal based on severity.
logging monitor [severity] Limits the syslog messages sent to terminal lines
based on severity.
logging trap [severity] Limits the syslog messages sent to syslog servers
based on severity.
The logging buffered, logging console, logging monitor, and logging traps commands limit syslog messages
sent to their respective destinations to messages with a level number at or below the specified severity level,
which is specified with the severity argument.
Note Syslog messages of lower severity level indicate events of higher importance. See Table 32: Syslog
Message Severity Levels, on page 329 for severity level definitions.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
328 OL-24731-01
Implementing Logging Services
Severity Levels
Command Description
logging history severity Changes the default severity level of syslog messages
stored in the history file and sent to the SNMP server.
logging history size number Changes the number of syslog messages that can be
stored in the history table.
Note Table 32: Syslog Message Severity Levels, on page 329 lists the level keywords and severity level. For
SNMP usage, the severity level values use +1. For example, emergency equals 1 not 0 and critical equals
3 not 2.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 329
Implementing Logging Services
How to Implement Logging Services
SUMMARY STEPS
1. configure
2. logging buffered [size | severity]
3. logging monitor [ severity]
4. Use one of these commands:
• end
• commit
5. terminal monitor
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router#
configure
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
330 OL-24731-01
Implementing Logging Services
Setting Up Destinations for System Logging Messages
Step 3 logging monitor [ severity] Specifies terminal lines other than console terminal as destinations for syslog messages
and limits the number of messages sent to terminal lines based on severity.
Example: • Keyword options for the severity argument are emergencies, alerts, critical,
RP/0/RP0/CPU0:router(config)# errors, warnings, notifications, informational, and debugging.
logging monitor critical
• By default, entering this command without specifying a severity level for the
severity argument sets the severity level to debugging.
Example: ◦Entering yes saves configuration changes to the running configuration file,
exits the configuration session, and returns the router to EXEC mode.
RP/0/RP0/CPU0:router(config)#
end
◦Entering no exits the configuration session and returns the router to EXEC
or
mode without committing the configuration changes.
RP/0/RP0/CPU0:router(config)# ◦Entering cancel leaves the router in the current configuration session without
commit
exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
Step 5 terminal monitor Enables the display of syslog messages for the current terminal session.
Note The logging of syslog message for the current terminal can be disabled with
Example: the terminal monitor disable command.
RP/0/RP0/CPU0:router# terminal • Use this command to reenable the display of syslog messages for the current
monitor
session if the logging of messages for the current session was disabled with
terminal monitor disable command.
Note Because this command is an EXEC mode command, it is set locally and will
not remain in effect after the current session is ended.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 331
Implementing Logging Services
Configuring Logging to a Remote Server
SUMMARY STEPS
1. configure
2. logging {ip-address | hostname}
3. logging trap [severity]
4. logging facility [type]
5. logging hostnameprefix hostname
6. logging source-interface type interface-path-id
7. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router#
Step 2 logging {ip-address | hostname} Specifies a syslog server host as a destination for syslog messages.
• By issuing this command more than once, you build a list of syslog
Example: servers that receive logging messages.
RP/0/RP0/CPU0:router(config)#
logging 10.3.32.154
Step 3 logging trap [severity] Limits the syslog messages sent to syslog servers based on severity.
• By default, entering this command without specifying a severity level
Example: for the severity argument sets the severity level to informational.
RP/0/RP0/CPU0:router(config)#
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
332 OL-24731-01
Implementing Logging Services
Configuring the Settings for the Logging History Table
Step 5 logging hostnameprefix hostname (Optional) Appends a hostname prefix to syslog messages being sent from
the router to syslog servers.
Example: Tip Hostname prefix logging can be useful for sorting syslog messages
RP/0/RP0/CPU0:router(config)# received by syslog servers.
Step 6 logging source-interface type (Optional) Sets the syslog source address.
interface-path-id
• By default, a syslog message sent to a syslog server contains the IP
address of the interface it uses to leave the router.
Example:
• Use this command to set all syslog messages being sent from the router
RP/0/RP0/CPU0:router(config)#
to contain the same IP address, regardless of which interface the syslog
message uses to exit the router.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 333
Implementing Logging Services
Configuring the Settings for the Logging History Table
SUMMARY STEPS
1. configure
2. logging history severity
3. logging history size number
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging history severity Changes the default severity level of syslog messages stored in the history file
and sent to the SNMP server.
Example: • By default, syslog messages at or below the warnings severity level are
RP/0/RP0/CPU0:router(config)# stored in the history file and sent to the SNMP server.
logging history errors
Step 3 logging history size number Changes the number of syslog messages that can be stored in the history table.
• By default, one syslog message is stored in the history table.
Example:
RP/0/RP0/CPU0:router(config)# Note When the history table is full (that is, when it contains the maximum
logging history size 200 number of messages specified with this command), the oldest message
is deleted from the table to allow the new message to be stored.
Step 4 Use one of these commands: Saves configuration changes.
• end • When you issue the end command, the system prompts you to commit
changes:
• commit
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
334 OL-24731-01
Implementing Logging Services
Modifying Logging to the Console Terminal and the Logging Buffer
Step 5 show logging history (Optional) Displays information about the state of the syslog history table.
Example:
RP/0/RP0/CPU0:router# show logging
history
SUMMARY STEPS
1. configure
2. logging buffered [size | severity]
3. logging console [severity]
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router#
configure
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 335
Implementing Logging Services
Modifying Logging to the Console Terminal and the Logging Buffer
Step 3 logging console [severity] Limits messages sent to the console terminal based on severity.
• Syslog messages are logged to the console terminal at the informational severity
Example: level by default.
RP/0/RP0/CPU0:router(config)#
logging console alerts • Keyword options for the severity argument are emergencies, alerts, critical,
errors, warnings, notifications, informational, and debugging.
• Entering this command without specifying a severity level for the severity
argument sets the severity level to informational.
Note Use this command to reenable logging to the console terminal if it was
disabled with the logging console disable command.
Step 4 Use one of these commands: Saves configuration changes.
• end • When you issue the end command, the system prompts you to commit changes:
• commit
Uncommitted changes found, commit them
before exiting(yes/no/cancel)? [cancel]:
Example: ◦Entering yes saves configuration changes to the running configuration file,
exits the configuration session, and returns the router to EXEC mode.
RP/0/RP0/CPU0:router(config)#
end
◦Entering no exits the configuration session and returns the router to EXEC
or
mode without committing the configuration changes.
RP/0/RP0/CPU0:router(config)# ◦Entering cancel leaves the router in the current configuration session without
commit
exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
336 OL-24731-01
Implementing Logging Services
Modifying the Format of Time Stamps
SUMMARY STEPS
1. configure
2. Do one of the following:
• service timestamps log datetime [localtime] [msec] [show-timezone]
• service timestamps log uptime
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 Do one of the following: Modifies the time-stamp format for syslog messages.
• service timestamps log datetime • By default, time stamps are enabled. The default time-stamp format is
[localtime] [msec] [show-timezone] month day HH:MM:SS.
• service timestamps log uptime • Issuing the service timestamps log datetime command configures syslog
messages to be time-stamped with the date and time.
◦The optional localtime keyword includes the local time zone in time
Example: stamps.
RP/0/RP0/CPU0:router(config)#
service timestamps log datetime ◦The optional msec keyword includes milliseconds in time stamps.
localtime msec
or ◦The optional show-timezone keyword includes time zone information
in time stamps.
RP/0/RP0/CPU0:router(config)#
service timestamps log uptime • Issuing the service timestamps log uptime command configures syslog
messages to be time-stamped with the time that has elapsed since the router
last rebooted.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 337
Implementing Logging Services
Modifying the Format of Time Stamps
Step 3 Do one of the following: Modifies the time-stamp format for debugging messages.
• service timestamps debug datetime • By default, time-stamps are enabled. The default time stamp format is
[localtime] [msec] [show-timezone] month day HH:MM:SS.
• service timestamps debug uptime • Issuing the service timestamps log datetime command configures
debugging messages to be time-stamped with the date and time.
◦The optional localtime keyword includes the local time zone in time
Example: stamps.
RP/0/RP0/CPU0:router(config)#
service timestamps debug datetime ◦The optional msec keyword includes milliseconds in time stamps.
msec show-timezone
or ◦The optional show-timezone keyword includes time zone information
in time stamps.
RP/0/RP0/CPU0:router(config)#
service timestamps debug uptime • Issuing the service timestamps log uptime command configures debugging
messages to be time-stamped with the time that has elapsed since the
networking device last rebooted.
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
338 OL-24731-01
Implementing Logging Services
Disabling Time Stamps
SUMMARY STEPS
1. configure
2. Do one of the following:
• service timestamps disable
• no service timestamps [debug | log] [datetime [localtime] [msec] [show-timezone]] | uptime]
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 Do one of the following: Disables the inclusion of time stamps in syslog messages.
• service timestamps disable Note Both commands disable the inclusion of time stamps in syslog
messages; however, specifying the service timestamps disable
• no service timestamps [debug | log] command saves the command to the configuration, whereas specifying
[datetime [localtime] [msec] the no form of the service timestamps command removes the
[show-timezone]] | uptime] command from the configuration.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 339
Implementing Logging Services
Suppressing Duplicate Syslog Messages
SUMMARY STEPS
1. configure
2. logging suppress duplicates
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging suppress duplicates Prevents the consecutive logging of duplicate syslog messages.
Caution If this command is enabled during debugging sessions, you could
Example: miss important information related to problems that you are attempting
RP/0/RP0/CPU0:router(config)# to isolate and resolve. In such a case, you might consider disabling
logging suppress duplicates this command.
Step 3 Use one of these commands: Saves configuration changes.
• end • When you issue the end command, the system prompts you to commit
changes:
• commit
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
340 OL-24731-01
Implementing Logging Services
Disabling the Logging of Link-Status Syslog Messages
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
SUMMARY STEPS
1. configure
2. logging events link-status disable
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 logging events link-status disable Disables the logging of link-status syslog messages for software (logical) and
physical links.
Example: • The logging of link-status syslog messages is enabled by default for physical
RP/0/RP0/CPU0:router(config)# links.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 341
Implementing Logging Services
Displaying System Logging Messages
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
SUMMARY STEPS
1. show logging
2. show logging location node-id
3. show logging process name
4. show logging string string
5. show logging start month day hh:mm:ss
6. show logging end month day hh:mm:ss
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
342 OL-24731-01
Implementing Logging Services
Archiving System Logging Messages to a Local Storage Device
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# show logging
Step 2 show logging location node-id Displays syslog messages that have originated from the
designated node.
Example:
RP/0/RP0/CPU0:router# show logging location
0/1/CPU0
Step 3 show logging process name Displays syslog messages that are related to the specified
process.
Example:
RP/0/RP0/CPU0:router# show logging process init
Step 4 show logging string string Displays syslog messages that contain the specified
string.
Example:
RP/0/RP0/CPU0:router# show logging string install
Step 5 show logging start month day hh:mm:ss Displays syslog messages in the logging buffer that were
generated on or after the specified date and time.
Example:
RP/0/RP0/CPU0:router# show logging start december
1 10:30:00
Step 6 show logging end month day hh:mm:ss Displays syslog messages in the logging buffer that were
generated on or before the specified date and time.
Example:
RP/0/RP0/CPU0:router# show logging end december
2 22:16:00
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 343
Implementing Logging Services
Archiving System Logging Messages to a Local Storage Device
Note • The local storage device must have enough space available to store the archive files. We recommend
that syslogs be archived to the harddisk because it has more capacity than flash disks.
• Archiving the syslog messages on the storage device begins only after messages of the configured
severity level exceeds 10MB or 20480 messages. For example, if the severity level configured is
emergencies, the archive begins only after 10 MB or 20480 syslog messages of severity, emergencies,
are logged.
SUMMARY STEPS
1. configure
2. logging archive
3. device {disk0 | disk1 | harddisk}
4. frequency {daily | weekly}
5. severity severity
6. archive-length weeks
7. archive-size size
8. file-size size
9. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Example:
RP/0/RP0/CPU0:router(config)# logging
archive
Step 3 device {disk0 | disk1 | harddisk} Specify the device to be used for logging syslogs.
• This step is required. If the device is not configured, then all
Example: other logging archive configurations are rejected.
RP/0/RP0/CPU0:router(config-logging-arch)#
device disk1
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
344 OL-24731-01
Implementing Logging Services
Archiving System Logging Messages to a Local Storage Device
Step 4 frequency {daily | weekly} (Optional) Specifies if logs are collected on a daily or weekly
basis.Logs are collected daily by default.
Example:
RP/0/RP0/CPU0:router(config-logging-arch)#
frequency weekly
Step 5 severity severity (Optional) Specifies the minimum severity of log messages to archive.
All syslog messages greater than or equal to this configured level are
Example: archived while those lesser than this are filtered out. The severity levels
are:
RP/0/RP0/CPU0:router(config-logging-arch)#
severity warnings • emergencies
• alerts
• critical
• errors
• warnings
• notifications
• informational
• debugging
See the Syslog Message Severity Level Definitions, on page 329 section
for information.
Step 6 archive-length weeks (Optional) Specifies the maximum number of weeks that the archive
logs are maintained in the archive. Any logs older than this number
Example: are automatically removed from the archive.
Step 7 archive-size size (Optional) Specifies the maximum total size of the syslog archives on
a storage device. If the size is exceeded then the oldest file in the
Example: archive is deleted to make space for new logs.
Step 8 file-size size (Optional) Specifies the maximum file size (in megabytes) that a single
log file in the archive can grow to. Once this limit is reached, a new
Example: file is automatically created with an increasing serial number.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 345
Implementing Logging Services
Configuration Examples for Implementing Logging Services
Configuring Logging to the Console Terminal and the Logging Buffer: Example
The following example shows a logging configuration where logging to the logging buffer is enabled, the
severity level of syslog messages sent to the console terminal is limited to syslog messages at or below the
critical severity level, and the size of the logging buffer is set to 60,000 bytes.
!
logging console critical
logging buffered 60000
!
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
346 OL-24731-01
Implementing Logging Services
Configuring the Settings for the Logging History Table: Example
!
logging trap warnings
logging monitor critical
logging buffered 60000
logging 172.19.72.224
!
The following example shows a time-stamp configuration in which time stamps are configured to follow the
format month date HH:MM:SS.milliseconds time zone:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# logging archive
RP/0/RP0/CPU0:router(config-logging-arch)# device disk1
RP/0/RP0/CPU0:router(config-logging-arch)# frequency weekly
RP/0/RP0/CPU0:router(config-logging-arch)# severity warnings
RP/0/RP0/CPU0:router(config-logging-arch)# archive-length 6
RP/0/RP0/CPU0:router(config-logging-arch)# archive-size 50
RP/0/RP0/CPU0:router(config-logging-arch)# file-size 10
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 347
Implementing Logging Services
Where to Go Next
Where to Go Next
To configure alarm log correlation, see the Implementing and Monitoring Alarms and Logging Correlation
module in the Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router.
Additional References
The following sections provide references related to implementing logging services on Cisco IOS XR software
.
Related Documents
Onboard Failure Logging (OBFL) configuration Onboard Failure Logging Commands module in the
Cisco IOS XR System Monitoring Configuration
Guide for the Cisco CRS Router.
Onboard Failure Logging (OBFL) commands Onboard Failure Logging Commands module in the
Cisco IOS XR System Monitoring Command
Reference for the Cisco CRS Router.
Alarm and logging correlation commands Alarm Management and Logging Correlation
Commands module in the Cisco IOS XR System
Monitoring Command Reference for the Cisco CRS
Router.
Alarm and logging correlation configuration and Implementing and Monitoring Alarms and Alarm Log
monitoring tasks Correlation module in the Cisco IOS XR System
Monitoring Configuration Guide for the Cisco CRS
Router.
Cisco IOS XR getting started material Cisco IOS XR Getting Started Guide for the
Cisco CRS Router
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
348 OL-24731-01
Implementing Logging Services
Additional References
Standards
Standards Title
No new or modified standards are supported by this —
feature, and support for existing standards has not
been modified by this feature.
MIBs
RFCs
RFCs Title
No new or modified RFCs are supported by this —
feature, and support for existing RFCs has not been
modified by this feature.
Technical Assistance
Description Link
The Cisco Technical Support website contains http://www.cisco.com/cisco/web/support/index.html
thousands of pages of searchable technical content,
including links to products, technologies, solutions,
technical tips, and tools. Registered Cisco.com users
can log in from this page to access even more content.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 349
Implementing Logging Services
Additional References
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
350 OL-24731-01
CHAPTER 5
Onboard Failure Logging
OBFL gathers boot, environmental, and critical hardware data for field-replaceable units (FRUs), and stores
the information in the nonvolatile memory of the FRU. This information is used for troubleshooting, testing,
and diagnosis if a failure or other error occurs, providing improved accuracy in hardware troubleshooting
and root cause isolation analysis. Stored OBFL data can be retrieved in the event of a failure and is accessible
even if the card does not boot.
Because OBFL is on by default, data is collected and stored as soon as the card is installed. If a problem
occurs, the data can provide information about historical environmental conditions, uptime, downtime, errors,
and other operating conditions.
Caution OBFL is activated by default in all cards. Do not deactivate OBFL without specific reasons, because the
OBFL data is used to diagnose and resolve problems in FRUs.
Note For information about OBFL commands, console logging, alarms, and logging correlation, see Related
Documents, on page 348.
Release Modification
Release 3.4.0 This feature was introduced.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 351
Onboard Failure Logging
Prerequisites
Prerequisites
You must be in a user group associated with a task group that includes the proper task IDs. The command
reference guides include the task IDs required for each command. If you suspect user group assignment is
preventing you from using a command, contact your AAA administrator for assistance.
This data is collected in two different ways: as baseline data and event- driven data:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
352 OL-24731-01
Onboard Failure Logging
Data Collection Types
An environmental reading is
logged when the following
temperature or voltage events
occur:
• Exceed the normal range
• Change more than 10%
• Return within range for more
than five minutes.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 353
Onboard Failure Logging
Supported Cards and Platforms
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
354 OL-24731-01
Onboard Failure Logging
Enabling or Disabling OBFL
Caution Do not deactivate OBFL without specific reasons since the OBFL data is used to diagnose and resolve
problems in FRUs.
There are no configuration requirements other than to enable and disable OBFL.
SUMMARY STEPS
1. admin
2. configure
3. hw-module {all | subslot node-id} logging onboard [disable | severity {alerts | emergencies}]
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# admin
Example:
RP/0/RP0/CPU0:router(admin)# configure
RP/0/RP0/CPU0:router(admin-config)#
Step 3 hw-module {all | subslot node-id} logging Configures the severity level for the syslog messages that are logged into
onboard [disable | severity {alerts | the OBFL storage device.
emergencies}]
• Use the severity keyword to specify the severity for the syslog message
that is logged into the OBFL storage device.
Example:
• Use the alerts keyword to specify that both emergency and alert syslog
RP/0/RP0/CPU0:router(admin-config)#
hw-module all logging onboard severity messages are logged. The default is the alerts keyword.
alerts
• Use the emergencies keyword to specify only the emergency syslog
messages are logged.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 355
Onboard Failure Logging
Configuring Message Severity Levels
SUMMARY STEPS
1. admin
2. configure
3. hw-module {all | subslot node-id} logging onboard [disable | severity {alerts | emergencies}]
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# admin
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
356 OL-24731-01
Onboard Failure Logging
Monitoring and Maintaining OBFL
Example:
RP/0/RP0/CPU0:router(admin)# configure
RP/0/RP0/CPU0:router(admin-config)#
Step 3 hw-module {all | subslot node-id} logging Configures the severity level for the syslog messages that are logged into
onboard [disable | severity {alerts | the OBFL storage device.
emergencies}]
• Use the severity keyword to specify the severity for the syslog message
that is logged into the OBFL storage device.
Example:
• Use the alerts keyword to specify that both emergency and alert syslog
RP/0/RP0/CPU0:router(admin-config)#
hw-module all logging onboard severity messages are logged. The default is the alerts keyword.
alerts
• Use the emergencies keyword to specify only the emergency syslog
messages are logged.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 357
Onboard Failure Logging
Clearing OBFL Data
SUMMARY STEPS
1. admin
2. show logging onboard [all | cbc {dump-all | dump-range {start-address | end-address | most-recent
{fans fan-tray-slot | [location node-id]} | diagnostic | environment | error | temperature | uptime |
verbose | voltage] [continuous | historical | static-data] [detail | raw | summary] [location node-id]
3. show processes include obfl
4. show running-config
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# admin
Step 2 show logging onboard [all | cbc {dump-all | dump-range Displays stored OBFL data for all nodes or for a
{start-address | end-address | most-recent {fans fan-tray-slot | specified node.
[location node-id]} | diagnostic | environment | error | See the Onboard Failure Logging Commands
temperature | uptime | verbose | voltage] [continuous | module in the Cisco IOS XR System Monitoring
historical | static-data] [detail | raw | summary] [location Command Reference for the Cisco CRS Router.
node-id]
Example:
RP/0/RP0/CPU0:router(admin)# show logging onboard uptime
Step 3 show processes include obfl Confirms that the OBFL environmental monitor
process is operating.
Example:
Example:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
358 OL-24731-01
Onboard Failure Logging
Configuration Examples for OBFL
Caution The clear logging onboard command permanently deletes all OBFL data for a node or for all nodes.
Do not clear the OBFL logs without specific reasons because the OBFL data is used to diagnose and
resolve problems in FRUs.
Caution If OBFL is actively running on a card, issuing the clear logging onboard command can result in a corrupt
or incomplete log at a later point in time. OBFL should always be disabled before this command is issued.
For more information, see the Onboard Failure Logging Commands module in the Cisco IOS XR System
Monitoring Command Reference for the Cisco CRS Router.
The following example shows that OBFL is enabled and message severity level is reset to the default:
The following example shows how to save the syslog message in which the severity level is set to 0 (emergency)
and 1 (alert) to a storage device:
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 359
Onboard Failure Logging
Clearing OBFL Messages: Example
-------------------------------------------------------------------------------
UPTIME CONTINUOUS DETAIL INFORMATION (Node: node0_7_CPU0)
-------------------------------------------------------------------------------
The first record : 01/05/2009 00:58:41
The last record : 01/17/2007916:07:13
Number of records : 478
File size : 15288 bytes
Current reset reason : 0x00
Current uptime : 0 years 0 weeks 0 days 3 hours 0 minutes
-------------------------------------------------------------------------------
Time Stamp |
MM/DD/YYYY HH:MM:SS | Users operation
-------------------------------------------------------------------------------
01/05/2009 01:44:35 File cleared by user request.
-------------------------------------------------------------------------------
Where to Go Next
To configure alarm log correlation, see the Implementing and Monitoring Alarms and Logging Correlation
module in the Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router.
Additional References
The following sections provide references related to implementing logging services on Cisco IOS XR software
.
Related Documents
Onboard Failure Logging (OBFL) configuration Onboard Failure Logging Commands module in the
Cisco IOS XR System Monitoring Configuration
Guide for the Cisco CRS Router.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
360 OL-24731-01
Onboard Failure Logging
Additional References
Alarm and logging correlation commands Alarm Management and Logging Correlation
Commands module in the Cisco IOS XR System
Monitoring Command Reference for the Cisco CRS
Router.
Alarm and logging correlation configuration and Implementing and Monitoring Alarms and Alarm Log
monitoring tasks Correlation module in the Cisco IOS XR System
Monitoring Configuration Guide for the Cisco CRS
Router.
Cisco IOS XR getting started material Cisco IOS XR Getting Started Guide for the
Cisco CRS Router
Information about user groups and task IDs Configuring AAA Services module in the
Cisco IOS XR System Security Command Reference
for the Cisco CRS Router.
Standards
Standards Title
No new or modified standards are supported by this —
feature, and support for existing standards has not
been modified by this feature.
MIBs
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 361
Onboard Failure Logging
Additional References
RFCs
RFCs Title
No new or modified RFCs are supported by this —
feature, and support for existing RFCs has not been
modified by this feature.
Technical Assistance
Description Link
The Cisco Technical Support website contains http://www.cisco.com/cisco/web/support/index.html
thousands of pages of searchable technical content,
including links to products, technologies, solutions,
technical tips, and tools. Registered Cisco.com users
can log in from this page to access even more content.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
362 OL-24731-01
CHAPTER 6
Implementing Performance Management
Performance management (PM) on the Cisco IOS XR Software provides a framework to perform the following
tasks:
• Collect and export PM statistics to a TFTP server for data storage and retrieval
• Monitor the system using extensible markup language (XML) queries
• Configure threshold conditions that generate system logging messages when a threshold condition is
matched.
The PM system collects data that is useful for graphing or charting system resource utilization, for capacity
planning, for traffic engineering, and for trend analysis.
Note For more information about PM on the Cisco IOS XR software and complete descriptions of the PM
commands listed in this module, you can refer to the Related Documents, on page 404 section of this
module.
Release Modification
Release 2.0 This feature was introduced.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 363
Implementing Performance Management
Prerequisites for Implementing Performance Management
PM Functional Overview
The PM frameworks consists of two major components:
• PM statistics server
• PM statistics collectors
PM Statistics Server
The PM statistics server is the front end for statistic collections, entity instance monitoring collections, and
threshold monitoring. All PM statistic collections and threshold conditions configured through the command-line
interface (CLI) or through XML schemas are processed by the PM statistics server and distributed among the
PM statistics collectors.
PM Statistics Collector
The PM statistics collector collects statistics from entity instances and stores that data in memory. The memory
contents are checkpointed so that information is available across process restarts. In addition, the PM statistics
collector is responsible for exporting operational data to the XML agent and to the TFTP server.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
364 OL-24731-01
Implementing Performance Management
PM Statistics Collection Overview
Figure 7: PM Component Communications, on page 365illustrates the relationship between the components
that constitute the PM system.
PM Benefits
The PM system provides the following benefits:
• Configurable data collection policies
• Efficient transfer of statistical data in the binary format via TFTP
• Entity instance monitoring support
• Threshold monitoring support
• Data persistency across process restarts and processor failovers
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 365
Implementing Performance Management
PM Statistics Collection Overview
example, a Multiprotocol Label Switching (MPLS) Label Distribution Protocol (LDP) statistics collection
gathers statistical data from all the attributes associated with all MPLS LDP sessions on the router.
This table lists the entities and the associated instances in the PM system.
OSPFv2 Processes
OSPFv3 Processes
Note For a list of all attributes associated with the entities that constitute the PM system, see Table 43: Attributes
and Values, on page 380.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
366 OL-24731-01
Implementing Performance Management
PM Statistics Collection Overview
• You can define multiple templates for any given entity; however, only one PM statistics collection
template for a given entity can be enabled at a time.
• When configuring a template, you must name the template. You can designate the template for the entity
as the default template using the default keyword or name the template with the template keyword and
template-name argument. The default template contains the following default settings:
◦A sample interval of 10 minutes.
◦A sample size of five sampling operations.
• Configure the settings for the sample interval and sample size in the template.
◦The sample interval sets the frequency of the sampling operations performed during the sampling
cycle. You can configure the sample interval with the sample-interval keyword and minutes
argument. The range is from 1 to 60 minutes. The default is 10 minutes.
◦The sample size sets the number of sampling operations to be performed before exporting the data
to the TFTP server. You can configure the sample size with the sample-size keyword and minutes
argument. The range is from 1 to 60 samples. The default is five samples.
• The export cycle determines how often PM statistics collection data is exported to the TFTP server. The
export cycle can be calculated by multiplying the sample interval and sample size (sample interval x
sample size = export cycle). For example, suppose that the sample interval is set at a frequency of 10
minutes, and the sample size is set to five sampling operations. Given that, a total of five sampling
operations would be performed at a frequency of one sampling operation every 10 minutes. This cycle
is referred to as the sampling cycle. A binary file containing the data collected from those samples would
be exported to the TFTP server once every 50 (5 x 10) minutes. This cycle is referred to as the export
cycle.
Caution Specifying a small sample interval increases CPU utilization, whereas specifying a large sample size
increases memory utilization. The sample size and sample interval, therefore, may need to be adjusted to
prevent system overload.
Note Data collection will begin one sampling cycle after you enable the PM statistics collection template with
the performance-mgmt enable statistics command.
• Once a template has been enabled, the sampling and export cycles continue until the template is disabled
with the no form of the performance-mgmt apply statistics command.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 367
Implementing Performance Management
PM Statistics Collection Overview
• You must specify either a location with the location keyword and node-id argument or the location all
keywords when enabling or disabling a PM statistic collections for the following entities:
◦Node CPU
◦Node memory
◦Node process
The location keyword with the node-id argument enables the PM statistic collections for the specified
node. The node-id argument is expressed in the rack/slot/module notation. The location all keywords
enable the PM statistic collections for all nodes.
• Because only one PM statistics collection can be enabled for any given entity at any given time, you are
not required to specify the template name with the default keyword or template keyword and
template-name argument when disabling a PM statistics collection.
You can dump PM statistics collections onto local filesystem, for example, /disk0: or /harddisk:. By default,
this location is not configured but PM automatically selects the location on the local filesystem. Or, you can
also configure a TFTP server for PM statistics collections and export the statistics data on the remote location.
Note Both the local and TFTP destinations are mutually exclusive and you can configure either one of them at
a given time.
Version : 4 Bytes
NoOf Entities : 1 Byte (e.g. . 4 )
Entity Identifier : 1 Byte (e.g NODE=1,Interface=2,BGP=3)
Options :2 Bytes
NoOf SubEntities :1 Byte (2)
SubEntity Identifier :1 Byte (e.g BGP-PEERS )
Time Stamp 4 Bytes (Reference Time : Start Ref Time)
No Of Instances :2 Byte (e.g 100)
Key Instance :Variable
NoOfSamples: 1 Byte (e.g 10 Samples)
SampleNo : 1 Byte (e.g Sample No 1)
Time Stamp 4 Bytes (Sample Time)
StatCounterName :1 Byte (PeerSessionsEst=1)
StatCounterValue :8 Bytes ( for all counters)
Repeat for Each StatCounterName
Repeat for Each Sample No(Time Interval)
Repeat for All Instances
Repeat for All SubTypes
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
368 OL-24731-01
Implementing Performance Management
PM Statistics Collection Overview
Reserved (2) —
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 369
Implementing Performance Management
PM Statistics Collection Overview
Note <ifName>—The length is variable. The first two bytes contain the size of the Instance ID; this is followed
by the Instance ID string (that is, an Interface name).
<IpAddress>—4 bytes that contain the IP address.
<NodeProcessID>—64-bit Instance ID. The first 32 bits contain the node ID, and the second 32 bits
contain the process ID.
<NodeID>—32-bit instance ID that contains the Node ID.
<process_instance>—The length is variable. The first two bytes contain the size of Instance ID followed
by Instance ID string (that is, a process name).
Note The numbers in parenthesis (the numbers that are associated with each entity and subentity in Table 36:
Binary Format Values and Keys, on page 369 ) denote the entity and subEntity IDs that are displayed in
the TFTP File.
This table describes the supported statistics counters that are collected in the binary file for entities and
subentities.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
370 OL-24731-01
Implementing Performance Management
PM Statistics Collection Overview
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 371
Implementing Performance Management
PM Entity Instance Monitoring Overview
Note The data from entity instance monitoring can be retrieved through only a XML interface.
This table describes the command used to enable entity instance monitoring for the BGP entity instance.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
372 OL-24731-01
Implementing Performance Management
PM Entity Instance Monitoring Overview
This table describes the commands used to enable entity instance monitoring for the interface entity instances.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 373
Implementing Performance Management
PM Entity Instance Monitoring Overview
Interface Generic Counters Use the performance-mgmt apply monitor interface generic-counters
command in global configuration mode to enable entity instance monitoring
for an interface generic counters entity instance.
Syntax:
performance-mgmt
apply
monitor
interface
generic-counters
type
interface-path-id {template-name |
default}
RP/0/RP0/CPU0:router(config)# performance-mgmt apply monitor
interface generic-counters gigabitethernet POS 0/2/0/0 default
This table describes the command used to enable entity instance monitoring for the MPLS entity instances.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
374 OL-24731-01
Implementing Performance Management
PM Entity Instance Monitoring Overview
This table describes the commands used to enable entity instance monitoring for the Node entity instances.
Node Memory Use the performance-mgmt apply monitor node memory command
in global configuration mode to enable an entity instance monitoring for
a node memory entity instance.
Syntax:
performance-mgmt
apply
monitor
node
memory
location
node-id {template-name |
default}
RP/0/RP0/CPU0:router(config)# performance-mgmt apply monitor
node memory location 0/RP1/CPU0 default
Node Process Use the performance-mgmt apply monitor node process command in
global configuration mode to enable an entity instance monitoring collection
for a node process entity instance.
Syntax:
performance-mgmt
apply monitor node
process
location
node-id
pid {template-name | default}
RP/0/RP0/CPU0:router(config)# performance-mgmt apply monitor
node process location p 0/RP1/CPU0 275 default
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 375
Implementing Performance Management
PM Threshold Monitoring Overview
Note For a list of the attributes associated with each entity, refer to Table 43: Attributes and Values, on page
380.
• Configure the sample interval for PM threshold monitoring with the sample-interval keyword and
interval argument. The sample interval sets the frequency (in minutes) that the PM system waits before
determining if any instances of the attribute match the threshold condition.
• Specify the threshold condition for the attribute (or attributes) that are to be monitored. A threshold
condition consists of an attribute, an operation, and the threshold value. The threshold condition applies
to all instances of the attribute.
Note A PM threshold template may contain multiple threshold conditions. You must define each threshold
condition that is to be monitored and apply it to the specified template with the performance-mgmt
thresholds command.
• Specify the operation to be performed in the threshold condition. The supported operations are as follows:
◦EQ —Equal to
◦GE —Greater than or equal to
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
376 OL-24731-01
Implementing Performance Management
PM Threshold Monitoring Overview
• Specify a value for the value argument. If you express the value argument, the PM system considers
the threshold condition absolute, and after each sample interval determines whether any instance of the
attribute matches the threshold condition. If you specify the not in range operation with the RG keyword,
you must supply a pair of values that specify the range.
• If you specify the optional percent keyword, the value argument must be expressed as a percentage
from 0 to 100. If you express the value as a percentage with the value argument and percent keyword,
the threshold condition compares the value with the difference between the current and previous sample
for each instance of attribute as a percentage.
• You can also specify the optional rearm toggle keywords or the optional rearm window keywords and
window-size argument:
◦rearm toggle — Suppresses system logging messages for an instance of an attribute when an
instance of the attribute matches the threshold condition. System logging messages for that instance
of the attribute are suppressed in successive sample intervals until that instance of the attribute
does not match the threshold condition.
◦rearm window window-size —Suppresses system logging messages for the number of intervals
specified for the window-size argument when an instance of attribute matches the threshold
condition.
Note For more information about how the PM system determines whether a threshold condition
is met, refer to Table 42: How the PM System Determines if a Threshold Condition Is
Met, on page 377.
This table describes how the PM system determines whether a threshold condition is met.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 377
Implementing Performance Management
PM Threshold Monitoring Overview
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
378 OL-24731-01
Implementing Performance Management
PM Threshold Monitoring Overview
...an attribute, an operation, a specific value, and The threshold condition is modified such that if an
the rearm toggle keywords... instance of an attribute matches the threshold
condition, a system logging message is generated
for that instance of the attribute, after the sample
interval elapses. However, if the same instance of
the attribute matches the threshold condition in
successive sample intervals following the initial
match, system logging messages for that instance
of the attribute are suppressed until the instance
does not match the threshold condition for a sample
interval.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 379
Implementing Performance Management
PM Threshold Monitoring Overview
This table describes the attributes and value ranges associated with each attribute for all the entities that
constitute the PM system.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
380 OL-24731-01
Implementing Performance Management
PM Threshold Monitoring Overview
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 381
Implementing Performance Management
PM Threshold Monitoring Overview
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
382 OL-24731-01
Implementing Performance Management
PM Threshold Monitoring Overview
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 383
Implementing Performance Management
PM Threshold Monitoring Overview
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
384 OL-24731-01
Implementing Performance Management
PM Threshold Monitoring Overview
TotalMsgsRcvd
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 385
Implementing Performance Management
PM Threshold Monitoring Overview
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
386 OL-24731-01
Implementing Performance Management
PM Threshold Monitoring Overview
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 387
Implementing Performance Management
PM Threshold Monitoring Overview
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
388 OL-24731-01
Implementing Performance Management
How to Implement Performance Management
The location keyword and node-id argument enables or disables PM statistic collections for the specified
node. The node-id argument is expressed in the rack/slot/module notation. The location all keywords
enable or disable the PM statistic collections for all nodes.
• Because only one PM threshold monitoring template for an entity at any given time, you are not required
to specify the template name with the default keyword or template keyword and template-name argument
when disabling a PM statistics collection.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 389
Implementing Performance Management
Configuring an External TFTP Server for PM Statistic Collections
Note Perform this task before enabling a PM statistics collection template for PM statistic collections. For more
information about enabling a PM statistics collection templates, see the Enabling and Disabling PM
Statistics Collection Templates, on page 395 task.
SUMMARY STEPS
1. configure
2. performance-mgmt resources tftp-server ip-address directory dir-name
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 performance-mgmt resources tftp-server ip-address Sets the IP address and the directory path for PM data collection.
directory dir-name
• Include the entire directory path name for the dir-name
argument.
Example:
RP/0/RP0/CPU0:routerRP/0/RP0/CPU0:router(config)# Note Files copied to the TFTP server contain a timestamp in
performance-mgmt resources tftp-server their name, which makes them unique. For that reason
10.3.40.161 directory mypmdata/datafiles
the TFTP server used should support creation of files
as data is transferred, without requiring users to
manually create them at the TFTP server host in
advance.
Step 3 Use one of these commands: Saves configuration changes.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
390 OL-24731-01
Implementing Performance Management
Configuring Local Disk Dump for PM Statistics Collections
SUMMARY STEPS
1. configure
2. performance-mgmt resources dump local
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 391
Implementing Performance Management
Configuring Instance Filtering by Regular-expression
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
392 OL-24731-01
Implementing Performance Management
Configuring Instance Filtering by Regular-expression
SUMMARY STEPS
1. configure
2. performance-mgmt regular-expression regular-expression name
3. index index-number regular-expression-string
4. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 performance-mgmt regular-expression Sets a defined regular expression group to one or more statistics or
regular-expression name threshold template.
Note By default, no regular expression group is configured. Once
Example: the regular expression group is configured, you can apply
RP/0/RP0/CPU0:router(config)# it to multiple templates.
performance-mgmt regular-expression regexp
Step 3 index index-number regular-expression-string Specifies a regular expression index to the defined group.
Note The Instance filtering by regular-expression is currently
Example: supported in interface entities only (Interface basic-counters,
RP/0/RP0/CPU0:router(config-perfmgmt-regex)# generic-counters, data-rates.
index 10 match
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 393
Implementing Performance Management
Creating PM Statistics Collection Templates
SUMMARY STEPS
1. configure
2. performance-mgmt statistics entity {default | template template-name} [sample-size size]
[sample-interval minutes]
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 performance-mgmt statistics entity Creates a PM statistics collection template for the specified entity.
{default | template template-name}
[sample-size size] [sample-interval • Use the entity argument to specify the entity for which you want to create a PM
statistics collection template.
minutes]
• Use the default keyword to apply the default template to the PM statistics
Example: template for the specified entity. The default template contains a default sample
interval of 10 minutes and a default sample size of 5 sampling operations.
RP/0/RP0/CPU0:router(config)# • Use the template keyword and template-name argument to designate a unique
performance-mgmt statistics
interface data-rates default name for a template.
• The sample-size keyword and size argument set the number of sampling
operations to be performed before exporting the data to the TFTP server. The
range is from 1 to 60 samples. The default is 5 samples.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
394 OL-24731-01
Implementing Performance Management
Enabling and Disabling PM Statistics Collection Templates
Note For more information about creating PM collection templates, see the
Guidelines for Creating PM Statistics Collection Templates, on page 366
section.
Step 3 Use one of these commands: Saves configuration changes.
• end • When you issue the end command, the system prompts you to commit changes:
• commit
Uncommitted changes found, commit them
before exiting(yes/no/cancel)? [cancel]:
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
What to Do Next
After creating a PM statistics collection template, you must enable the template to start the PM statistics
collection. See the Enabling and Disabling PM Statistics Collection Templates, on page 395 section for more
information about enabling PM statistics collection templates.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 395
Implementing Performance Management
Enabling and Disabling PM Statistics Collection Templates
SUMMARY STEPS
1. configure
2. Do one of the following:
• performance-mgmt apply statistics {entity | interface {basic-counters | data-rates |
generic-counters} type interface-path-id } [ location {all | node-id}] {template-name | default}
• no performance-mgmt apply statistics {entity | interface {basic-counters | data-rates |
generic-counters} type interface-path-id } [location {all | node-id}]
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
396 OL-24731-01
Implementing Performance Management
Enabling and Disabling PM Statistics Collection Templates
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 397
Implementing Performance Management
Enabling PM Entity Instance Monitoring
SUMMARY STEPS
1. configure
2. performance-mgmt apply monitor {entity instance | interface {basic-counters | data-rates |
generic-counters} type interface-path-id } {template-name | default}
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 performance-mgmt apply monitor {entity Enables entity instance monitoring for the specified instance.
instance | interface {basic-counters |
data-rates | generic-counters} type • Use the entity and instance arguments to specify the name of the entity
and the instance to be monitored, respectively.
interface-path-id } {template-name | default}
• Use either the default keyword or the template-name argument to
Example: specify the template associated with the entity instance to be
monitored.
RP/0/RP0/CPU0:router(config)#
performance-mgmt apply monitor node cpu
0/RP1/CPU0 default
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
398 OL-24731-01
Implementing Performance Management
Creating PM Threshold Monitoring Templates
SUMMARY STEPS
1. configure
2. performance-mgmt thresholds {entity | interface {basic-counters |data-rates | generic-counters} type
interface-path-id } {template name } attribute operation value [value2] [percent] [rearm {toggle |
window window-size}]
3. Use one of these commands:
• end
• commit
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 399
Implementing Performance Management
Enabling and Disabling PM Threshold Monitoring Templates
Example:
RP/0/RP0/CPU0:router(config)#
performance-mgmt thresholds node cpu
template cpu_thresh1
RP/0/RP0/CPU0:router(config-threshold-bgp)#
AverageCPUUsed GT 25 percent
What to Do Next
After creating a PM threshold monitoring template, you must enable the template to start PM threshold
monitoring. Refer to the Enabling and Disabling PM Threshold Monitoring Templates, on page 400 task for
more information about enabling PM statistics threshold monitoring templates.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
400 OL-24731-01
Implementing Performance Management
Enabling and Disabling PM Threshold Monitoring Templates
SUMMARY STEPS
1. configure
2. Do one of the following:
• performance-mgmt apply thresholds {entity | interface {basic-counters | data-rates |
generic-counters} type interface-path-id } [location {all | node-id}] {template-name | default}
• no performance-mgmt apply thresholds {entity| interface {basic-counters | data-rates |
generic-counters} type interface-path-id } [location {all | node-id}]
DETAILED STEPS
Example:
RP/0/RP0/CPU0:router# configure
Step 2 Do one of the following: Enables or disables PM threshold monitoring templates for the specified template.
• performance-mgmt apply • Only one PM threshold monitoring template for an entity can be enabled at
thresholds {entity | interface a time.
{basic-counters | data-rates |
• You must specify either a location with the location keyword and node-id
generic-counters} type
argument or the locationall keywords when enabling a PM threshold
interface-path-id } [location {all |
monitoring template for these entities:
node-id}] {template-name | default}
◦Node CPU
• no performance-mgmt apply
thresholds {entity| interface ◦Node memory
{basic-counters | data-rates |
generic-counters} type ◦Node process
interface-path-id } [location {all |
node-id}] The location keyword with the node-id argument enables the PM threshold
monitoring template for the specified node. The node-id argument is
expressed in the rack/slot/module notation. The location all keywords enable
the PM threshold monitoring template for all nodes.
Example:
• Because only one PM threshold monitoring template for an entity at any
RP/0/RP0/CPU0:router(config)# given time, you are not required to specify the template name with the default
performance-mgmt enable thresholds
node cpu location all template20 keyword or template keyword and template-name argument when disabling
a PM statistics collection.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 401
Implementing Performance Management
Enabling and Disabling PM Threshold Monitoring Templates
The location keyword with the node-id argument disables the PM threshold
monitoring template for the specified node. The node-id argument is expressed in
the rack/slot/module notation. The location all keywords disable the PM threshold
monitoring template for all nodes.
• Because only one PM threshold monitoring template for an entity can be
enabled at a time, you are not required to specify the template name with
default keyword or template-name argument when disabling a PM statistics
collection.
• Use the commit command to save the configuration changes to the running
configuration file, and remain within the configuration session.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
402 OL-24731-01
Implementing Performance Management
Configuration Examples for Implementing Performance Management
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 403
Implementing Performance Management
Additional References
Additional References
The following sections provide references related to implementing performance management.
Related Documents
Cisco IOS XR Software XML API material Cisco IOS XR XML API Guide for the Cisco CRS
Router
Cisco IOS XR Software getting started material Cisco IOS XR Getting Started Guide for the
Cisco CRS Router
Information about user groups and task IDs Configuring AAA Services on the Cisco IOS XR
Software module in the Cisco IOS XR System
Security Configuration Guide for the Cisco CRS
Router
Standards
Standards Title
No new or modified standards are supported by this —
feature, and support for existing standards has not
been modified by this feature.
MIBs
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
404 OL-24731-01
Implementing Performance Management
Additional References
RFCs
RFCs Title
No new or modified RFCs are supported by this —
feature, and support for existing RFCs has not been
modified by this feature.
Technical Assistance
Description Link
The Cisco Technical Support website contains http://www.cisco.com/cisco/web/support/index.html
thousands of pages of searchable technical content,
including links to products, technologies, solutions,
technical tips, and tools. Registered Cisco.com users
can log in from this page to access even more content.
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 405
Implementing Performance Management
Additional References
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
406 OL-24731-01
INDEX
A C
about 219 capacity threshold setting 8
action command 295 clear logging correlator delete all-in-buffer command 29, 30
logging keyword 295 clear logging correlator delete command 29
trigger keyword 295 clear logging events delete event-hi-limit 39
Additional References command 52, 112, 317, 348, 360, 404 clear logging events delete first event-count command 39, 40
ageout command 229, 238, 246, 254, 262 clear logging events delete group message-group command 39,
ICMP Echo operation 246 40
ICMP Path Echo operation 254 clear logging events delete last event-count command 39, 40
ICMP Path Jitter operation 262 clear logging events delete timestamp-lo-limit 39
UDP Echo operation 238 clear logging events reset all-in-buffer command 39, 40
UDP Jitter operation 229 Clearing OBFL Messages 360
Alarm Logging and Debugging Event Management System 3 Example command 360
see ALDEMS 3 command defaults 329
alarms 7, 8 commands used to control 328
bi-state alarms 7 Configuration Examples for Alarm Management and Logging
capacity threshold setting 8 Correlation command 47
severity level 7 Configuration Examples for Event Management Policies
severity level and filtering 7 command 101
ALDEMS 3 Configuration Examples for Implementing IP Service Level
ALDEMS (Alarm Management and Debugging Event System), Agreements command 315
description 3 Configuration Examples for Implementing Logging Services
and IP SLA Control Protocol 219 command 346
applying 11, 20, 22 Configuration Examples for Implementing Performance
archiving 326 Management on Cisco IOS XR Software command 403
archiving messages 326, 343 Configuration Examples for OBFL command 359
archiving system logging messages 326, 343 Configuration Examples for Writing Embedded Event Manager
averaged threshold violation 288 Policies Using Tcl command 102
configuring 11, 330, 333, 335
logging buffer 335
logging history table 333
B logging to a remote server 330
benefits 216, 365 logging to the console 335
benefits, IP SLA 216 message destinations 330
bi-state alarms 7 Configuring a Logging Archive 347
binary file id 369 Example command 347
buckets command 232
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 IN-1
Index
Configuring a Nonstateful Correlation Rule to Permanently destination port command 229, 238
Suppress Node Status Messages 47 UDP Echo operation 238
Example command 47 UDP Jitter operation 229
Configuring a Stateful Correlation Rule for LINK UPDOWN destinations 323
and SONET ALARM Alarms 49 disabling 367, 389, 395, 400
Example command 49 disabling the logging of link-status messages 341
Configuring IP Service Level Agreements 315 Display Available Policies 101
Example command 315 Example command 101
Configuring IP SLA MPLS LSP Monitoring 316 Display Embedded Event Manager Process 101
Example command 316 Example command 101
Configuring IP SLA Reactions and Threshold Monitoring 315 Displaying OBFL Data 360
Example command 315 Example command 360
configuring logging to the console 335 displaying system logging messages 342
Configuring Logging to the Console Terminal and the Logging distribution count command 232
Buffer 346 distribution interval command 232
Example command 346
Configuring LSP Path Discovery 317
Example command 317
Configuring Message Severity Levels 359
E
Example command 359 EEM Event Detector Demo 102
configuring the logging buffer 335 Example command 102
configuring the logging history table 333 enabling 225, 367, 389, 395, 398, 400
Configuring the Settings for the Logging History Table 347 Enabling Alarm Source Location Display Field for Bistate
Example command 347 Alarms 51
connection-loss keyword 280 Example command 51
consecutive threshold violation 288 Enabling and Disabling OBFL 359
control protocol 219 Example command 359
control protocol, IP SLA 219 enabling logging for the current terminal session 324
correlated message 6 Environmental Variables Configuration 101
creating 366, 376, 394, 398, 399 Example command 101
Creating and Enabling PM Statistics Collection Templates 403 error messages 329
Example command 403 levels 329
Creating and Enabling PM Threshold Monitoring Templates 403 logging keywords 329
Example command 403 (table) 329
current terminal session, enabling logging for 324 logging keywords (table) 329
event manager environment command 70
event manager policy command 73
D example 225
Exporting Statistics Data 368
datasize request command 232, 241, 249, 257, 266
ICMP Echo operation 249
ICMP Path Echo operation 257
ICMP Path Jitter operation 266
F
UDP Echo operation 241 facility types 325
UDP Jitter operation 232 (table) 325
definitions 329 fault manager policies 71, 72
description 225, 366 persist-time 72
destination address command 229, 238, 246, 254, 262 registering 71
ICMP Echo operation 246 fault manager policy command 72
ICMP Path Echo operation 254 format 320
ICMP Path Jitter operation 262 frequency (IP SLA) command 229, 238, 246, 254, 262
UDP Echo operation 238 ICMP Echo operation 246
UDP Jitter operation 229 ICMP Path Echo operation 254
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
IN-2 OL-24731-01
Index
J
I jitter-average keyword 281
ICMP Echo operation 246, 249
ICMP Path Echo operation 254, 257
ICMP Path Jitter operation 262, 266 L
ICMP Path Jitter operation parameters, list of 261
immediate threshold violation 288 levels 329
improvements, list of 215 life command 229, 238, 246, 254, 262
Increasing the Severity Level for Alarm Filtering to Display ICMP Echo operation 246
Fewer Events and Modifying the Alarm Buffer Size ICMP Path Echo operation 254
and Capacity Threshold 47 ICMP Path Jitter operation 262
Example command 47 UDP Echo operation 238
insertion and removal 5 UDP Jitter operation 229
see OIR 5 logging buffer 335
instance filtering, configuring 392 logging correlation 5, 49
introduction 213 correlation rules, configuring 49
IP SLA 213, 214, 215, 216, 218, 219, 220, 221, 225 logging correlation rules 5, 11, 20, 22
benefits 216 applying 11, 20, 22
control protocol 219 configuring 11
improvements, list of 215 logging correlator apply rule command 21
introduction 213 logging correlator apply-rule command 23
operation, types of 218 logging correlator buffer 28
performance measurement 216 buffer settings, modifying 28
reaction 221 logging correlator buffer-size command 29
reaction, how to 221 logging correlator rule command 15, 17
responder 219, 225 logging events buffer 5, 26
about 219 buffer settings, modifying 26
enabling 225 logging events buffer-size command 27
response time 220 logging events level command 27, 28
schedule 221 logging events threshold command 27
technology 214 logging history table 328, 333
threshold monitoring 221 logging keyword 295
vrf 220 logging keywords 329
ipsla operation command 229, 238, 246, 254, 262 (table) 329
ICMP Echo operation 246 logging keywords (table) 329
ICMP Path Echo operation 254 logging process 5
ICMP Path Jitter operation 262 logging to a remote server 330
UDP Echo operation 238 logging to the console 335
UDP Jitter operation 229 LSP Path Discovery (LPD) 224
ipsla reaction operation command 221 lsr-path command 257
ipsla reaction trigger command 295
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 IN-3
Index
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
IN-4 OL-24731-01
Index
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
OL-24731-01 IN-5
Index
T V
tag command 241, 249, 257, 266 verify-error keyword 286
ICMP Echo operation 249 vrf 220
ICMP Path Echo operation 257 vrf, IP SLA 220
ICMP Path Jitter operation 266
UDP Echo operation 241
technology 214
technology, IP SLA 214 X
TFTP server, configuring 390 X of Y threshold violation 288
threshold monitoring 221
threshold monitoring, IP SLA 221
Cisco IOS XR System Monitoring Configuration Guide for the Cisco CRS Router, Release 4.1
IN-6 OL-24731-01