49 Commits

Author SHA1 Message Date
Rainer Gerhards
90f8c73004 bugfix: problems in failover action handling
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=270 (not yet confirmed!)
2011-06-16 15:17:48 +02:00
Rainer Gerhards
2fc70320e3 Merge branch 'v5-stable' into v5-beta
Conflicts:
	tests/Makefile.am
2011-03-16 15:08:53 +01:00
Rainer Gerhards
9e18ecc9bd fixed a regression of last patch and some cleanup 2011-03-16 15:04:43 +01:00
Rainer Gerhards
ce1860a0bc bugfix: failover did not work correctly if repeated msg reduction was on
affected directive was: $ActionExecOnlyWhenPreviousIsSuspended on
2011-03-16 14:40:36 +01:00
Rainer Gerhards
39406781e5 bugfix: minor race condition in action.c - considered cosmetic
This is considered cosmetic as multiple threads tried to write exactly
the same value into the same memory location without sync. The method
has been changed so this can no longer happen.
2011-02-17 15:12:54 +01:00
Rainer Gerhards
0d721450eb added missing support for systems without atomic instructions 2010-06-24 14:01:05 +02:00
Rainer Gerhards
f48128f34a fixed a couple of regressions
by implementing some code that was missing so far ;) as well as
finding some real bugs. I also did some general cleanup, removing
debug strings and such. This code should be fairly OK to use, except
when "exec only when previous action was suspended" is used -- this is
NOT yet re-implemented in the tuned engine.
2010-06-23 12:48:27 +02:00
Rainer Gerhards
74135da959 some cleanup
as well as some work in preparation of storing doAction params inside
the batch
2010-06-10 12:24:22 +02:00
Rainer Gerhards
13b5c6b145 fixed regression for omruleset use case
I did not revert to using the action ppMsg data element, as one of the
next steps is to remove it by an overall much better solution.
2010-06-10 10:40:04 +02:00
Rainer Gerhards
11bd517465 added support for high-performance action queue submission if not all mark messages should be logged
this was previously not properly handeld. This is also the first occurence of
a (real) CAS loop inside rsyslog. Note that the performance is now very well
in the default configuration, and mark message directives are still correctly
being handled. So this code looks close to final, but needs to have some
bug cleanup as the testsuite shows.
2010-06-08 15:20:33 +02:00
Rainer Gerhards
3e49a1075a performance enhancement: implemented stage 1 firehose mode for actions
... plus some other tests, namely string generation in parallel to action
processing. The code is not yet solid and not fully compatible to
older versions. But it is good enough for an early commit and some
early testing/gaining of experience.

The optimization was done based on the fine-grained partitioning
paradigm worked on the past couple of weeks -- seems to work out
really great :)
2010-06-08 12:46:24 +02:00
Rainer Gerhards
af8582e509 added new cancel-reduced action thread termination method
We now manage to cancel threads that block inside a retry loop to
terminate without the need to cancel the thread. Avoiding cancellation
helps keep the system complexity minimal and thus provides for better
stability. This also solves some issues with improper shutdown when
inside an action retry loop.
2010-05-17 14:24:27 +02:00
Rainer Gerhards
9cf1756dc6 adapted merged code to v5 engine 2010-04-26 18:05:08 +02:00
Rainer Gerhards
ed7f89a49c Merge branch 'v5-stable' 2010-04-26 15:55:51 +02:00
Rainer Gerhards
eec894fbc5 bugfix(kind of): output plugin retry behaviour could cause engine to loop
The rsyslog engine did not guard itself against output modules that do
not properly convey back the tryResume() behaviour. This then leads to
what looks like an endless loop. I consider this to be a bug of the
engine not only because it should be hardened against plugin misbehaviour,
but also because plugins may not be totally able to avoid this situation
(depending on the type of and processing done by the plugin).
2010-04-26 15:19:13 +02:00
Rainer Gerhards
c4b0f6bcae Merge branch 'v4-devel' into master
Conflicts:
	runtime/rsyslog.h
	runtime/wtp.c
2010-04-23 11:43:00 +01:00
Rainer Gerhards
3a12d05433 solved alignment errors on Solaris Sparc 2010-04-22 14:38:12 +01:00
Rainer Gerhards
38cb392672 replaced data type "bool" by "sbool" because this created some portability issues 2010-02-02 15:51:01 +01:00
Rainer Gerhards
05d693123b added omruleset output module, which provides great flexibility in action processing.
THIS IS A VERY IMPORTANT ADDITION, see its doc for why.
2009-11-02 11:39:38 +01:00
Rainer Gerhards
f3134f8921 some more cleanup - action config line handlers are now defined in action.c
As an artifact of early development, they were registered in syslogd.c
2009-10-27 15:16:10 +01:00
Rainer Gerhards
c7f746d834 added new config option $ActionWriteAllMarkMessages
this option permites to process mark messages under all circumstances,
even if an action was recently called. This can be useful to use mark
messages as a kind of heartbeat.
2009-08-20 12:52:33 +02:00
Rainer Gerhards
5defa14fed some post-merge cleanup 2009-06-22 15:32:01 +02:00
Rainer Gerhards
651bee9cf5 Merge branch 'omfile' into tmp
This was a complex manual merge, especially in action.c. So if
there occur some problems, this would be a good point to start
troubleshooting. I run a couple of tests before commiting and
they all went well.

Conflicts:
	action.c
	action.h
	runtime/queue.c
	runtime/queue.h
	runtime/wti.c
	runtime/wti.h
2009-06-22 15:12:35 +02:00
Rainer Gerhards
3abf567d2b optimized template string generation 2009-06-19 16:07:17 +02:00
Rainer Gerhards
cbad28915a optimized action.c a bit 2009-06-19 12:39:06 +02:00
Rainer Gerhards
21b7f7e603 Merge branch 'master' into multi-dequeue
Conflicts:
	runtime/rsyslog.h
2009-05-12 09:18:04 +02:00
Rainer Gerhards
8e430258fd added capability to draw configuration graphs
- added $GenerateConfigGraph configuration command which can be used
  to generate nice-looking (and very informative) rsyslog configuration
  graphs.
- added $ActionName configuration directive (currently only used for
  graph generation, but may find other uses)
2009-05-11 17:38:33 +02:00
Rainer Gerhards
68877497a1 first shot at action state machine implemention (untested)
I am commiting it so that the code is visible, but will no begin
with the test environment.
2009-05-07 10:44:46 +02:00
Rainer Gerhards
ec0e2c3e7d added a new way how output plugins may be passed parameters.
This is more efficient for some outputs. They new can receive fields not only
as a single string but rather in an array where each string is seperated.
2009-04-03 12:51:02 +02:00
Rainer Gerhards
2e388db9ac integrated various patches for solaris
Unfortunatley, I do not have the full list of contributors
available. The patch set was compiled by Ben Taylor, and I made
some further changes to adopt it to the news rsyslog branch. Others
provided much of the base work, but I can not find the names of the
original authors. If you happen to be one of them, please let me
know so that I can give proper credits.
2009-03-05 11:10:43 +01:00
Rainer Gerhards
6ce4a9d605 added new config directive $RepeatedMsgContainsOriginalMsg
so that the "last message repeated n times" messages, if generated, may
have an alternate format that contains the message that is being repeated.
Note that this is on an action-by-action basis.
2009-02-02 15:28:24 +01:00
Rainer Gerhards
6334d335d8 added configuration directive "HUPisRestart"
...which enables to configure HUP to be either a full restart
or "just" a leightweight way to close open files
2008-10-23 14:46:47 +02:00
Rainer Gerhards
bcb9765068 consolidated time() calls in rule engine
... but did not manage to avoid doing at least one call. So
this change introduced performance benefit only in a few
non-common situations. Anyhow, it hopefully levels ground
for better things to come.
2008-09-16 14:57:12 +02:00
Rainer Gerhards
1480263b02 added ability to execute actions only after the n-th call of the action
This also lead to the addition of two new config directives:
$ActionExecOnlyEveryNthTime and $ActionExecOnlyEveryNthTimeTimeout
This feature is useful, for example, for alerting: it permits you to
send an alert only after at least n occurences of a specific message
have been seen by rsyslogd. This protectes against false positives
due to waiting for additional confirmation.
2008-08-07 16:52:31 +02:00
Rainer Gerhards
185bc5f8e1 implemented $ActionExecOnlyOnceEveryInterval config directive 2008-04-08 12:54:09 +02:00
Rainer Gerhards
e946e122d0 implemented module unload handling (required a number of interface changes) 2008-03-11 16:43:13 +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
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
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
9843274dc9 bugfixing newly added action code 2008-01-29 14:18:12 +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
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
214c7bd7f8 added new modExit() entry point to loadable module interface 2007-11-21 10:09:02 +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