21 Jun

Interface monitoring in EEM

EEM (Embedded Event Manager) is quite nice feature on IOS platforms allowing administrator to configure router behavior during predefined events. Usually it’s connected with IP SLA – if probes returns negative value appropriate applet is executed. But EEM itself can be used for deeper interface and link monitoring than IP SLA allows with it’s probes

IP SLA can send ie. ICMP probes and basing on predefined timeouts and thresholds it returns positive or negative result. But not always when link is working incorrectly pings will be lost or high RTT will be observed. Also our ping might just be lucky to pass link properly while customers traffic will suffer. Building reliable probes with IP SLA might be hard.
EEM itself offers other way of monitoring interface behaviors using same counters one can see on show interface output. You can monitor wide range of interfaces, unfortunately not E1 directly. List of parameters you can monitor includes all interface counters

TEST-3G(config-applet)#event interface name FastEthernet 0/0 parameter ?
  input_errors              Number of damaged packets received
  input_errors_crc          Number of packets received with CRC errors
  input_errors_frame        Number of framing ERR packets received
  input_errors_overrun      Number of overruns and resource errors
  input_packets_dropped     Number of packets dropped from input Q
  interface_resets          Number of times an interface has been reset
  output_buffer_failures    Number of failed buffers
  output_buffer_swappedout  Number of packets swapped to DRAM
  output_errors             Number of packets errored on output
  output_errors_underrun    Number of underruns on output
  output_packets_dropped    Number of packets dropped from output Q
  receive_broadcasts        Number of broadcast packets received
  receive_giants            Number of too large packets received
  receive_rate_bps          Interface receive rate in bits/sec
  receive_rate_pps          Interface receive rate in pkts/sec
  receive_runts             Number of too small packets received
  receive_throttle          Number of times the receiver was disabled
  reliability               Interface reliability as a fraction of 255
  rxload                    Receive rate as a fraction of 255
  transmit_rate_bps         Interface transmit rate in bits/sec
  transmit_rate_pps         Interface transmit rate in pkts/sec
  txload                    Transmit rate as a fraction of 255

Monitoring is done in time intervals. In following example if during one second time interval input_errors counter increases by at least 10 defined action will be executed

event manager applet testSerial 
 event interface name Serial0/0:15 parameter input_errors entry-op ge entry-val 10 entry-type increment exit-op le exit-val 1 exit-type increment poll-interval 10
 action 1.0 cli command "ping 10.199.0.2 repeat 1"

2 thoughts on “Interface monitoring in EEM

  1. In CRS-1 XR version 4.0 we can use that EEM to monitor L2VPN or not? if we can could you please advice me for example command and as below my current L2VPN xconnect commend:

    interface TenGigE0/3/0/3
    description FC-10GE-9899-001
    load-interval 30
    l2transport

    interface tunnel-te40001
    ipv4 unnumbered Loopback1
    priority 1 1
    destination 111.50.85.196
    fast-reroute
    path-option 10 explicit name TH-SG-main-path
    path-option 100 explicit name TH-SG-protection-path

    l2vpn
    logging
    pseudowire

    pw-class pwc_mpls_vlan_si-group
    encapsulation mpls
    protocol ldp
    transport-mode ethernet
    preferred-path interface tunnel-te 40001 fallback disable

    xconnect group xg2
    p2p SI_Group
    interface TenGigE0/3/0/3
    neighbor 111.50.85.196 pw-id 2
    pw-class pwc_mpls_vlan_si-group

    —–

    so if any one has a recommendation or ideas to help.

    waiting for your support.
    Thanks,

Leave a Reply

%d bloggers like this: