cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1106
Views
0
Helpful
2
Replies

EEM - problem with generate outputs

Hi

Could you help me with this problem

- Data

> IOS 12.4(15)T13

- EEM config

CONFIG-SET

+---------------------------------------------------------------------------------------

event manager applet TEST trap

event syslog pattern "%SYS-5-CONFIG_I:"

action 1.0 cli command "enable"

action 2.0 cli command "sh run"

action 3.0 mail server "192.168.1.146" to "engineer@cisco.com" from "devtest@cisco.com" subject "B25 PBX Alert" body "$_cli_result"

+---------------------------------------------------------------------------------------

- Debug output

OUTPUT-SET

+---------------------------------------------------------------------------------------

Rack1R1#debug event manager all

All possible Embedded Event Manager debugging has been turned on

Rack1R1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Rack1R1(config)#^Z

Rack1R1#

*Mar  1 23:51:34.346: cli_history_entry_add: free_hist_list size=0, hist_list size=7

*Mar  1 23:51:34.350: check_eem_cli_policy_handler: command_string=configure terminal

*Mar  1 23:51:34.350: check_eem_cli_policy_handler: num_matches = 0, response_code = 1

*Mar  1 23:51:35.354: %SYS-5-CONFIG_I: Configured from console by console

*Mar  1 23:51:35.362: fh_fd_syslog_event_match: num_matches = 1

*Mar  1 23:51:35.362: fh_fd_data_syslog: num_matches = 1

*Mar  1 23:51:35.366: fh_send_server_sig_hndlr: received a pulse from Syslog Event Detector on node0/0 with fdid: 2

*Mar  1 23:51:35.370: fh_send_syslog_fd_msg: msg_type=62

*Mar  1 23:51:35.370: fh_send_syslog_fd_msg: sval=0

*Mar  1 23:51:35.370: fh_send_server_sig_hndlr: received FH_MSG_EVENT_PUBLISH

*Mar  1 23:51:35.374: fh_schedule_callback: fh_schedule_callback: cc=66B81EDC prev_epc=0; epc=676B600C

*Mar  1 23:51:35.390: fh_schedule_callback: EEM callback policy TEST has been scheduled to run

Rack1R1#

*Mar  1 23:51:35.406: fh_io_msg: received FH_MSG_API_INIT; jobid=14, processid=230, client=4, job name=EEM Callback Thread

*Mar  1 23:51:35.406: fh_server: fh_io_msg: received msg FH_MSG_EVENT_REQINFO from client 4 pclient 1

*Mar  1 23:51:35.422: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : cli_open called.

*Mar  1 23:51:35.430: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Rack1R1>

*Mar  1 23:51:35.430: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : IN  : Rack1R1>enable

*Mar  1 23:51:35.430: cli_history_entry_add: free_hist_list size=0, hist_list size=7

*Mar  1 23:51:35.430: eem_no_scan flag set, skipping scan of command_string=check_eem_cli_policy_handler

Rack1R1#

*Mar  1 23:51:35.510: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Rack1R1#

*Mar  1 23:51:35.510: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : IN  : Rack1R1#sh run

*Mar  1 23:51:35.514: cli_history_entry_add: free_hist_list size=0, hist_list size=7

*Mar  1 23:51:35.514: eem_no_scan flag set, skipping scan of command_string=check_eem_cli_policy_handler

Rack1R1#

*Mar  1 23:51:40.226: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Building configuration...

*Mar  1 23:51:40.226: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT :

*Mar  1 23:51:40.226: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : Current configuration : 2710 bytes

*Mar  1 23:51:40.226: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : !

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : version 12.4

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : service timestamps debug datetime msec

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : service timestamps log datetime msec

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : no service password-encryption

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : !

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : hostname Rack1R1

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : !

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : boot-start-marker

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : boot-end-marker

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : !

*Mar  1 23:51:40.230: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : enable password cisco

*Mar  1 23:51:40.234: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : !

*Mar  1 23:51:40.234: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : no aaa new-model

*Mar  1 23:51:40.234: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : memory-size iomem 5

*Mar  1 23:51:40.234: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : ip cef

*Mar  1 23:51:40.234: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : OUT : !

*Mar  1 23:51:40.234: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : 20+ lines read from cli, debug output truncated

*Mar  1 23:51:40.234: %HA_EM-3-FMPD_UNKNOWN_ENV: fh_parse_var: could not find environment variable: _cli_r

*Mar  1 23:51:40.234: %HA_EM-3-FMPD_ERROR: Error executing applet TEST statement 3.0

*Mar  1 23:51:40.238: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : cli_close called.

*Mar  1 23:51:40.242: fh_server: fh_io_msg: received msg FH_MSG_CALLBACK_DONE from client 4 pclient 1

*Mar  1 23:51:40.242: fh_io_msg: EEM callback policy TEST has ended with abnormal exit status of 0xFFFFFFFF

*Mar  1 23:51:40.242: fh_schedule_callback: fh_schedule_callback: cc=66B81EDC prev_epc=676B600C; epc=0

*Mar  1 23:51:40.242: fh_schedule_policy: prev_epc=0x00000000; epc=0x00000000

*Mar  1 23:51:40.250: fh_server: fh_io_msg: received msg FH_MSG_API_CLOSE from client 4 pclient 1

*Mar  1 23:51:40.254: fh_io_msg: received FH_MSG_API_CLOSE client=4

+---------------------------------------------------------------------------------------

- Problem

> How generate more than 20 lines output?

*Mar  1 23:51:40.234: %HA_EM-6-LOG: TEST : DEBUG(cli_lib) : : CTL : 20+ lines read from cli, debug output truncated

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

The debug output will never show more than 20 lines.  However, the email you receive will have the entire output.  The $_cli_result variable will contain the entire output of "show run".

View solution in original post

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

The debug output will never show more than 20 lines.  However, the email you receive will have the entire output.  The $_cli_result variable will contain the entire output of "show run".

Hi

Yes it is true. I checked it with configured email server.

Thank you for your help.