SNMP Cisco
SNMP Cisco
SNMP Cisco
NETWORK ELEMENTS
NMS-A01
Benoit Claise
• NOT about
Fault Management Return On Investment
A level 1 type of presentation
Marketing slides
Polling the device to “discover” the fault
Fault Management Applications details
• About
Features, tricks, information, examples, etc.
on “How to generate the right events from your
network elements!”
Polling Event
OID for
linkDown
4
5
Trap PDU 1.3.6.1.2.1.11.0.2
linkDown Notification Delivered to the NMS
• SNMP trap notification contains:
Varbinds: ifIndex, ifDescr, ifType, ifLocReason
• OID: linkDown notification
NMS-A01 © 2005 Cisco Systems, Inc. All rights reserved. 9
How to Enable SNMP Traps Notification?
• On a Cisco router:
• On a Cisco switch:
linkDown
ifIndex.4 4
Cisco Redefinition
ifDescr.4 Serial 1/2
CISCO-GENERAL-TRAPS
ifType .4 propPointToPointSerial(22)
locIfReason.4 keepalive failed
Instance 4
Serial 1/2
linkDown
IETF Notification
ifIndex.4 4
ifAdminStatus.4 Down
IF-MIB
(RFC2233/RFC2863)
ifOperStatus.4 lowerLayerDown
Eth0 (10.1.1.1)
SNMP SNMP
Agent Manager
S0
L0
Or even better
Traps Informs
Resources x X
Source Interface
Source Configuration
Not Implemented
SNMPv2-Notification-PDU sysUpTime
in the Device
Fan Failure
Syslog
Agent
Receiver
2
1
• On a Cisco router:
Router(config)# logging on
Router(config)# logging <server_ip_address>
Router(config)# logging facility local6
Router(config)# service sequence-numbers
Router(config)# service timestamps log [datetime
| uptime]
Router(config)# service timestamps log datetime
[msec] [localtime] [show-timezone] [year]
Eth0 (10.1.1.1)
Syslog Syslog
Agent Manager
S0
• Why?
Not all error messages are supported via notifications
Syslog daemon not running in the NMS
Events correlation need
• Send a trap/inform from the CISCO-SYSLOG-MIB
when a new Syslog message is generated
• How to convert to a trap?
Router (config)# snmp-server enable traps syslog
<ios-log-msg>
<facility>SYS</facility>
<severity>5</severity>
<msg-id>CONFIG_I</msg-id>
<seq>000013</seq>
<time>*Oct 11 14:52:10.039</time>
<args>
<arg id="0">console</arg>
<arg id="1">vty0 (172.19.208.14)</arg>
</args>
</ios-log-msg>
Syslog Notification
NMS Syslog Daemon Trap Receiver
Protocol/ UDP 514 UDP 162
Port
Filtering Yes Limited
Easy-to-Read Format, More Rigid Format,
Format No MIB Needed Parse Able
None (RFC 3195
None with Traps
Reliable Syslog)
Reliability Some with Informs
(Syslog Writing to
(NOTIFICATION-LOG MIB)
Flash)
Note: the Syslog message could be sent faster!
NMS-A01 © 2005 Cisco Systems, Inc. All rights reserved. 38
EMBEDDED SYSLOG MANAGER
• Post-process
ESM Syslog messages
Modules with selected ESM
filters (proactive
rules-based
analysis)
• User definable
scripting (TCL)
• New message
queue in parallel
with classic
Syslog
• Available in
images with TCL
Buffer Console tty Syslog Server 8.3.4, in 12.3(2)T,
12.2(25)S
NMS-A01 © 2005 Cisco Systems, Inc. All rights reserved. 40
Embedded Syslog Manager (ESM)
Configuration Example
Load RMON-MIB
High CPU!!
SNMP
NMS
Agent
2
Alert!! Alert!!
Threshold Threshold
Thresholds Violation
>80%
No Alert Violation
>80%
Rising 80%
Falling 40%
T Alert!!
Threshold
violation <40%
Send a trap when the number of bytes going into interface with
ifIndex 12, during the last two minutes is above 140000000
snmpset -c private <router> eventStatus.123 integer 2
snmpset -c private <router> eventDescription.123 string “above 140000000“
snmpset -c private <router> eventType.123 integer 4
snmpset -c private <router> eventCommunity.123 string "public“
snmpset -c private <router> eventOwner.123 string "event_owner“
snmpset -c private <router> eventStatus.123 integer 1
snmpset -c private <router> alarmStatus.321 integer 4
snmpset -c private <router> alarmStatus.321 integer 2
snmpset -c private <router> alarmInterval.321 integer 120
snmpset -c private <router> alarmVariable.321 integer ifInOctets.12
Snmpset –c private <router> alarmSampleType.321 integer 1
snmpset -c private <router> alarmRisingThreshold.321 integer 140000000
snmpset -c private <router> alarmRisingEventIndex.321 integer 123
snmpset -c private <router> alarmOwner.321 string "alarm_owner"
snmpset -c private <router> alarmStatus.321 integer 1
NMS-A01 © 2005 Cisco Systems, Inc. All rights reserved. 51
Which MIB Variables to Monitor?
dot3StatsCarrierSenseErrors bufferFail
ciscoEnvMonTemperatureState
cpmCPUTotal5min
ifOutDiscards ciscoEnvMonFanState
bufferNoMem
locIfResets
locIfCollisions
locIfCollisions ifOperStatus
ciscoMemoryPoolFree
locIfInputQueueDrops
locIfCarTrans
locIfInCRC
bufferFail
locIfOutputQueueDrops
Interface
Poll Thres-
Object Descr OID
Int hold
Number of Times the
locIfResets .1.3.6.1.4.1.9.2.2.1.1.17 15 Min
Interface Internally Reset
The Current Operational
State of the Interface; the
ifOperStatus Testing (3) State Indicates .1.3.6.1.2.1.2.2.1.8 5 Min != 1
That No Operational Packets
Can Be Passed
Number of Times
locIfCarTrans Interface Saw the Carrier .1.3.6.1.4.1.9.2.2.1.1.21 15 Min
Signal Transition
• ifIndex persistence
Router
• RMON persistence
Router: event/alarm saved in the startup configuration
Switch: no event/alarm persistence
LinkDown!!
E0
SNMP S1 NMS
Agent
1 2
TFTP
Server
S1
Change in
the config
mteTriggerValueID =>
ccmHistoryRunningLastChanged
mteTriggerBooleanComparison <> 0
=> change in the config
Step 4: Actions
• This could be one or both of the following:
Notifications (Traps/Informs), with the possibility to
add extra Object IDs to the notification
SNMP set
• Added in 12.2(4)T3
NMS-A01 © 2005 Cisco Systems, Inc. All rights reserved. 68
Event MIB Summary
• If we want a trigger:
Threshold based,
On the local device (not remote),
Without wildcard,
With no extra objects in notification,
With no SNMP Set
• Steps:
Create an expression that will return “1” when
the condition is TRUE and “0” when FALSE
Expression
-MIB Exp1 = (ifSpeed > 100000) && (ifOperStatus == 2)
If Exp1 == “1” generates an event; this will be
checked every minute
Event-MIB
mteTriggerEntry Index=3.116.111.109.116.114.105.103.103.101.114.49 = Y
mteEventEntry Index= 3.116.111.109.101.118.101.110.116.49 = Z
snmpset -v 2c -c private RouterA mteTriggerEntryStatus.Y integer 6
#mteEventname
snmpset -v 2c -c private RouterA mteTriggerEntryStatus.Y integer 5 = event1
snmpset -v 2c -c private RouterA mteTriggerValueID.Y objectidentifier
1.3.6.1.4.1.9.10.22.1.4.1.1.2.1.0.0.0
snmpset -v 2c -c private RouterA mteTriggerValueIDWildcard.Y integer 2
snmpset -v 2c -c private RouterA mteTriggerTest.Y o "40“ Existance(0)
Boolean(1)
snmpset -v 2c -c private RouterA mteTriggerFrequency.Y gauge 60
snmpset -v 2c -c private RouterA mteTriggerSampleType.Y integer 1 Threshold(2)
snmpset -v 2c -c private RouterA mteTriggerEnabled.Y integer 1
snmpset -v 2c -c private RouterA mteEventEntryStatus.Z integer 6 Absolute (1)
snmpset -v 2c -c private RouterA mteEventEntryStatus.Z integer 5
snmpset -v 2c -c private RouterA mteEventActions.Z o “80” When Condition
Is met>send
Notification
NMS-A01 © 2005 Cisco Systems, Inc. All rights reserved. 75
EVENT-MIB and EXPRESSION-MIB
Example 1: Notification
• Added in 12.2(4)T3
SPECIFIC INTERFACES,
MPLS/VPN SYSLOG & SNMP NOTIFICATION,
IP SLA & SNMP,
ENHANCED OBJECT TRACKING
VPN_A VPN_A
CE CE
VPN_B VPN_A
CE P P
PE PE CE
VPN_A PE
CE PE
P P
VPN_B
VPN_B CE CE
VPN_A VPN_A
CE CE
VPN_B VPN_A
CE P P
PE PE CE
VPN_A PE
CE PE
P P
VPN_B
VPN_B CE CE
Management
Application
Configure IP Host
Collect Data
SNMP Trap ure
as Trigger Other Operations
Reconfigure e
M Based on Thresholds/Timeouts
Source Target
Measure
Measure Performance
ip sla 11
udp-jitter 198.198.198.1 3000 codec g711alaw
Server
Internet
IP SLA ISP 2
ISP 1
Router 1 Router 2
.1 HSRP: 10.10.10.10 .2
10.10.7.1
NMS-A01 © 2005 Cisco Systems, Inc. All rights reserved. 90
Example: HSRP and IP SLA Tracking
Router1(config)#
ip sla 18
icmp-echo <server>
ip sla schedule 18 start-time now life forever
track 100 rtr 18 state
interface FastEthernet0/0
ip address 10.10.10.1 255.255.255.224
standby 1 ip 10.10.10.10
standby 1 priority 105
standby 1 preempt
standby 1 track 100 decrement 10
X X
Server
Traffic “Black Holed”
Router1(config)#
ip sla 1
icmp-echo <server>
ip sla schedule 1 start-time now life forever
Event Detectors
EEM Policies
Embedded Event Actions
Manager 1.0
Syslog
Reload (*)
(*) Initially Developed for High Availability
ciscoMemoryPoolFree
EEM Policies
Embedded Event
Actions
Manager 2.0
Syslog
Modify Counter
EEM Policies
Embedded Event
Manager 2.0 Actions
Syslog
Modify Counter
Short Email notification
Application Specific Event
CLI command
SNMP Notifications Switch Over
Get info or Reload (*)
NMS-A01 © 2005 Cisco Systems, Inc. All rights reserved. 103
Embedded Event Manager 2.1
Example 4: CLI ED
Router(config)#router bgp 1
Router(config-router)#
*Nov 22 12:05:59.047: %HA_EM-2-LOG: cli-match: router bgp 1
configured at Nov 22 12:05:59.047
applet
EEM Policies
Embedded Event script
Manager 2.2 Actions
Syslog
• Continue your
Networkers learning
experience with further
reading from Cisco
Press.
• Visit the on-site Cisco
company store, where
the full range of Cisco
Press books is available
for you to browse.
Interface
Threshol
Object Descr OID Poll Int
d
Interface
Object Descr OID Poll Int Threshold
Ethernet
Object Descr OID Poll Int Threshold
1% of
Count of Frames for Which 15 Min Outgoing
dot3StatsInternalMac
Transmission Fails Because of an .1.3.6.1.2.1.10.7.2.1.10 Traffic
TransmitErrors
Internal MAC Sublayer Transmit Error
Memory
Object Descr OID Poll Int Threshold
Number of Buffer
bufferFail .1.3.6.1.4.1.9.2.1.46 15 Min
Allocation Failures
Environment
Object Descr OID Poll Int Threshold
Miscellaneous
Object Descr OID Poll Int Threshold
• Continue your
Networkers learning
experience with further
reading from Cisco
Press.
• Visit the on-site Cisco
company store, where
the full range of Cisco
Press books is available
for you to browse.