1

I want to send a syslog message from ASR9k. E.g i want to send the message(trigger) "hello world" from my ASR9k. Please suggest the command used for same.

In one of the other blogs, i read: send log [Text Here] e.g.

Cisco# send log Hello World

This will send a SEV 2 message to the logging buffer, and test your syslog settings and alert handling.

However, i could not apply the same on ASR9k.

3

The above requirement worked for me using the below command on ASR9k

logmsg [your message]
| improve this answer | |
1

The send command is used to send messages between users logged into the same router.

send - To send messages to one or all terminal lines, use the send EXEC command.

send {line-number | * | aux number | console number | tty number | vty number}

Syntax Description

enter image description here

Defaults

No messages are sent.

Command Modes

EXEC

Command History

enter image description here

Usage Guidelines

After entering this command, the system prompts for the message to be sent, which can be up to 500 characters long. Enter Ctrl-Z to end the message. Enter Ctrl-C to abort this command.


Caution: Be aware that in some circumstances text sent using the send command may be interpreted as an executable command by the receiving device. For example, if the receiving device is Unix workstation, and the receiving device is in a state (shell) where commands can be executed, the incoming text (if a valid Unix command) will be interpreted as a command. For this reason you should limit your use of any unmonitored connection to a router that uses an interactive shell.


Examples

The following example sends a message to all lines:

2509# send *
Enter message, end with CTRL/Z; abort with CTRL/C:
The system 2509 will be shut down in 10 minutes for repairs.^Z
Send message? [confirm]
2509#
***
***
*** Message from tty0 to all terminals:
***
The system 2509 will be shut down in 10 minutes for repairs.
2509#

I don't know of any command to send an arbitrary message to the syslog server. Cisco has documents describing the logging facility, e.g. System Message Logging.

| improve this answer | |
  • It worked using the below: logmsg [your message] – fsociety May 8 '17 at 18:18
  • Then you should post an answer and accept it so that the question doesn't keep popping up forever, looking for an answer. – Ron Maupin May 8 '17 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.