Date parsed: 5/30/2005 8:44:33 PM
Date: Mon, 30 May 2005 19:44:33 +0200
Hello Bartek,
your problem is caused by a bug in the PostgreSQL ODBC driver.
See:
http://gborg.postgresql..../bugs/bugupdate.php?1276 Regards,
Franz
"Thomas Zechner" <thomas.zechner@uc4.com> wrote in message
news:0HpiB8QZFHA.4960@is1.netal.com...
> Hello Bartek,
>
> I sent you a modified version of the sl4ntdb.dll to perform diagnostic
> logging per personal e-mail.
>
> Franz
>
> "Bartek Siebab" <bs@vt.pl> wrote in message news:4295EF6D.40806@vt.pl...
> > Hi!
> >
> > I try to setup logging from ntsyslog via network
> > to sl4nt 3.2 and then into PostgreSQL database via ODBC.
> >
> > Records are inserted but (sic!) all fields except
> > portsource/portdestination are filled with current date!
> > In file log fields are OK:
> >
> > 2005-05-26,17:20:55,10.10.10.10,STONEHENGE,USER,ALERT,May 26 17:20:32
> > service control manager[info] 7035 STONEHENGE\saphire Do us³ugi
NTsyslog
> > zosta³ pomy¶lnie wys³any kod sterowania zatrzymaj.
> >
> > 2005-05-26,17:20:55,10.10.10.10,STONEHENGE,USER,ALERT,May 26 17:20:51
> > service control manager[info] 7036 Us³uga NTsyslog wesz³a w stan
> zatrzymania.
> >
> > Here is example from database:
> > (last field is serial autoincrement)
> >
> > "2005-05-26 17:20:55.81+02";"2005-05-26 15:20:55.81+02";"2005-05-26
> > 00:00:00";"2005-05-26 00:00:00";"2005-05-26 00:00:00";"2005-05-26
> > 00:00:00";"1048";"2005-05-26 00:00:00";"514";"2005-05-26
> > 00:00:00";"1";"2005-05-26 00:00:00";"1";"2005-05-26 00:00:00";"28"
> >
> > "2005-05-26 17:20:57.392+02";"2005-05-26 15:20:57.392+02";"2005-05-26
> > 00:00:00";"2005-05-26 00:00:00";"2005-05-26 00:00:00";"2005-05-26
> > 00:00:00";"1049";"2005-05-26 00:00:00";"514";"2005-05-26
> > 00:00:00";"1";"2005-05-26 00:00:00";"1";"2005-05-26 00:00:00";"29"
> >
> > here is a postgresql table structure, I had to expand varchar fields
> > becouse of inserted values (dates even for address ip fields) didn't
> > fit raising database error:
> >
> > CREATE TABLE syslog
> > (
> > datetimelocal timestamptz,
> > datetimeutc timestamptz,
> > datetimerfc822local varchar(19),
> > datetimerfc822utc varchar(19),
> > ipaddresssource varchar(19),
> > hostnamesource varchar(255),
> > portsource int4,
> > ipaddressdestination varchar(19),
> > portdestination int4,
> > facility varchar(19),
> > facilitycode int4,
> > priority varchar(19),
> > prioritycode int4,
> > messagetext varchar(255),
> > id serial NOT NULL,
> > CONSTRAINT id_pk PRIMARY KEY (id)
> > )
> >
> > I also debug postgresql ODBC and it seems that odbc driver
> > gets that strange values on input:
> >
> > conn=13579752, query='insert into
> >
>
syslog(datetimelocal,datetimeutc,datetimerfc822local,datetimerfc822utc,ipadd
>
resssource,hostnamesource,portsource,ipaddressdestination,portdestination,fa
> cility,facilitycode,priority,prioritycode,messagetext)
> > values('2005-05-26 17:41:25.788'::timestamp,'2005-05-26
> > 15:41:25.788'::timestamp,'2005-05-26 00:00:00','2005-05-26
> > 00:00:00','2005-05-26 00:00:00','2005-05-26 00:00:00',1078,'2005-05-26
> > 00:00:00',514,'2005-05-26 00:00:00',1,'2005-05-26
00:00:00',1,'2005-05-26
> > 00:00:00')'
> >
> > conn=13579752, query='insert into
> >
>
syslog(datetimelocal,datetimeutc,datetimerfc822local,datetimerfc822utc,ipadd
>
resssource,hostnamesource,portsource,ipaddressdestination,portdestination,fa
> cility,facilitycode,priority,prioritycode,messagetext)
> > values('2005-05-26 17:41:25.798'::timestamp,'2005-05-26
> > 15:41:25.798'::timestamp,'2005-05-26 00:00:00','2005-05-26
> > 00:00:00','2005-05-26 00:00:00','2005-05-26 00:00:00',1079,'2005-05-26
> > 00:00:00',514,'2005-05-26 00:00:00',1,'2005-05-26
00:00:00',1,'2005-05-26
> > 00:00:00')'
> >
> > What about that?
> >
> > --
> > .---------- -------- ------ ---- ---- --- - -- -
> > | Bartek `saphire` Siebab
http://bartek.siebab.net >
>