46 Commits

Author SHA1 Message Date
Rainer Gerhards
8cb83af111 bugfix: incorrect default discard severity could cause message loss
default discard severity was incorrectly set to 4, which lead
to discard-on-queue-full to be enabled by default. That could cause
message loss where non was expected.  The default has now been changed
to the correct value of 8, which disables the functionality. This
problem applied both to the main message queue and the action queues.
Thanks to Raoul Bhatia for pointing out this problem.
2008-09-10 08:14:12 +02:00
varmojfekoj
6cbc5652dd bugfix: action was not called when system time was set backwards
(until the previous time was reached again). There are still some
side-effects when time is rolled back (A time rollback is really a bad
thing to do, ideally the OS should issue pseudo time (like NetWare did)
when the user tries to roll back time).

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2008-09-01 16:00:22 +02:00
Rainer Gerhards
185bc5f8e1 implemented $ActionExecOnlyOnceEveryInterval config directive 2008-04-08 12:54:09 +02:00
Rainer Gerhards
46fbfee41e added the capability to specify a processing (actually dequeue) timeframe
with queues - so things can be configured to be done at off-peak hours
2008-04-03 13:19:48 +00:00
Rainer Gerhards
fd7e1fc72e changed queue's discard severities default value to 8 (do not discard) to
prevent unintentional message loss
2008-03-22 09:53:07 +00:00
Rainer Gerhards
fdfcb2a8f9 added advanced flow control for congestion cases (mode depending on message
source and its capablity to be delayed without bad side effects)
2008-03-14 11:04:36 +00:00
Rainer Gerhards
b571fdc61a fixed some compiler warnings under FreeBSD 2008-03-06 16:05:44 +00:00
Rainer Gerhards
f2e01f85bc shuffled some more code from syslogd.c to the right places 2008-03-05 17:11:09 +00:00
Rainer Gerhards
1560e84ff8 moved date/time handling functions to their own object (2nd pass) 2008-03-05 16:37:16 +00:00
Rainer Gerhards
056c60ec3d bugfix: actions were not correctly retried; caused message loss 2008-03-05 15:39:33 +00:00
Rainer Gerhards
24b02dc831 - extracted logerror*() family of functions from syslogd, made them their
own class and converted to new object calling conventions
    (interface-based)
- converted gss-misc into a loadable library module
2008-03-05 14:53:25 +00:00
Rainer Gerhards
545346e697 - changed modules.c calling conventions to be interface-based
- moved module loader from conf.c to module.c, where it belongs
- made the necessary plumbing to auto-load library modules
- upgraded debug system to include iRet in function exit message
- changed module interface so that instances need only to be supported by
    output plugins (if we actually need them for input plugins, we can
    always add it again...)
- milestone: first implementation of library modules (but do not get
    unloaded on exit/hup so far)
2008-03-05 10:30:06 +00:00
Rainer Gerhards
4412b88148 changed obj base object's calling interface to use the new obj_if_t
interface structure
2008-02-29 09:14:10 +00:00
Rainer Gerhards
e06557a4cd implemented environment-settable debug options 2008-02-28 13:25:43 +00:00
Rainer Gerhards
3ecce195ac bugfix: message object was not properly synchronized when the main queue
had a single thread and non-direct action queues were used
2008-02-20 15:11:27 +00:00
Rainer Gerhards
1227440714 bugfix: fixed abort when invalid template was provided to an action bug:
http://bugzilla.adiscon.com/show_bug.cgi?id=4
2008-02-18 09:42:04 +00:00
Rainer Gerhards
c950966d44 - implemented $ActionLibdbiDriverDirectory config directive
- some cleanup
- doc improvements
2008-02-15 12:47:28 +00:00
Rainer Gerhards
7e91b2298d removed some left-over unnecessary dbgprintf's 2008-02-13 08:57:39 +00:00
Rainer Gerhards
69dc3a4e56 - improved diagnostic information for abort cases
- some initial effort for malloc/free debugging support
- bugfix: using dynafile actions caused rsyslogd abort
2008-02-12 17:03:26 +00:00
Rainer Gerhards
2d9239beca bugfix: discard action and backup actions did not work due to problem in
direct queue mode. Now fixed. Tracker was
    http://sourceforge.net/tracker/index.php?func=detail&aid=1886931&group_
    id=123448&atid=696552
2008-02-12 13:58:49 +00:00
Rainer Gerhards
13d90a2386 removed debug message 2008-02-11 08:43:41 +00:00
Rainer Gerhards
41fb70130f bugfix: having fun with 32/64 bit portability - after 15 years, I finally
was trapped again ;) -- now fixed, sizes > 2GB supported on 32bit
    platforms
2008-01-31 12:54:10 +00:00
Rainer Gerhards
77358e12ab - fixed bug in sample rsyslog.conf
- fixed wrong action suspend/resume handling
- we have some issue with the mutx in dbgoprint, but that is acceptable for
    the time being, I just removed the deadlock codition (debug system
    only)
2008-01-31 11:32:25 +00:00
Rainer Gerhards
ef1671ac6b - rename $<obj>TimoutWorkerThreadShutdown to
$<obj>WorkerTimoutThreadShutdown for consistency reasons
- changed default for action queue size to 1000 elements (more reasonable
    here)
- fixed bug in sample rsyslog.conf
2008-01-31 09:38:46 +00:00
Rainer Gerhards
0e3b40fd8a - implemented limiting disk space allocated to queues
- addded $MainMsgQueueMaxDiskSpace config directive
- addded $ActionQueueMaxDiskSpace config directive
2008-01-30 19:07:23 +00:00
Rainer Gerhards
6cc46b15d9 - implemented simple output rate limiting
- addded $ActionQueueDequeueSlowdown config directive
- addded $MainMsgQueueDequeueSlowdown config directive
- bugfix: MsgDup() did not work with new base object data structure
2008-01-30 15:37:23 +00:00
Rainer Gerhards
61b1010461 - changed the ommysql output plugin so that the (lengthy) connection
initialization now takes place in message processing. This works much
    better with the new queued action mode (fast startup)
- fixed a newly introduced bug that caused output module's doAction entry
    point to be called on more than one thread under some circumstances
2008-01-30 13:07:44 +00:00
Rainer Gerhards
09a99b4d97 fixed a bug that caused $MainMsgQueueCheckpointInterval to work incorrectly 2008-01-30 09:16:27 +00:00
Rainer Gerhards
f547af1f86 finally implemented infinite action retries via -1 retry count 2008-01-30 08:28:33 +00:00
Rainer Gerhards
4984c1ba6c - renamed Msg object to usual all-lowercase object name (else we ran into
troubles with the framework, also it was somewhat ugly...)
- fixed a memory leak in object destruction (was recently introduced by
    object naming, not present in any released version)
2008-01-30 08:02:42 +00:00
Rainer Gerhards
7adc80509c action queue params are reset to default for each action 2008-01-29 15:57:31 +00:00
Rainer Gerhards
9843274dc9 bugfixing newly added action code 2008-01-29 14:18:12 +00:00
Rainer Gerhards
23dd725925 - fine tuning on queue naming
- action queues are now also named (otherwise you can't read the debug log
    ;))
2008-01-29 11:13:12 +00:00
Rainer Gerhards
33a8ec9855 - moved correct retry logic into action processing queue
- removed debugging support from sync class, debug class now provides much
    more
2008-01-29 09:13:59 +00:00
Rainer Gerhards
8b73362a4a - improved debug support a bit (assertions)
- restructured code, moved some part out of syslogd.c to action.c, where
    they belong (still some more to do in that regard ;))
2008-01-29 08:35:26 +00:00
Rainer Gerhards
c77519ab7b - implemented the $ActionResumeRetryCount config directive
- added queue between main queue and action executor (currently works in
    "direct" mode only, else crashes)
- added $ActionQueueFilename config directive
- added $ActionQueueSize config directive
- added $ActionQueueHighWaterMark config directive
- added $ActionQueueLowWaterMark config directive
- added $ActionQueueDiscardMark config directive
- added $ActionQueueDiscardSeverity config directive
- added $ActionQueueCheckpointInterval config directive
- added $ActionQueueType config directive
- added $ActionQueueWorkerThreads config directive
- added $ActionQueueTimeoutshutdown config directive
- added $ActionQueueTimeoutActionCompletion config directive
- added $ActionQueueTimeoutenQueue config directive
- added $ActionQueueTimeoutworkerThreadShutdown config directive
- added $ActionQueueWorkerThreadMinimumMessages config directive
- added $ActionQueueMaxFileSize config directive
- added $ActionQueueSaveonShutdown config directive
2008-01-28 17:39:46 +00:00
Rainer Gerhards
ad2f1c7e6d implemented the $ActionResumeRetryCount config directive 2008-01-28 16:05:11 +00:00
Rainer Gerhards
5c686c8adc redesigned queue to utilize helper classes for threading support. This is
finally in a running state for regular (non disk-assisted) queues, with
    a minor nit at shutdown. So I can finally commit the work again to
    CVS...
2008-01-24 17:55:09 +00:00
Rainer Gerhards
ed0363210c worked on threading 2008-01-17 12:45:10 +00:00
Rainer Gerhards
004229dda6 changed license to GPLv3 (for what is to become rsyslog v3) 2007-12-14 11:21:57 +00:00
Rainer Gerhards
3e95f05457 fixed a potential race condition, see link for details:
http://rgerhards.blogspot.com/2007/12/rsyslog-race-condition.html
2007-12-11 16:26:22 +00:00
Rainer Gerhards
1847d2d61d fixed some type warnings that appeared on 64 bit machines - these were in
debug statements, so indicated no real problem
2007-12-07 11:46:18 +00:00
Michael Meckelein
f2511d3c61 changed rsyslog.h include order to solve debian sid zlib inlcude issue 2007-08-08 10:49:38 +00:00
Rainer Gerhards
e276e32d42 added config file directive $ActionResumeInterval 2007-08-08 09:59:28 +00:00
Rainer Gerhards
fed254a29f changed function name dprintf() to dbgprintf() as it conflicts with the
clib
2007-08-08 08:20:06 +00:00
Rainer Gerhards
acb7dae3ae moved action object out of syslogd.c to its own fileset (action.c/h) 2007-08-06 20:51:52 +00:00