65 Commits

Author SHA1 Message Date
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
varmojfekoj
ec2019abe2 fixed type in format string (s as string indicator missing)
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2009-01-12 12:37:41 +01:00
Rainer Gerhards
a185665be4 experimentally altered "last message repeated n times" to include msg
This was suggested by David Lang, to help identify the message that was
repeated. A problem is that I do not have the expanded template at
hand when the "last ... times" message is generated. Spending much time
on this functionality is also probably not a good thing, as the whole
functionality will be overhauled (and once this is done we will not at
all have the output template at hand). So the approach is to use a single
field - here msg - and inlcude it as a notation of what was repeated. This
is far from being perfect, but eventually good enough. I will now wait
for feedback before going any further.
2008-12-19 12:52:49 +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
0fa2399466 cleanup of output timestamp generation 2008-10-07 15:10:03 +02:00
Rainer Gerhards
8528344ef5 "output" timestamp now taken from mesg's time generated
This enhances performance and, as some have pointed out, is
probably also more consistent with what users expect how
the various output-timestamp related function should work. This
commit needs some more testing.
2008-10-07 14:26:41 +02:00
Rainer Gerhards
1e53745dc9 very minor: performance optimization hint added 2008-10-02 12:20:12 +02:00
Rainer Gerhards
5ce9b5ad83 TESTING COMMIT: commiting not fully correct code
... for the purpose of conducting a few external tests. This is a
first approach at removing the time() call in the output, but it shows
there are some subleties we need to address.
2008-09-18 17:17: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
1e819a8afe Merge branch 'beta'
Conflicts:

	runtime/rsyslog.h
	tools/syslogd.c
2008-09-12 15:17:47 +02:00
Rainer Gerhards
63994d092c Merge branch 'v3-stable' into beta
Conflicts:

	runtime/datetime.h
	runtime/rsyslog.h
2008-09-12 15:11:38 +02:00
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
Rainer Gerhards
25bc87872a Merge branch 'beta'
Conflicts:

	ChangeLog
	action.c
	configure.ac
	doc/manual.html
2008-09-02 12:03:32 +02:00
Rainer Gerhards
2082d96397 Merge branch 'v3-stable' into beta
Conflicts:

	ChangeLog
	configure.ac
	doc/manual.html
2008-09-02 11:56:34 +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
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
3f6c73a8b7 added (internal) error codes to error messages
Also added redirector to web description of error codes
closes bug http://bugzilla.adiscon.com/show_bug.cgi?id=20
2008-06-27 12:52:45 +02:00
Rainer Gerhards
b711a34a07 disabled compile warnings caused by third-party libraries 2008-06-23 11:29:47 +02:00
Rainer Gerhards
94acfb1c5f ability to load proper select netstrm driver 2008-04-29 10:02:59 +02:00
Rainer Gerhards
d9b0c77d3e some more cleanup
reduced dependencies, moved non-runtime files to its own directory except
for some whom's status is unclear
2008-04-16 15:27:53 +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