diff options
-rw-r--r-- | doc/imjournal.html | 11 | ||||
-rwxr-xr-x | plugins/imjournal/imjournal.c | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/doc/imjournal.html b/doc/imjournal.html index 30f07ff5..5a18d5d6 100644 --- a/doc/imjournal.html +++ b/doc/imjournal.html @@ -97,5 +97,16 @@ $template CEETemplate,"%TIMESTAMP% %HOSTNAME% %syslogtag% @cee: %$!all-json%\n" *.* :mmjsonparse: *.* /var/log/ceelog;CEETemplate </textarea> + +<p><b>Legacy Configuration Directoves</b>:</p> +<ul> +<li><strong>$ImjournalPersistStateInterval [lines]</strong><br> +It specifies how often should the journal state be persisted. This option is useful for rsyslog to start reading from the last journal message it read. +</li> +<li><strong>$ImjournalStateFile /path/to/file</strong><br> +It specifies where the state file for persisting journal state is located. +</li> +</ul> + </body> </html> diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c index 2445ff5d..74ef7115 100755 --- a/plugins/imjournal/imjournal.c +++ b/plugins/imjournal/imjournal.c @@ -84,7 +84,7 @@ static struct cnfparamblk modpblk = #define DFLT_persiststateinterval 10 -static int bLegacyCnfModGlobalsPermitted = 0;/* are legacy module-global config parameters permitted? */ +static int bLegacyCnfModGlobalsPermitted = 1;/* are legacy module-global config parameters permitted? */ static prop_t *pInputName = NULL; /* there is only one global inputName for all messages generated by this module */ static prop_t *pLocalHostIP = NULL; /* a pseudo-constant propterty for 127.0.0.1 */ @@ -673,13 +673,13 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(prop.CreateStringProp(&pInputName, UCHAR_CONSTANT("imjournal"), sizeof("imjournal") - 1)); CHKiRet(prop.CreateStringProp(&pLocalHostIP, UCHAR_CONSTANT("127.0.0.1"), sizeof("127.0.0.1") - 1)); - CHKiRet(omsdRegCFSLineHdlr((uchar *)"persiststateinterval", 0, eCmdHdlrInt, + CHKiRet(omsdRegCFSLineHdlr((uchar *)"imjournalpersiststateinterval", 0, eCmdHdlrInt, NULL, &cs.iPersistStateInterval, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"imjournalratelimitinterval", 0, eCmdHdlrInt, NULL, &cs.ratelimitInterval, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"imjournalratelimitburst", 0, eCmdHdlrInt, NULL, &cs.ratelimitBurst, STD_LOADABLE_MODULE_ID)); - CHKiRet(omsdRegCFSLineHdlr((uchar *)"statefile", 0, eCmdHdlrGetWord, + CHKiRet(omsdRegCFSLineHdlr((uchar *)"imjournalstatefile", 0, eCmdHdlrGetWord, NULL, &cs.stateFile, STD_LOADABLE_MODULE_ID)); |