cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2058
Views
0
Helpful
1
Replies

Cisco Embedded Event Manager Issue 2

Hello Experts,

I would like the following script to add the results of the command "show ip route" to a file called 'server_unreachable' then append the results in the file and then send the results via email

Everything is working fine except that the results give me the following error message:

%Error opening nvram:server_unreachable (No such file or directory)

R3#

I wonder if someone could take a look at the EEM script and let me know where I'm going wrong?

event manager environment _email_server 192.168.1.1
event manager environment _email_to carlton@key-loop.co.uk
event manager environment _email_from carlton@key-loop.co.uk
event manager applet backup2 trap
event syslog pattern "1 interface Fa0/1 line-protocol Up->Down"
action 1.0 cli command "enable"
action 1.2 cli command "del /force nvram:server_unreachable"
action 1.3 cli command "show ip route|append server_unreachable"
action 1.4 cli command "more nvram:server_unreachable"
action 1.5 snmp-trap strdata "Primary_Failed On Fa0/1 should failover to Fa0/0"
action 1.6 syslog msg "Primary_Failed On Fa0/1 should failover to fa0/0"
action 1.8 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Server Unreachable: ICMP-Echos Failed" body "$_cli_result"

Cheers

Carlton

1 Reply 1

HI all,

I figured it out.

Basically, I needed a space between the pipe bar. ie. action 1.3 cli command "show ip route|append server_unreachable" needed to be:

action 1.3 cli command "show ip route | append server_unreachable"

Cheers