Re: [syslog-ng]Problems in Solaris 2.7 with truncated message
Hi Angelita, Yes, indeed the "\n" is a test to break the sentence. If you see the second template the $MSG between "-" appears truncated also. Any ideas? I don't think is a configuratiion problem. The binaries are from www.sunfreeware.com, may be i need to compile instead... HC Angelita Soares de Camargos To: syslog-ng@lists.balabit.hu <anghelasc@gmail.com> cc: Sent by: Subject: Re: [syslog-ng]Problems in Solaris 2.7 with truncated message syslog-ng-admin@lists .balabit.hu 20-10-2004 17:42 Please respond to syslog-ng Hernan, did you try erase the first "\n" in this sentence? .... '$PROGRAM', \n '$MESSAGE' );\n") .... I use a template to insert into mysql and it work fine. ****** destination d_mysql { pipe("/tmp/mysql.pipe" template("INSERT INTO logs (host, facility, priority, level, tag, date,time,program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC','$PROGRAM', '$MSG' );\n") template-escape(yes)); }; ****** On Wed, 20 Oct 2004 14:26:10 -0300, Hernan Cortez <hcortez@adexus.cl> wrote:
Opss. Wrong subject. excuse me.
Hi, I'm trying to install syslog-ng 1.6.4 in Solaris 2.7. The binaries install and works OK, but the messages appear to be
truncated.
By example the following sentece:
destination d_mysql { file("/var/log/dblog/fulllog.$YEAR.$MONTH.$DAY.$HOUR.$MIN.$SEC" template("INSERT INTO logs (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY','$LEVEL', '$TAG','$YEAR-$MONTH-$DAY','$HOUR:$MIN:$SEC', '$PROGRAM', \n '$MESSAGE' );\n") owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes) template-escape(yes)); };
In the log it appears without the ");\n" (last 3 characters), so the insert in the mysql doesn't work. I do the test in with the following destination:
template("-$MSG--")
In this case the last character "-" doesn't appear.
Any idea? Does syslog have a buffer problem?
Thanks in advance,
HC
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
On Wed, 2004-10-20 at 22:49, Hernan Cortez wrote:
Hi Angelita, Yes, indeed the "\n" is a test to break the sentence. If you see the second template the $MSG between "-" appears truncated also. Any ideas? I don't think is a configuratiion problem. The binaries are from www.sunfreeware.com, may be i need to compile instead...
hmm... it works for me, I used this configuration file: source src { udp(port(2000)); internal(); }; filter f_exp { priority(emerg..debugqq); }; destination d_spoof { file("logfile" template("--$MSG--")); }; log { source(src); destination(d_spoof); }; And it produced this output file: --adsddasdad-- There was no \n at the end of the line, as there was none included in the template. -- Bazsi
participants (2)
-
Balazs Scheidler
-
Hernan Cortez