[syslog-ng] syslog-ng and oracle

Andreas Sartori andreas.sartori at fh-salzburg.ac.at
Tue Aug 11 22:33:00 CEST 2009


hello,

we are currently setting up a new syslog server and switching from a sun
fire v880 with syslog-ng and plain files
to a new linux based (centos 5.3) syslog server with oracle as logging
backend.

we do not want to use pipes to write to the database, so we compiled
libdbi-dbd-oracle with the oracle instantclient 10.2.0.4-1.

syslog-ng is starting up fine (not complaining about the oracle backend),
but we do have some problem with
the inserts to the database.


our trial syslog-ng configuration:

destination d_sql_fwint {
sql(type(oracle)
username("xxx") password("xxx")
database("dashb")
table("SYSLOG_FWINT")
columns("MSG_RCV_TIME varchar2(16)", "HOSTNAME varchar2(256)", "MESSAGE
varchar2(2048)")
values("$R_DATE", "$HOST", "$MSGONLY")
};

when running in debug mode we get the following output:
 Running SQL query; query='INSERT INTO SYSLOG_FWINT (MSG_RCV_TIME,
HOSTNAME, MESSAGE) VALUES (\'Aug 11 21:24:14\', \'gw20\', \'Built
outbound TCP connection 144547326429398234 for LAN230:10.20.30.17/43825
(10.20.30.17/43825) to outside:10.10.10.102/80 (10.10.10.102/80)\')'

this cant work sind oracle is not accepting \ as escape char, and in this
case we do not need an escape at all. the
sql syntax is right without the \.

since templates are not working when using the sql driver, does anyone has
an idea how to fix that?
are we missing something?

oracle setup is right, tnsnames or works and we can connect to the
database with sqlplus. the syslog-ng init script
as the environment variables set (ORACLE_HOME, LD_LIBRARY_PATH)

thanks for any help

-andy




More information about the syslog-ng mailing list