on 06-14-2010 01:12 AM
EEM Call Home Engine helps automating the troubleshooting or management task by providing a means for automatic execution of a sequence of commands, based on an event or time based trigger. This document explains the structure and use of EEM Call Home Engine.
EEM Call Home Engine has three components:
no_call_home_eng.tcl. creates, installs and uninstalls dynamic policies based on configuration files. This EEM policy has no other purpose. It does not execute unless explicitly invoked via CLI. This policy can and should remain registered even after troubleshooting is complete, it will not consume extra ressources after the registration. The no_call_home_eng.tcl policy will be provided by TAC engineers.
Dynamically created policies execute specified CLI commands when the specified condition is met. Collected output is sent via email to the email address specified in the .csv file that will be provided by TAC engineers. Source email address and SMTP server must be configured in the global router configuration.
Router#config t
Router(config)#event manager session cli username <USER>
where <USER> is a user authorized to run all privilege level 15 commands.
Router#config t
Router(config)#call-home
Router(cfg-call-home)#sender from <email_address>
Router(cfg-call-home)#mail-server <ip_address> priority <n>
Multiple mail servers may be specified, transfer via lowest priority server will be attempted first.
Router#config t
Router(config)#event manager environment _email_from <email_address>
Router(config)#event manager environment _email_server <ip_address>
Router#mkdir flash:/policies
Router#mkdir flash:/temp
Router#config t
Router(config)#event manager directory user policy flash:/policies
Router(config)#event manager environment che_temp_dir flash:/temp
Router#copy tftp://<ip_address>/no_call_home_eng.tcl flash:/policies
Router#config t
Router(config)#event manager policy no_call_home_eng.tcl
Router#show event manager policy registered
No. Class Type Event Type Trap Time Registered Name
1 script user none Off Fri May 28 11:38:40 2010 no_call_home_eng.tcl
policyname {no_call_home_eng.tcl} sync {yes}
nice 0 queue-priority normal maxrun 90.000 scheduler rp_primary
Once you received policy configuration file(s) (.csv) from TAC, use the no_call_home_eng.tcl script to download them from your FTP,TFTP or SCP server:
Router#event manager run no_call_home_eng.tcl tftp://<ip_address>/614300461-high_cpu_tac.csv
Sending file modes: C0644 455 614300461-high_cpu_tac.csv
!INFO: Successfully installed and registered 614300461-high_cpu_tac.tcl.
Router#config t
Router(config)#event manager environment che_install_file tftp://<ip_address>/614300461-high_cpu_tac.csv
Router(config)#end
Router#event manager run no_call_home_eng.tcl
Router#show event manager policy registered
[...]
2 script user snmp Off Thu Jun 3 15:10:09 2010 614300461-high_cpu_tac.tcl
oid {1.3.6.1.4.1.9.9.109.1.1.1.1.10.1} get_type exact entry_op ge entry_val {80}
entry_type value exit_op le exit_val {30} exit_type value poll_interval 5.000
nice 0 queue-priority normal maxrun 21.000 scheduler rp_primary
[...]
When a dynamically created policy runs, and collects the CLI data, it will do two things to notify the user that data has been collected:
The message may vary if the script have an additional Cc address, if the data are saved locally on a file or if no output are produced with this script.
The second thing that will be done is to send email to the addresses specified in To email address and Carbon-copy email address(es) fields. This will only be done if the output file has been specified, or if the output file value is NONE. The email will not contain the data.
In order for the notification emails to be sent, the sender email address and SMTP server must configured as explained in Preparing the installation paragraph.
It is VITAL that you uninstall, and stop your configured policy to prevent it from spamming the Service Request, or taking up unnecessary resources on the device. If a limited number of iterations for your policy has been specified, the policy will handle uninstalling itself. If not, then follow these steps to stop and uninstall the policies:
Router#event manager run no_call_home_eng.tcl --uninstall tftp://<ip_address>/614300461-high_cpu_tac.csv
Router#config tThen run the no_call_home_eng.tcl script.
Router(config)#event manager environment che_uninstall_file tftp://<ip_address>/614300461-high_cpu_tac.csv
Router#event manager run no_call_home_eng.tcl
NOTE:
There is no need to remove the Call Home engine after the troubleshooting is complete and the service request closed. The Call Home engine has been designed to be kept installed on the router, and keeping it will facilitate the future installation of customized EEM policies. If there is a need to uninstall the Call Home engine policy you may follow those steps:
Router#config t
Router(config)#no event manager policy no_call_home_eng.tcl
Router#del /force flash:/policies/no_call_home_eng.tcl
Cisco TAC - Cisco Technical Assistance Centre
CLI - Command Line Interface
EEM - Embedded Event Manager
SMTP - Simple Mail Transfer Protocol
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: