[syslog-ng]Problems in Solaris 2.7 with truncated message
Angelita Soares de Camargos
syslog-ng@lists.balabit.hu
Wed, 20 Oct 2004 17:42:10 -0300
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
>
>