329 Commits

Author SHA1 Message Date
Tomas Heinrich
ba4cc3298c bugfix: add a missing flag and prevent memleak 2014-07-11 11:49:22 +02:00
Tomas Heinrich
b43b16901e bugfix: correct variable mismatch 2014-07-11 11:49:22 +02:00
Tomas Heinrich
28277f723e bugfix: don't export uninitialized data 2014-07-11 11:49:22 +02:00
Tomas Heinrich
dcb201eae6 bugfix: remove duplicate code 2014-07-11 11:49:22 +02:00
Rainer Gerhards
499b3c7426 fix small memleak in action()
This was introduced by a recent patch. Not present in any
released version.
2014-07-11 09:27:30 +02:00
Rainer Gerhards
cda27324b8 bugfix: output modules with parameters with multiple passing modes could cause strange behaviour including aborts
This was due to the fact that the action module only preserved and
processed the last set passing mode. Note that this was not a problem
for the plugins provided by the rsyslog git: none of them uses different
passing modes.
Thanks to Tomas Heinrich for providing a very detailled bug report.
2014-07-06 17:48:30 +02:00
Rainer Gerhards
1b29f59615 add global and action-parameter action.reportSuspensionContinuation 2014-03-01 11:30:04 +01:00
Rainer Gerhards
142332e227 bugfix: invalid error number was logged 2014-02-28 14:09:40 +01:00
Rainer Gerhards
2ed88403e8 emit "action resumed" message only when the resume was actually successful 2014-02-28 12:59:07 +01:00
Rainer Gerhards
fa5f2aab10 added "action.reportSuspension" action parameter
This now permits to control handling on a per-action basis rather to
the previous "global setting only".
2014-02-27 18:32:13 +01:00
Rainer Gerhards
738e58dcf6 bugfix: "action xxx suspended" did report incorrect error code 2014-02-23 12:18:02 +01:00
Rainer Gerhards
87c639fb93 "action resumed" message now also specifies module type
which makes troubleshooting a bit easier. Note that we cannot output all
the config details (like destination etc) as this would require much more
elaborate code changes, which we at least do not like to do in the
stable version.
2014-02-23 12:13:20 +01:00
Rainer Gerhards
28b7608b82 better and more consistent action object naming
action queues now always contain the word "queue" after the action name
2014-02-23 11:46:36 +01:00
Rainer Gerhards
8bf869fafb actions now report if they suspend and resume themselves 2013-11-29 15:43:23 +01:00
Rainer Gerhards
c3d80cd3b0 add new impstats action counters:
* suspended
  * suspended.duration
  * resumed
2013-11-29 15:13:22 +01:00
Rainer Gerhards
487ef81de6 bugfix: action suspend timeout was not increased 2013-11-29 14:25:08 +01:00
Rainer Gerhards
245cc02934 emit internal message when action is suspended and resumed 2013-11-29 11:10:41 +01:00
Rainer Gerhards
1ea869ec54 use const keyword at (some) appropriate places 2013-11-29 09:16:03 +01:00
Rainer Gerhards
98e5663055 queue.workerThreadMinimumMessage set to queue.size / num workers 2013-11-19 18:20:18 +01:00
Rainer Gerhards
020fe0dcc4 bugfix: legacy directive $ActionQueueWorkerThreads was not honored 2013-11-19 18:18:10 +01:00
Rainer Gerhards
cdce0bde4b queue: auto-adjust watermarks 2013-11-19 17:46:19 +01:00
Rainer Gerhards
3bec3ef53e emit warning message if output module with msg passing mode runs asynchronously 2013-11-07 15:37:13 +01:00
Rainer Gerhards
6b0e236cdf cleanup unreachable code 2013-11-06 13:06:48 +01:00
Rainer Gerhards
fbc737d650 experimental: make impstats return delta values where possible 2013-09-07 15:58:09 +02:00
Rainer Gerhards
8d4a5152cb Merge branch 'v7-stable' 2013-09-03 11:54:20 +02:00
hwoarang
1c71b9628b make rsyslog use the new json-c pkgconfig file if available 2013-09-03 11:38:01 +02:00
Rainer Gerhards
415b26d5a1 enable shuffling of crypto parameters down through queue definition 2013-05-10 15:39:42 +02:00
Rainer Gerhards
d0cefac7a7 cleanup 2013-04-24 11:09:37 +02:00
Rainer Gerhards
2e86f78d59 Merge branch 'v7-stable' 2013-04-12 09:13:10 +02:00
Rainer Gerhards
6773add66a bugfix: parameter action.execOnlyWhenPreviousIsSuspended was accidently of integer-type
For obvious reasons, it needs to be boolean. Note that this change
can break existing configurations if they circumvented
the problem by using 0/1 values.
2013-04-12 09:12:05 +02:00
Rainer Gerhards
acd140f653 Merge branch 'c7' into tmp
Conflicts:
	ChangeLog
	configure.ac
	runtime/queue.c
2013-04-09 11:29:39 +02:00
Rainer Gerhards
86e34c6985 make imrelp properly terminate on system shutdown
it didn't do so if it was inside a retry loop
2013-04-09 10:54:04 +02:00
Rainer Gerhards
d9cde56eb8 add output module interface to facilitate cooperative shutdown
... in more complex cases (where receiving SIGTTIN is not sufficient).
See also:
http://blog.gerhards.net/2013/04/rsyslog-output-plugin-wrangling.html
2013-04-08 17:55:52 +02:00
Rainer Gerhards
755b56fdf4 Merge branch 'v7-stable'
Conflicts:
	grammar/rainerscript.c
	runtime/ruleset.c
2013-04-08 09:47:32 +02:00
Rainer Gerhards
2de4a04b7e bugfix: failover/action suspend did not work correctly
This was experienced if the retry action took more than one second
to complete. For suspending, a cached timestamp was used, and if the
retry took longer, that timestamp was already in the past. As a
result, the action never was kept in suspended state, and as such
no failover happened. The suspend functionalit now does no longer use
the cached timestamp (should not have any performance implication, as
action suspend occurs very infrequently).

Also added some better debug logging for the action engine.
2013-04-07 18:48:48 +02:00
Rainer Gerhards
2bf626dce2 Merge branch 'v6-stable' into tmp 2013-03-20 09:43:22 +01:00
Rainer Gerhards
cdf8b7d909 Merge branch 'v6-stable' 2013-03-12 11:33:28 +01:00
Rainer Gerhards
07e296703b Merge branch 'v5-stable' into v6-stable
Conflicts:
	action.c
	queue.c (some code moved from action.c --> queue.c)
2013-03-12 11:32:53 +01:00
Tomas Heinrich
bb74c4485a bugfix: divide action queue discard mark by 10 - was out of range 2013-03-12 11:24:09 +01:00
Rainer Gerhards
9273b4bb4d optimize memory layout for much better cache hits
Moave element status out of batch_obj_t because we
get a *much* better cache hit ratio this way.
Note that this is really a HUGE saving, even if it
doesn't look so (both profiler data as well as
practical tests indicate that!).
2013-01-15 15:01:16 +01:00
Rainer Gerhards
bb9650eb58 optimize: do not iterate over batch items if unneeded ;) 2013-01-15 11:05:46 +01:00
Rainer Gerhards
a207e26fb8 optimize: minor cleanup (long scheduled...)
I did yet another safety-check that there are no problems
with removing that de-init.
2013-01-14 16:02:25 +01:00
Rainer Gerhards
8339d54ddc optimize: do date() call in template processing only if actually needed 2013-01-13 14:40:17 +01:00
Rainer Gerhards
42d1d27a01 Merge branch 'v7-stable-newmsglock' into master-newmsglock
Conflicts:
	runtime/msg.c
	runtime/queue.c
	tools/syslogd.c
2012-12-06 17:27:37 +01:00
Rainer Gerhards
27e0f06b17 Merge branch 'v6-stable-newmsglock' into v7-stable-newmsglock
Conflicts:
	tools/syslogd.c
2012-12-06 17:03:51 +01:00
Rainer Gerhards
3495720a2f bugfix: some message properties could be garbled due to race condition
This happened only on very high volume systems, if the same message was
being processed by two different actions. This was a regression caused
by the new config processor, which did no longer properly enable msg
locking in multithreaded cases. The bugfix is actually a refactoring of
the msg locking code - we no longer do unlocked operations, as the use
case for it has mostly gone away. It is potentially possible only at
very low-end systems, and there the small additional overhead of doing
the locking does not really hurt. Instead, the removal of that
capability can actually slightly improve performance in common cases,
as the code path is smaller and requires slightly less memory writes.
That probably outperforms the extra locking overhead (which in the
low-end case always happens in user space, without need for kernel
support as we can always directly aquire the lock - there is no
contention at all).
2012-12-06 15:40:15 +01:00
Rainer Gerhards
2b0764d37e bugfix: error message had an extra LF in it (can break forwarding & tools) 2012-11-29 12:02:57 +01:00
Rainer Gerhards
c55e0a5a06 queue: change generic msg ptr (pUsr) to be of msg_t type 2012-11-03 12:32:50 +01:00
Rainer Gerhards
feddb2cc8f queue: change gerenic queue pUsr ptr to be action_t
this was always action_t, but the initial design was more generic. We are
making it specific now in order to gain better performance (after all, we
did not need the generic engine in the past 8 years...)
2012-11-03 11:40:13 +01:00
Rainer Gerhards
ffe496e2c2 Merge branch 'master' into master-ratelimit
Conflicts:
	doc/v7compatibility.html
2012-10-24 17:58:03 +02:00