From 3073cb3db1e74827025598396f37b0fb35638879 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 8 Aug 2008 13:59:37 +0200 Subject: preparing for 3.18.2 release --- ChangeLog | 2 +- doc/manual.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35d9d251..7def1fbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ --------------------------------------------------------------------------- -Version 3.18.2 (rgerhards), 2008-07-?? +Version 3.18.2 (rgerhards), 2008-08-08 - merged in IPv6 forwarding address bugfix from v2-stable --------------------------------------------------------------------------- Version 3.18.1 (rgerhards), 2008-07-21 diff --git a/doc/manual.html b/doc/manual.html index eb5fe52d..eae38d1c 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -16,7 +16,7 @@ relay chains while at the same time being very easy to setup for the novice user. And as we know what enterprise users really need, there is also professional rsyslog support available directly from the source!

-

This documentation is for version 3.18.1 (v3-stable branch) of rsyslog. +

This documentation is for version 3.18.2 (v3-stable branch) of rsyslog. Visit the rsyslog status page to obtain current version information and project status.

If you like rsyslog, you might -- cgit From 018b2f4c86ca2e4849156db1b1d5b6b3ea9b3e0c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 12 Aug 2008 10:56:48 +0200 Subject: bugfix: misspelled config directive + bumped version number Previously was $MainMsgQueueWorkeTimeoutrThreadShutdown, is now $MainMsgQueueWorkerTimeoutThreadShutdown. Note that the misspelled directive is not preserved - if the misspelled directive was used (which I consider highly unlikely), the config file must be changed. Thanks to lperr for reporting the bug. --- ChangeLog | 8 ++++++++ configure.ac | 2 +- doc/manual.html | 2 +- syslogd.c | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7def1fbe..c3155874 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ --------------------------------------------------------------------------- +Version 3.18.3 (rgerhards), 2008-08-?? +- bugfix: misspelled config directive, previously was + $MainMsgQueueWorkeTimeoutrThreadShutdown, is now + $MainMsgQueueWorkerTimeoutThreadShutdown. Note that the misspelled + directive is not preserved - if the misspelled directive was used + (which I consider highly unlikely), the config file must be changed. + Thanks to lperr for reporting the bug. +--------------------------------------------------------------------------- Version 3.18.2 (rgerhards), 2008-08-08 - merged in IPv6 forwarding address bugfix from v2-stable --------------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 4c7aac3c..314dc10f 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[3.18.2],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[3.18.3],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([syslogd.c]) AC_CONFIG_HEADERS([config.h]) diff --git a/doc/manual.html b/doc/manual.html index eae38d1c..f56b6db6 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -16,7 +16,7 @@ relay chains while at the same time being very easy to setup for the novice user. And as we know what enterprise users really need, there is also professional rsyslog support available directly from the source!

-

This documentation is for version 3.18.2 (v3-stable branch) of rsyslog. +

This documentation is for version 3.18.3 (v3-stable branch) of rsyslog. Visit the rsyslog status page to obtain current version information and project status.

If you like rsyslog, you might diff --git a/syslogd.c b/syslogd.c index 35e91af0..26a15293 100644 --- a/syslogd.c +++ b/syslogd.c @@ -2693,7 +2693,7 @@ static rsRetVal loadBuildInModules(void) CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuetimeoutshutdown", 0, eCmdHdlrInt, NULL, &iMainMsgQtoQShutdown, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuetimeoutactioncompletion", 0, eCmdHdlrInt, NULL, &iMainMsgQtoActShutdown, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuetimeoutenqueue", 0, eCmdHdlrInt, NULL, &iMainMsgQtoEnq, NULL)); - CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueueworketimeoutrthreadshutdown", 0, eCmdHdlrInt, NULL, &iMainMsgQtoWrkShutdown, NULL)); + CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueueworkertimeoutthreadshutdown", 0, eCmdHdlrInt, NULL, &iMainMsgQtoWrkShutdown, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuedequeueslowdown", 0, eCmdHdlrInt, NULL, &iMainMsgQDeqSlowdown, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueueworkerthreadminimummessages", 0, eCmdHdlrInt, NULL, &iMainMsgQWrkMinMsgs, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuemaxfilesize", 0, eCmdHdlrSize, NULL, &iMainMsgQueMaxFileSize, NULL)); -- cgit From 02f768c37dac9dde424bbd31e378482750fc276c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 12 Aug 2008 16:08:09 +0200 Subject: enhanced ommysql to support custom port to connect to server Port can be set via new $ActionOmmysqlServerPort config directive Note: this was a very minor change and thus deemed appropriate to be done in the stable release. --- ChangeLog | 4 ++++ configure.ac | 2 +- doc/ommysql.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++ doc/rsyslog_conf.html | 2 +- plugins/ommysql/ommysql.c | 24 +++++++++++++++++++++--- 5 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 doc/ommysql.html diff --git a/ChangeLog b/ChangeLog index c3155874..931ff5ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ --------------------------------------------------------------------------- Version 3.18.3 (rgerhards), 2008-08-?? +- enhanced ommysql to support custom port to connect to server + Port can be set via new $ActionOmmysqlServerPort config directive + Note: this was a very minor change and thus deemed appropriate to be + done in the stable release. - bugfix: misspelled config directive, previously was $MainMsgQueueWorkeTimeoutrThreadShutdown, is now $MainMsgQueueWorkerTimeoutThreadShutdown. Note that the misspelled diff --git a/configure.ac b/configure.ac index 314dc10f..caffe01e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[3.18.3],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[3.18.3-Test3],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([syslogd.c]) AC_CONFIG_HEADERS([config.h]) diff --git a/doc/ommysql.html b/doc/ommysql.html new file mode 100644 index 00000000..79d913eb --- /dev/null +++ b/doc/ommysql.html @@ -0,0 +1,46 @@ + + + +MySQL Database Output Module + + + +

MySQL Database Output Module

+

Module Name:    ommysql

+

Author: Michael Meckelein (Initial Author) / Rainer Gerhards +<rgerhards@adiscon.com>

+

Description:

+

This module provides native support for logging to MySQL databases. It offers +superior performance over the more generic omlibdbi module. +

+

Configuration Directives:

+

ommysql mostly uses the "old style" configuration, with almost everything on the +action line itself. A few newer features are being migrated to the new style-config +directive configuration system. +

+

Sample:

+

The following sample writes all syslog messages to the +database "syslog_db" on mysqlsever.example.com. The server is +being accessed under the account of "user" with password "pwd". +

+ +

[rsyslog.conf overview] +[manual index] [rsyslog site]

+

This documentation is part of the +rsyslog +project.
+Copyright © 2008 by Rainer Gerhards and +Adiscon. +Released under the GNU GPL version 3 or higher.

+ diff --git a/doc/rsyslog_conf.html b/doc/rsyslog_conf.html index e65be0bc..330fd51c 100644 --- a/doc/rsyslog_conf.html +++ b/doc/rsyslog_conf.html @@ -30,7 +30,7 @@ trap output module
  • omrelp - RELP output module
  • omgss - output module for GSS-enabled syslog
  • -
  • ommysql - output module for MySQL
  • +
  • ommysql - output module for MySQL
  • ompgsql - output module for PostgreSQL
  • omlibdbi - generic database output module (Firebird/Interbase, MS SQL, Sybase, diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c index 0522e31d..807351d2 100644 --- a/plugins/ommysql/ommysql.c +++ b/plugins/ommysql/ommysql.c @@ -44,6 +44,7 @@ #include "ommysql.h" #include "module-template.h" #include "errmsg.h" +#include "cfsysline.h" MODULE_TYPE_OUTPUT @@ -55,12 +56,16 @@ DEFobjCurrIf(errmsg) typedef struct _instanceData { MYSQL *f_hmysql; /* handle to MySQL */ char f_dbsrv[MAXHOSTNAMELEN+1]; /* IP or hostname of DB server*/ + unsigned int f_dbsrvPort; /* port of MySQL server */ char f_dbname[_DB_MAXDBLEN+1]; /* DB name */ char f_dbuid[_DB_MAXUNAMELEN+1]; /* DB user */ char f_dbpwd[_DB_MAXPWDLEN+1]; /* DB user's password */ unsigned uLastMySQLErrno; /* last errno returned by MySQL or 0 if all is well */ } instanceData; +/* config variables */ +static int iSrvPort = 0; /* database server port */ + BEGINcreateInstance CODESTARTcreateInstance @@ -150,7 +155,7 @@ static rsRetVal initMySQL(instanceData *pData, int bSilent) } else { /* we could get the handle, now on with work... */ /* Connect to database */ if(mysql_real_connect(pData->f_hmysql, pData->f_dbsrv, pData->f_dbuid, - pData->f_dbpwd, pData->f_dbname, 0, NULL, 0) == NULL) { + pData->f_dbpwd, pData->f_dbname, pData->f_dbsrvPort, NULL, 0) == NULL) { reportDBError(pData, bSilent); closeMySQL(pData); /* ignore any error we may get */ iRet = RS_RET_SUSPENDED; @@ -273,6 +278,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) errmsg.LogError(NO_ERRCODE, "Trouble with MySQL connection properties. -MySQL logging disabled"); ABORT_FINALIZE(RS_RET_INVALID_PARAMS); } else { + pData->f_dbsrvPort = (unsigned) iSrvPort; /* set configured port */ pData->f_hmysql = NULL; /* initialize, but connect only on first message (important for queued mode!) */ } @@ -291,12 +297,24 @@ CODEqueryEtryPt_STD_OMOD_QUERIES ENDqueryEtryPt +/* Reset config variables for this module to default values. + */ +static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal) +{ + DEFiRet; + iSrvPort = 0; /* zero is the default port */ + RETiRet; +} + BEGINmodInit() CODESTARTmodInit *ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(objUse(errmsg, CORE_COMPONENT)); + /* register our config handlers */ + CHKiRet(omsdRegCFSLineHdlr((uchar *)"actionommysqlserverport", 0, eCmdHdlrInt, NULL, &iSrvPort, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID)); ENDmodInit -/* - * vi:set ai: + +/* vi:set ai: */ -- cgit From 8eb888d049da12e1294a7688432b6325794ade32 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 13 Aug 2008 14:38:23 +0200 Subject: disabled flow control for imuxsock It could cause system hangs under some circumstances. The devel (3.21.3 and above) will re-enable it and provide enhanced configurability to overcome the problems if they occur. --- ChangeLog | 4 ++++ plugins/imuxsock/imuxsock.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 931ff5ec..8933f88a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,10 @@ Version 3.18.3 (rgerhards), 2008-08-?? directive is not preserved - if the misspelled directive was used (which I consider highly unlikely), the config file must be changed. Thanks to lperr for reporting the bug. +- disabled flow control for imuxsock, as it could cause system hangs + under some circumstances. The devel (3.21.3 and above) will + re-enable it and provide enhanced configurability to overcome the + problems if they occur. --------------------------------------------------------------------------- Version 3.18.2 (rgerhards), 2008-08-08 - merged in IPv6 forwarding address bugfix from v2-stable diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index f8798039..60ccaffb 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -181,7 +181,7 @@ static rsRetVal readSocket(int fd, int bParseHost, int flags) iRcvd = recv(fd, line, MAXLINE - 1, 0); dbgprintf("Message from UNIX socket: #%d\n", fd); if (iRcvd > 0) { - parseAndSubmitMessage((char*)LocalHostName, line, iRcvd, bParseHost, flags, eFLOWCTL_LIGHT_DELAY); + parseAndSubmitMessage((char*)LocalHostName, line, iRcvd, bParseHost, flags, eFLOWCTL_NO_DELAY); } else if (iRcvd < 0 && errno != EINTR) { char errStr[1024]; rs_strerror_r(errno, errStr, sizeof(errStr)); -- cgit