postgresql support

General discussions here

postgresql support

Postby jli on Thu May 15, 2008 9:54 pm

Is it possible to use phplogcon with postgres? rsyslog supports logging to postgres, I believe, but the INSTALL file only mentions MySQL.

Thanks!
jli
Avarage
 
Posts: 15
Joined: Fri May 09, 2008 6:44 pm

Re: postgresql support

Postby rgerhards on Fri May 16, 2008 6:47 am

I think it does not, but I will check with the development lead. In any case, could you just simply give it a try and tell us what happens?

phpLogCon v2 is in a very early phase. Adding postgres support, if not already ok with it, sounds quite useful to me ;)

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1282
Joined: Thu Feb 13, 2003 11:57 am

Re: postgresql support

Postby alorbach on Fri May 16, 2008 10:20 am

I think we can look into adding support for postgresql as one of the next things to do ;)

--
Andre
User avatar
alorbach
Site Admin
 
Posts: 855
Joined: Thu Feb 13, 2003 11:55 am

Re: postgresql support

Postby rgerhards on Fri May 16, 2008 10:39 am

I think we should implement this via a database abstraction layer, so we may be able to solve this issue once for a lot of databases. From what I have heard so far, I propose using

http://de2.php.net/manual/en/pdo.drivers.php

Edit: I have added a tracker item for this request:

http://bugzilla.adiscon.com/show_bug.cgi?id=74

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1282
Joined: Thu Feb 13, 2003 11:57 am

Re: postgresql support

Postby jli on Tue May 20, 2008 8:22 pm

Okay, thank you!

I'm in the middle of setting up a centralized syslog server, so I will probably go with MySQL now, but I'm still interested in Postgres support.
jli
Avarage
 
Posts: 15
Joined: Fri May 09, 2008 6:44 pm

Re: postgresql support

Postby alorbach on Fri May 23, 2008 4:59 pm

Hi jli,

I want to inform you that I have finished the first Version with the new DBO driver today.
The new Version v2.3.3 can be downloaded from here:
http://www.phplogcon.org/downloads

However I have to say the new driver might contain still bugs. I have tested it against different databases here and tested all the long but you never know ;)

The installation script will offer you the possibility to choose the new Database PDO Source, if you want to use your existing configuration you can modify your source to something like this:

Code: Select all
$CFG['Sources']['Source1']['ID'] = "Source1";
$CFG['Sources']['Source1']['Name'] = "PostgreSQL DB";
$CFG['Sources']['Source1']['SourceType'] = SOURCE_PDO;
$CFG['Sources']['Source1']['DBTableType'] = "monitorware";
$CFG['Sources']['Source1']['DBType'] = DB_PGSQL;
$CFG['Sources']['Source1']['DBServer'] = "localhost";
$CFG['Sources']['Source1']['DBName'] = "databasename";
$CFG['Sources']['Source1']['DBUser'] = "root";
$CFG['Sources']['Source1']['DBPassword'] = "";
$CFG['Sources']['Source1']['DBTableName'] = "systemevents";
$CFG['Sources']['Source1']['DBEnableRowCounting'] = false;


Currently, "$CFG['Sources']['Source1']['DBType']" can be one of the following constant values:
DB_MYSQL
DB_MSSQL
DB_ODBC
DB_PGSQL
DB_OCI
DB_DB2
DB_FIREBIRD
DB_INFORMIX
DB_SQLITE

I hope this helps ;)

best regards,
Andre Lorbach
User avatar
alorbach
Site Admin
 
Posts: 855
Joined: Thu Feb 13, 2003 11:55 am

Google Ads



Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron