He All, Does anybody knows any idea to include a date in unix timestamp format into a log file, together with a message ? Something like Nov 11 05:15:34 *1163214934 *s_sys@10.9.8.7 sshd[13037]: Accepted publickey for ROOT from 10.0.0.2 port 1355 ssh2 Regards -- Gustavo Mendes de Carvalho gmcarvalho@gmail.com
On Sat, 2006-11-11 at 01:17 -0200, Gustavo Mendes de Carvalho wrote:
He All,
Does anybody knows any idea to include a date in unix timestamp format into a log file, together with a message ? Something like Nov 11 05:15:34 *1163214934 *s_sys@10.9.8.7 sshd[13037]: Accepted publickey for ROOT from 10.0.0.2 port 1355 ssh2
you need the $UNIXTIME macro, see http://www.balabit.hu/products/syslog-ng/reference-2.0/syslog-ng.html/index.... -- Bazsi
Hi Balazs Which minimum syslog-ng version is needed to use template statement ? Thnaks in advance Gustavo Balazs Scheidler escreveu:
you need the $UNIXTIME macro, see
http://www.balabit.hu/products/syslog-ng/reference-2.0/syslog-ng.html/index....
-- Gustavo Mendes de Carvalho gmcarvalho@gmail.com
Hi there, I found minimum version, and I'm using version 1.6.5 for Debian Sarge, but I receive this message when I try to start syslog-ng Parse error reading configuration file, exiting. (line 39) start failed. My line 39 is template t_name { template("$UNIXTIME $ISODATE $ HOST $MSG\n"); }; What is wrong in this line ? Regards Gustavo Gustavo Mendes de Carvalho escreveu:
Hi Balazs
Which minimum syslog-ng version is needed to use template statement ?
Thnaks in advance
Gustavo
Balazs Scheidler escreveu:
you need the $UNIXTIME macro, see http://www.balabit.hu/products/syslog-ng/reference-2.0/syslog-ng.html/index....
-- Gustavo Mendes de Carvalho gmcarvalho@gmail.com
Hi there, I don't know why, when I tried to use a template definition, I received that error message, but when I used a template statement togheter with destination statement, it was OK destination d_dest-name { file("/var/log/file.log" template("$UNIXTIME $ISODATE $HOST $MSG\n") ); }; Gustavo Gustavo Mendes de Carvalho escreveu:
Hi there,
I found minimum version, and I'm using version 1.6.5 for Debian Sarge, but I receive this message when I try to start syslog-ng
Parse error reading configuration file, exiting. (line 39) start failed.
My line 39 is template t_name { template("$UNIXTIME $ISODATE $ HOST $MSG\n"); };
What is wrong in this line ?
Regards
Gustavo Gustavo Mendes de Carvalho escreveu:
Hi Balazs
Which minimum syslog-ng version is needed to use template statement ?
Thnaks in advance
Gustavo
Balazs Scheidler escreveu:
you need the $UNIXTIME macro, see http://www.balabit.hu/products/syslog-ng/reference-2.0/syslog-ng.html/index....
-- Gustavo Mendes de Carvalho gmcarvalho@gmail.com
On Sun, 2006-11-12 at 22:37 -0200, Gustavo Mendes de Carvalho wrote:
Hi there,
I don't know why, when I tried to use a template definition, I received that error message, but when I used a template statement togheter with destination statement, it was OK destination d_dest-name { file("/var/log/file.log" template("$UNIXTIME $ISODATE $HOST $MSG\n") ); };
Because the template declaration is new to 2.0.0 which I quoted as documentation. You can find the 1.6.x documentation too on our website. -- Bazsi
participants (2)
-
Balazs Scheidler
-
Gustavo Mendes de Carvalho