LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-08-2011, 10:55 PM   #1
garyrickert
LQ Newbie
 
Registered: Jan 2009
Location: Plano (Dallas) Texas
Distribution: Centos Win7 W2KPro
Posts: 15

Rep: Reputation: 0
Configuring syslog dates


I have multiple servers running Centos 5.5 or later, some of them have syslogs with date stamps like:
Sep 1 05:12:36
and some of them like:
2011-09-04T09:21:42.442689-07:00.

I would really like to get them all the same so the same analysis scripts can be used, but I have not been able to identify where the date formatting is set. Someone please help. I have already spent much to much time on this. Thanks
 
Old 09-09-2011, 04:06 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
The first time stamp is traditional Syslog and the second one formatting supported by say Rsyslog. That being the case only the latter can be changed (/etc/rsyslog.conf: RSYSLOG_TraditionalFileFormat vs RSYSLOG_FileFormat) AFAIK.
 
1 members found this post helpful.
Old 09-09-2011, 09:11 PM   #3
garyrickert
LQ Newbie
 
Registered: Jan 2009
Location: Plano (Dallas) Texas
Distribution: Centos Win7 W2KPro
Posts: 15

Original Poster
Rep: Reputation: 0
Thumbs up Some more info on rsyslog templates

Thanks much unSpawn. Your info pointed me to searches that returned some really valuable info I would like to share, from:
http://www.rsyslog.com/doc/rsyslog_conf_templates.html

Template names beginning with "RSYSLOG_" are reserved for rsyslog use. Do NOT use them if, otherwise you may receive a conflict in the future (and quite unpredictable behaviour). There is a small set of pre-defined templates that you can use without the need to define it:

RSYSLOG_TraditionalFileFormat - the "old style" default log file format with low-precision timestamps
RSYSLOG_FileFormat - a modern-style logfile format similar to TraditionalFileFormat, buth with high-precision timestamps and timezone information
RSYSLOG_TraditionalForwardFormat - the traditional forwarding format with low-precision timestamps. Most useful if you send messages to other syslogd's or rsyslogd below version 3.12.5.
RSYSLOG_ForwardFormat - a new high-precision forwarding format very similar to the traditional one, but with high-precision timestamps and timezone information. Recommended to be used when sending messages to rsyslog 3.12.5 or above.
RSYSLOG_SyslogProtocol23Format - the format specified in IETF's internet-draft ietf-syslog-protocol-23, which is assumed to be come the new syslog standard RFC. This format includes several improvements. The rsyslog message parser understands this format, so you can use it together with all relatively recent versions of rsyslog. Other syslogd's may get hopelessly confused if receiving that format, so check before you use it. Note that the format is unlikely to change when the final RFC comes out, but this may happen.
RSYSLOG_DebugFormat - a special format used for troubleshooting property problems. This format is meant to be written to a log file. Do not use for production or remote forwarding.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring syslog and sending file to server alee Linux - Server 10 06-11-2010 03:24 PM
I need help configuring a syslog server on a xen virtual machine sezam2 Linux - Server 7 02-21-2009 06:00 PM
Need assistance for configuring SYSLOG cj_cheema Linux - Server 2 06-15-2008 03:49 PM
Configuring Syslog for Slackware remote djchris Slackware 0 12-07-2004 06:43 AM
Configuring /etc/syslog for Cisco PIX triley Linux - General 0 07-02-2004 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration