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
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