<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#0050d0">
<font size="-1"><font face="Helvetica, Arial, sans-serif">You need
libdbi-dbd-oracle<br>
<br>
-Patrick<br>
</font></font><br>
Sent: Thu Sep 30 2010 02:50:18 GMT-0600 (Mountain Daylight Time)<br>
From: Anisur Rehman(IT) <a class="moz-txt-link-rfc2396E" href="mailto:Rehman@bankmuscat.com"><Rehman@bankmuscat.com></a><br>
To: <a class="moz-txt-link-abbreviated" href="mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a> <br>
Subject: [syslog-ng] unable to conect database with syslog-NG
<blockquote
cite="mid:EB3DBE9FC276AB4984CE75995522023C09337AEE@HODCE2K3W01.bmoman.bankmuscat.com"
type="cite">
<pre wrap="">Hi,
Presently I have these below issues on syslog-ng open source version.
I have installed SYSLOG-NG version 3.x on Linux RHEL 4.x and it is
working fine and able to send log to text file. Now I like to send the
message to oracle database.
[oracle@wkwasl02 etc]$ cat syslog-ng.conf
@version: 3.0
options{
};
source gateway {
unix-stream("/dev/log");
internal();
udp(ip(0.0.0.0)port(514));
};
source tcpgateway {
unix-stream("/dev/log");
internal ();
tcp(ip(0.0.0.0)port(514) max_connections(1000));
};
destination localhost {
file("/var/log/syslog-ng.all");
};
destination tcplocalhost {
file("/var/log/tcpsyslog-ng.all");
};
destination d_mysql {
pipe("/opt/syslog-ng/var/mysql.pipe"
template("INSERT INTO logs (host, facility, priority, level, tag, date,
time, program, msg) VALUES ('$HOST', '$FACILITY', '$PRORITY', '$LEVEL',
'$TAG', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG');\n")
template-escape(yes));
};
destination d_oracle {pipe("/dev/ora.pipe"template("exec syslog.log (
'$HOST', '$FACILITY', '$PRIORITY', '$SEVERITY', '$TAG', to_date('$MONTH
$DAY
$HOUR:$MIN:$SEC', 'mm dd hh24:mi:ss'), '$PROGRAM',
substr('$MSG',1,511));\n
COMMIT;\n")template-escape(yes)); };
destination d_sql {
sql(type(oracle)
username("syslog") password("syslog")
database("syslogNG")
table("msgs_${R_YEAR}${R_MONTH}${R_DAY}")
columns("datetime varchar(16)", "host varchar(32)", "program
varchar(32)", "pid varchar(8)", "message varchar2")
values("$R_DATE", "$HOST", "$PROGRAM", "$PID", "$MSGONLY")
indexes("datetime", "host", "program", "pid", "message"));
};
log {
source(gateway);destination(localhost);
};
log {
source(tcpgateway);destination(tcplocalhost);
};
log {
source(tcpgateway);destination(d_mysql);destination(d_oracle);destinatio
n(d_sql);
};
[oracle@wkwasl02 etc]$
[root@wkwasl02 ~]# tail -f /var/log/tcpsyslog-ng.all
Sep 29 11:20:01 wkwasl02 syslog-ng[32139]: No such DBI driver;
type='oracle'
Thanks
Anisur Rehman
Oman,muscat
0968-99826412
______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a>
</pre>
</blockquote>
</body>
</html>