Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Save EEM result to external syslog server

Hi my name Ismail,

Can the EEM output for example "show proc cpu his" save on external syslog server rather than flash memory. Im running Nexus 7010

4 REPLIES
New Member

Save EEM result to external syslog server

The EEM script that I want to configure as below:

event manager applet TAC-HSRP-flap

  event syslog pattern "HSRP_ENGINE-5-STANDBY_CHANGE"

  action 0.2 cli show policy-map interface po1 >> bootflash:TAC_HSRP.txt

  action 0.3 cli show log last 500 >> bootflash:TAC_HSRP.txt

  action 0.4 cli show hsrp brief >> bootflash:TAC_HSRP.txt

  action 0.5 cli show span det | in occurred|from|executing >> bootflash:TAC_HSRP.txt

  action 0.6 cli show policy-map interface control-plane | egrep class-map|module|violated >> bootflash:TAC_HSRP.txt

  action 0.7 cli show policy-map interface control-plane | egrep class-map|module|violated >> bootflash:TAC_HSRP.txt

  action 0.8 cli show proc cpu | ex 0.0 >> bootflash:TAC_HSRP.txt

  action 0.9 cli show proc cpu | ex 0.0 >> bootflash:TAC_HSRP.txt

  action 1.0 cli show proc cpu | ex 0.0 >> bootflash:TAC_HSRP.txt

  action 1.1 cli show proc cpu | ex 0.0 >> bootflash:TAC_HSRP.txt

  action 1.2 cli show proc cpu | ex 0.0 >> bootflash:TAC_HSRP.txt

  action 1.3 cli show proc cpu history >> bootflash:TAC_HSRP.txt

  action 1.4 cli ethanalyzer local interface inband capture-filter 'host 224.0.0.2' limit-captured-frames 500 write bootflash:tac-hsrp.pcap

Cisco Employee

Save EEM result to external syslog server

This looks okay in terms of NX-OS commands.  Assuming each of these commands work manually, then the applet should work as well.

New Member

Save EEM result to external syslog server

Dear Joseph,

Can I know, whether we can point the destination file to the external syslog server?

For example:

action 0.2 cli show policy-map interface po1 >> bootflash:TAC_HSRP.txt

Change to My own syslog server

Cisco Employee

Save EEM result to external syslog server

Whatever you can do manually you should be able to do through EEM.  So, if the CLI command you want to run works when you execute it manually, then try it in your applet.

672
Views
0
Helpful
4
Replies