Netband Project - Embedded Event Manager (EEM)

From Teknologisk videncenter
Revision as of 07:04, 13 May 2009 by Sahan109 (talk | contribs) (Embedded Event Manager (EEM))
Jump to: navigation, search

Embedded Event Manager (EEM)

This page is part of the Netband Project

Embedded Event Manager is a service on IOS based routers witch monitors the system and takes action on events like log messages, routing updates or specific time of day.

This code shows how to monitor the log for successfull login attempts and send an email.

event manager applet LogIn-Succeded event syslog pattern "SSH-5-SSH2_USERAUTH.*Succeeded" maxrun 20
action 1.0 mail server "<ip-adr-of-smtp-server>" to "admin@mydoamin.com" from "router@mydomain.com" subject "Login Succeeded" body "$_syslog_msg"

Configuration

This code shows how to maintain a consistent configuration backup without extra work. This sends a mail with the configuration each time a write command is issued.

event manager applet ConfigChange-Write_Memory
event cli pattern "write memory" sync no skip no
action 1.0 cli command "enable"
action 1.1 cli command "show run"
action 2.0 mail server "<ip-adr-of-smtp-server>" to "admin@mydomain.dk" from "router@mydomain.com" subject "Running config dump" body "$_cli_result"

event manager applet ConfigChange-wr
event cli pattern "wr" sync no skip no
action 1.0 cli command "enable"
action 1.1 cli command "show run"
action 2.0 mail server "<ip-adr-of-smtp-server>" to "admin@mydomain.com" from "router@mydomain.com" subject "Running config dump" body "$_cli_result"


External links

http://www.cisco.com/en/US/docs/ios/netmgmt/configuration/guide/nm_eem_policy_cli_ps6441_TSD_Products_Configuration_Guide_Chapter.html