You can use the call-home send command to execute an IOS command or a list of IOS commands and send the command output through HTTP or e-mail protocol.
Note the following guidelines when sending the output of a command:
-
The specified IOS command or list of IOS commands can be any run command, including commands for all modules. The command must be contained in quotes (“”).
-
If the e-mail option is selected using the “email” keyword and an e-mail address is specified, the command output is sent to that address. If neither the e-mail nor the HTTP option is specified, the output is sent in long-text format with the specified service request number to the Cisco TAC (attach@cisco.com).
-
If neither the “email” nor the “http” keyword is specified, the service request number is required for both long-text and XML message formats and is provided in the subject line of the e-mail.
-
If the HTTP option is specified, the CiscoTac-1 profile destination HTTP or HTTPS URL is used as the destination. The destination e-mail address can be specified so that smart call home can forward the message to the e-mail address. The user must specify either the destination e-mail address or an SR number but they can also specify both.
To execute a command and send the command output, perform this steps:
Example
The following example shows how to send the output of a command to a user-specified e-mail address:
Router#call-home send “show diag” email support@example.com
The following example shows the command output sent in long-text format to attach@cisco.com, with the SR number specified:
Router#call-home send “show version; show run” tac-service-request 123456
The following example shows the command output sent in XML message format to callhome@cisco.com:
Router#call-home send “show version; show run” email callhome@cisco.com msg-format xml
The following example shows the command output sent in XML message format to the Cisco TAC backend server, with the SR number specified:
Router#call-home send “show version; show run” http tac-service-request 123456
The following example shows the command output sent to the Cisco TAC backend server through the HTTP protocol and forwarded to a user-specified email address:
Router#call-home send “show version; show run” http destination-email-address user@company.com