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

Balazs Scheidler bazsi at balabit.hu
Sat Oct 16 12:22:09 CEST 2010


Hi

In the Open Source Edition binaries we only provide database connectors
for the free SQL engines: MySQL, PgSQL and SQLite. However the sources
that we use are available on git.balabit.hu, or you can always get the
libdbi source code from libdbi.sourceforge.net.

Compiling libdbi drivers is quite straightforward, you only need the
oracle development libraries and  use --with-oracle-incdir and
--with-oracle-libdir configure options for libdbi-drivers. Let me know
if you need help or ask the libdbi guys, they are very helpful.

PS: I wouldn't want to push the Premium Edition here, but that includes
an Oracle driver and the syslog-ng PE team tests that combination too.

On Sun, 2010-10-03 at 10:42 +0400, Anisur Rehman(IT) wrote:
> Hi,
> 
>  
> 
> I am using Enterprise Linux 5 update 5 (32 bit) and I can see these
> below RPM in CD itself but not libdbi-dbd-oracle. I am doing googling
> from a week but don’t see the specified libdbi-dbd-oracle
> driver/source/RPM. Please provide the same.
> 
>  
> 
> I am using libdbi-0.8.1-2.1.i386.rpm
> 
> libdbi-dbd-mysql-0.8.1a-1.2.2.i386.rpm
> 
> libdbi-devel-0.8.1-2.1.i386.rpm
> 
> libdbi-drivers-0.8.1a-1.2.2.i386.rpm
> 
>  
> 
> After a long research I can see 64 bit from libdbi-dbd-oracle using
> the link below but I need 32 bit version. Please help me.
> 
>  
> 
>  
> 
> http://www.users.fh-salzburg.ac.at/~asartori/aconet/syslog-ng/RPMS/
> 
>  
> 
> Thanks
> 
> Anis
> 
>  
> 
> 0968-99826412
> 
>  
> 
>  
> 
> From: syslog-ng-bounces at lists.balabit.hu
> [mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of PATRICK
> HEMMER
> Sent: Thursday, September 30, 2010 5:37 PM
> To: Syslog-ng users' and developers' mailing list
> Subject: Re: [syslog-ng] unable to conect database with syslog-NG
> 
> 
>  
> 
> 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
>  
>   
> 
> "This email message is intended for the named recipient only. It may
> be privileged and/or confidential. If you are not the intended named
> recipient of this email then you should not copy it or use it for any
> purpose, nor disclose its contents to any other person which is
> strictly prohibited and unlawful." 
> ______________________________________________________________________________
> 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
> 

-- 
Bazsi




More information about the syslog-ng mailing list