[syslog-ng] Pipe() in syslog-ng ---- HELP

Khaleelah Peerbocus systems2 at maccs.mu
Tue Jul 13 11:43:38 CEST 2010


Hi

 

How can I avoid line breaks in syslog-ng when it is configured using pipe

 

destination d_mssql {

        pipe("/tmp/mssql.syslog-ng.pipe" flags(no-multi-line)

    template("INSERT INTO
logs(datetime,host,program,pid,message)VALUES('$R_DATE','$HOST','$PROGRAM','
$PID','$MSGONLY');")

    template-escape(yes));

};

 

log {

     source(src);

     filter(f_debug);

     destination(d_mssql);

};

 

 

Then I have a script reading the pipe

 

if [ -e /tmp/mssql.syslog-ng.pipe ]; then

       while [ -e /tmp/mssql.syslog-ng.pipe ]

                do

                       isql -v MSTEST  "sa" "password" <
/tmp/mssql.syslog-ng.pipe

 

                done

else

        mkfifo /tmp/mssql.syslog-ng.pipe

fi

 

Problem is the sql query is getting broken down in 3 lines

 

 

KP

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20100713/5b76e942/attachment-0001.htm 


More information about the syslog-ng mailing list