Mailing List Archive

[patch] output module for PostgreSQL
Hi all!

As already mentioned in the forum: I've created an output module for
PostgreSQL.

The attached patch does the following:

* add plugins/ompgsql/*
* extend configure.ac and Makefile.am
* msg.h
** struct msg_t: add pszTIMESTAMP_PgSQL, add pszRcvdAt_PgSQL, fix typo
* msg.c
** getTimeGenerated(): add handling of tplFmtPgSQLDate
** getTimeReported(): add handling of tplFmtPgSQLDate
* syslogd.h:
** add definition of formatTimestampToPgSQL()
* syslogd.c:
** add StdPgSQLFmt
** mainThread(): include StdPgSQLFmt
* template.h:
** add tplFmtPgSQLDate to tplFormatTypes
* template.c:
** doOptions(): date-pgsql -> tplFmtPgSQLDate
** tplPrintList(): add tplFmtPgSQLDate to switch()

Please note that the patch has not yet been tested thoroughly, so until
that has been done, it is to be considered alpha quality.

If anyone wants to try it: any feedback is appreciated.

Regards,
sur5r

P.S.: I hope the patch survives mailman... ;)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rsyslog_ompgsql.diff
Url: http://lists.adiscon.net/pipermail/rsyslog/attachments/20071201/3543bb53/attachment.txt
[patch] output module for PostgreSQL [ In reply to ]
Jakob Haufe <sur5r at sur5r.net> wrote on Sat, 1 Dec 2007 22:36:44 +0100
in 20071201223644.036dccd6 at marathon.haufe:

> The attached patch does the following:
>
> * add plugins/ompgsql/*

Erm, yes. Maybe i should have noticed, that cvs doesn't recurse into
new subdirectories... so here are the files for the plugins/ompgsql
directory.
[patch] output module for PostgreSQL [ In reply to ]
Jakob Haufe <sur5r at sur5r.net> wrote on Sat, 1 Dec 2007 23:01:26 +0100
in 20071201230126.3537f120 at marathon.haufe:

> Jakob Haufe <sur5r at sur5r.net> wrote on Sat, 1 Dec 2007 22:36:44 +0100
> in 20071201223644.036dccd6 at marathon.haufe:
>
> > The attached patch does the following:
> >
> > * add plugins/ompgsql/*
>
> Erm, yes. Maybe i should have noticed, that cvs doesn't recurse into
> new subdirectories... so here are the files for the plugins/ompgsql
> directory.
Ok, mailman doesn't like any mimetypes but text/plain... next try *grml*
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile.am
Url: http://lists.adiscon.net/pipermail/rsyslog/attachments/20071201/0f6fc89b/attachment.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: createDB.sql
Url: http://lists.adiscon.net/pipermail/rsyslog/attachments/20071201/0f6fc89b/attachment-0001.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ompgsql.c
Url: http://lists.adiscon.net/pipermail/rsyslog/attachments/20071201/0f6fc89b/attachment-0002.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ompgsql.h
Url: http://lists.adiscon.net/pipermail/rsyslog/attachments/20071201/0f6fc89b/attachment-0003.txt
[patch] output module for PostgreSQL [ In reply to ]
2007/12/1, Jakob Haufe <sur5r at sur5r.net>:
> Jakob Haufe <sur5r at sur5r.net> wrote on Sat, 1 Dec 2007 23:01:26 +0100
> in 20071201230126.3537f120 at marathon.haufe:
>
> > Jakob Haufe <sur5r at sur5r.net> wrote on Sat, 1 Dec 2007 22:36:44 +0100
> > in 20071201223644.036dccd6 at marathon.haufe:
> >
> > > The attached patch does the following:
> > >
> > > * add plugins/ompgsql/*
> >
> > Erm, yes. Maybe i should have noticed, that cvs doesn't recurse into
> > new subdirectories... so here are the files for the plugins/ompgsql
> > directory.
> Ok, mailman doesn't like any mimetypes but text/plain... next try *grml*

Hi,

just a very minor nitpick in Makefile.am:
pkglibdir is by default defined to be $(libdir)/@PACKAGE@/ [1], so
there is no need to redefine it. Simply delete the first line.
plugins/ommysql/Makefile.am should be fixed accordingly.

It also seems that the configure.ac bits are missing.

Cheers,
Michael

[1] http://www.gnu.org/software/automake/manual/html_node/Uniform.html#Uniform
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
[patch] output module for PostgreSQL [ In reply to ]
Hi,

thanks to all for the great contributions! Let me just quickly outline
my plan, so that nobody is disappointed ;) I'll publish a new 1.19.12
release today. However, that will just hold some cleanup and fixes. When
I have done that, I'll begin to merge the patches into the
already-modified 1.20.0. I am not yet sure how much issues I will see
because there are a number of code changes in that release. I am also
not sure yet in which order I apply the patches, because one might be
better than the other. I'll announce when I have merged and will
probably post a test tarball here on the list before officially
releasing. My target for release is mid to end of week.

Rainer

> -----Original Message-----
> From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
> bounces at lists.adiscon.com] On Behalf Of Michael Biebl
> Sent: Sunday, December 02, 2007 11:10 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] [patch] output module for PostgreSQL
>
> 2007/12/1, Jakob Haufe <sur5r at sur5r.net>:
> > Jakob Haufe <sur5r at sur5r.net> wrote on Sat, 1 Dec 2007 23:01:26
+0100
> > in 20071201230126.3537f120 at marathon.haufe:
> >
> > > Jakob Haufe <sur5r at sur5r.net> wrote on Sat, 1 Dec 2007 22:36:44
> +0100
> > > in 20071201223644.036dccd6 at marathon.haufe:
> > >
> > > > The attached patch does the following:
> > > >
> > > > * add plugins/ompgsql/*
> > >
> > > Erm, yes. Maybe i should have noticed, that cvs doesn't recurse
> into
> > > new subdirectories... so here are the files for the
plugins/ompgsql
> > > directory.
> > Ok, mailman doesn't like any mimetypes but text/plain... next try
> *grml*
>
> Hi,
>
> just a very minor nitpick in Makefile.am:
> pkglibdir is by default defined to be $(libdir)/@PACKAGE@/ [1], so
> there is no need to redefine it. Simply delete the first line.
> plugins/ommysql/Makefile.am should be fixed accordingly.
>
> It also seems that the configure.ac bits are missing.
>
> Cheers,
> Michael
>
> [1]
>
http://www.gnu.org/software/automake/manual/html_node/Uniform.html#Unif
> orm
> --
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
[patch] output module for PostgreSQL [ In reply to ]
On Sun, 2 Dec 2007 23:10:07 +0100
"Michael Biebl" <mbiebl at gmail.com> wrote:

> just a very minor nitpick in Makefile.am:
> pkglibdir is by default defined to be $(libdir)/@PACKAGE@/ [1], so
> there is no need to redefine it. Simply delete the first line.
> plugins/ommysql/Makefile.am should be fixed accordingly.

Thanks for pointing this out. Unfortunately, I have no in-depth
knowledge of autotools, so I'm thankful for any suggestions.

> It also seems that the configure.ac bits are missing.

They are there, though hard to find.

MSGID 20071201223644.036dccd6 at marathon.haufe
contains the patch modifying existing files, namely:
msg.[ch], syslogd.[ch], template.[ch], configure.ac, Makefile.am

MSGID 20071201231011.5a27a361 at marathon.haufe
contains the files for plugins/ompgsql/*

Regards,
Jakob
[patch] output module for PostgreSQL [ In reply to ]
On Mon, 3 Dec 2007 08:10:44 +0100
"Rainer Gerhards" <rgerhards at hq.adiscon.com> wrote:

> thanks to all for the great contributions! Let me just quickly outline
> my plan, so that nobody is disappointed ;) I'll publish a new 1.19.12
> release today. However, that will just hold some cleanup and fixes.
> When I have done that, I'll begin to merge the patches into the
> already-modified 1.20.0. I am not yet sure how much issues I will see
> because there are a number of code changes in that release. I am also
> not sure yet in which order I apply the patches, because one might be
> better than the other. I'll announce when I have merged and will
> probably post a test tarball here on the list before officially
> releasing. My target for release is mid to end of week.

That's perfectly ok for me. But I definitely would appreciate any
feedback on ompgsql before officially releasing it. I do not expect any
problems with it but you never know...

So if anybody is going to test it, please give feedback.

Regards,
sur5r
[patch] output module for PostgreSQL [ In reply to ]
Just a quick update. I am right now integrating it and will review code
during this and once I am through. As I suspected, I need to do at least
some manual merging, as the source tree already changed and in some
places considerably (talking about 1.20.0!). So it would be good if you
could-re-test it once I can release an early test tarball.

I keep you updated.

Rainer

> -----Original Message-----
> From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
> bounces at lists.adiscon.com] On Behalf Of Jakob Haufe
> Sent: Monday, December 03, 2007 11:09 AM
> To: rsyslog at lists.adiscon.com
> Subject: Re: [rsyslog] [patch] output module for PostgreSQL
>
> On Mon, 3 Dec 2007 08:10:44 +0100
> "Rainer Gerhards" <rgerhards at hq.adiscon.com> wrote:
>
> > thanks to all for the great contributions! Let me just quickly
> outline
> > my plan, so that nobody is disappointed ;) I'll publish a new
1.19.12
> > release today. However, that will just hold some cleanup and fixes.
> > When I have done that, I'll begin to merge the patches into the
> > already-modified 1.20.0. I am not yet sure how much issues I will
see
> > because there are a number of code changes in that release. I am
also
> > not sure yet in which order I apply the patches, because one might
be
> > better than the other. I'll announce when I have merged and will
> > probably post a test tarball here on the list before officially
> > releasing. My target for release is mid to end of week.
>
> That's perfectly ok for me. But I definitely would appreciate any
> feedback on ompgsql before officially releasing it. I do not expect
any
> problems with it but you never know...
>
> So if anybody is going to test it, please give feedback.
>
> Regards,
> sur5r
>
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog