- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 12:55 PM
Hello guys,
I'm trying to remember what was the command to create a custom messages and send them to the syslog? It was something like 'log send 5 "bla bla bla"' where 5 is facility which should be used when logging "bla bla bla" message to syslog. I tried to find id in command reference but I couldn't find anything.
Thank you in advance!
Solved! Go to Solution.
- Labels:
-
Network Management
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2009 09:16 AM
There was an enhancement request on this. If you open a TAC case, they will be able to publish this for you so you will have an external document. They can contact lavramov for more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 01:33 PM
You can use EEM to produce your own syslog messages, no log command that I know of to create a syslog on the router CLI and send it, that I know of.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 01:41 PM
I found this:
http://supportwiki.cisco.com/ViewWiki/index.php/Tech_Insights:Annotating_Troubleshooting_Sessions
I''ve used this command long time ago, but I just can't remember now.
But I cannot find information about IOS version that support it.
Best regards,
Danail Petrov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 01:57 PM
Send log XY
Will display on the console the message XY
If you have logging console enabled, then this will send the syslog message XY to the logging server
You can not change the facility though
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 02:07 PM
I'm not quite sure about that. Check this out:
border#send log "To be or not to be"
border#show log | i Console
Console logging: disabled
*Jul 10 01:04:28.510 EEST: %SYS-2-LOGMSG: Message from 322(dpetrov): "To be or not to be"
Even though the console logging is disabled, the log has been successfully sent to the syslog.
I'm 99% sure that I've used command like this to log a few comments as a "history" for my colleagues. In "J" company there is a command like "commit comment 'comment ...'" and I'm sure that I've found an analog for this in Cisco's IOS.
Thank you for your time!
Kind regards,
Danail Petrov
P.s. Nashenec? :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 02:13 PM
You are right, even without console logging, send log sends it.
But i dont see how you can change the syslog facility level for send log. It stays as level 2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 02:18 PM
As I said, I'm 99% sure that I've found a way to do this. I can't remember now but I've done it :) I even tried to search back in our TACACS+ accounting information to find something - unfortunately without any success.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 03:06 PM
On the platforms running 12.2(32)SRB and above, there is actually a command : send log
The message will then appear as :
%SYS-
That feature have only been ported to those platforms for now. You can always request an enhancement via TAC or the account team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 09:22 PM
Yep, it's exactly what I need/mean.Can you provide me with an url address for this "feature" on your (cisco's) website?
Kind regards,
Dani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2009 09:16 AM
There was an enhancement request on this. If you open a TAC case, they will be able to publish this for you so you will have an external document. They can contact lavramov for more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2009 01:51 PM
Thank you for your effort and cooperation. I really appreciate it. I won't open a TAC case for now but thanks for the idea too.
Kind regards,
Danail Petrov

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2009 03:40 PM
Actually, EEM will not allow you to create custom syslog messages. That feature is coming in EEM 3.1. For now, all EEM syslog messages will always have the %HA_EM facility. The Embedded Syslog Manager will allow you to modify messages as they are generated, but you will need to have a message generated first.
There is another option. You can use the "syslog:" file system to create custom messages using tclsh. Messages will be sent using buginf() (i.e. the same way debugging messages are sent). The attached simple tclsh script will allow you to make use of this feature:
tclsh send_syslog.tcl FACILITY SEVERITY MNEMONIC BODY
For example:
tclsh flash:/send_syslog.tcl MARCUS 1 XXX "This is a test"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2009 09:31 AM
Thank you so much for this hint. I didn't knew that TCL has such function (buginf()).
Best regards,
Danail Petrov
