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

Pipe from CLI cmd to email?

mstubbs61
Level 1
Level 1

I'd like to send myself timed reports from each of our 8 ESA's showing the workqueue status.  Is it possible to pipe a CLI command output to an email address? If so, can a timer be applied?

1 Reply 1

Robert Sherwin
Cisco Employee
Cisco Employee

From the CLI of the ESA itself - no, this is not possible, as we do not honor the pipe command option.

You can see all the CLI references for the versions here:

http://www.cisco.com/c/en/us/support/security/email-security-appliance/products-command-reference-list.html

Externally - you can script this to call and reference commands via SSH, example:

$ ssh admin@192.168.0.189 workqueue status
Status as of:  Fri Sep 11 18:01:36 2015 EDT
Status:        Operational
Messages:      0

You can get more enhanced/complex w/ the commands you run - just need to trial and error what you are specifically after and assure your results.

Example would be, as you wanted - to mail from the CLI:

$ ssh admin@192.168.0.189 workqueue status | mail -s "Workqueue Status" robert@example.com

With my mail received being:

In order to best operate this, you can setup SSH public key, in order to save hash in order to make quick log-in, not use password for scripting from internal hosts:

http://www.cisco.com/c/en/us/support/docs/security/email-security-appliance/118305-technote-esa-00.html

-Robert