[syslog-ng] unable to conect database with syslog-NG

PATRICK HEMMER syslogng at feystorm.net
Thu Sep 30 15:36:55 CEST 2010


You need libdbi-dbd-oracle

-Patrick

Sent: Thu Sep 30 2010 02:50:18 GMT-0600 (Mountain Daylight Time)
From: Anisur Rehman(IT) <Rehman at bankmuscat.com>
To: syslog-ng at lists.balabit.hu
Subject: [syslog-ng] unable to conect database with syslog-NG
> 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 at 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 at wkwasl02 etc]$
>
>
> [root at 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: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20100930/bfb382a3/attachment.htm 


More information about the syslog-ng mailing list