78 Commits

Author SHA1 Message Date
Rainer Gerhards
5c4973ca7e fix internal messages with LF in them
Thanks to Ahto Truu for spotting this problem.
2013-12-18 14:54:33 +01:00
Rainer Gerhards
0d71694fb3 optimize: have dns cache pre-create rsyslog prop_t's 2013-01-24 06:19:13 +01:00
Rainer Gerhards
123143d0f1 optimize: another round of removing isdigit() 2013-01-15 15:36:15 +01:00
Rainer Gerhards
0d60901e6e ratelimit: imtcp (and gssapi) converted to new interface 2012-10-15 12:09:37 +02:00
Rainer Gerhards
2a6ff7d53d interface cleanup (probably not final) 2012-10-15 08:55:12 +02:00
Rainer Gerhards
4269e45781 new ratelimit: interface plumbing added
no actual implementation yet done
2012-10-09 18:54:25 +02:00
Rainer Gerhards
439a5b70f2 improved support for --enable-debugless
Now it's probably time to prove the effect in practice...
2012-05-29 12:42:46 +02:00
Rainer Gerhards
d6da57ae03 Merge branch 'v5-stable-newstats'
Conflicts:
	action.c
	configure.ac
	doc/imuxsock.html
	plugins/imklog/imklog.c
	plugins/imptcp/imptcp.c
	plugins/imtcp/imtcp.c
	plugins/imudp/imudp.c
	plugins/imuxsock/imuxsock.c
	runtime/glbl.c
	runtime/glbl.h
	runtime/net.c
	runtime/ruleset.c
	tcpsrv.h
	tools/syslogd.c
2012-04-07 15:42:46 +02:00
Rainer Gerhards
4fb7ba113c added configuration directive to disable octet-counted framing
... for imtcp, directive is $InputTCPServerSupportOctetCountedFraming
2012-03-19 15:28:25 +01:00
Rainer Gerhards
ac9afc4149 Merge branch 'v5-stable' into master
Conflicts:
	ChangeLog
	action.h
	configure.ac
	doc/manual.html
	plugins/immark/immark.c
	plugins/impstats/impstats.c
	plugins/imptcp/imptcp.c
	plugins/imtcp/imtcp.c
	runtime/cfsysline.c
	runtime/cfsysline.h
	runtime/conf.c
	runtime/ctok.c
	runtime/ctok.h
	runtime/ctok_token.c
	runtime/ctok_token.h
	runtime/dnscache.h
	runtime/expr.c
	runtime/expr.h
	runtime/rule.c
	runtime/rule.h
	runtime/ruleset.h
	runtime/sysvar.c
	runtime/vm.h
	runtime/vmop.c
	runtime/vmop.h
	runtime/vmprg.c
	runtime/vmprg.h
	runtime/vmstk.c
	runtime/vmstk.h
	tools/omusrmsg.c
2012-01-18 14:08:24 +01:00
Rainer Gerhards
29807bb3c9 Merge branch 'v5-stable' into v5-stable-newstats
Conflicts:
	plugins/impstats/impstats.c
2012-01-16 16:25:45 +01:00
Rainer Gerhards
0871d0a077 Merge branch 'v4-stable' into v5-stable
Conflicts:
	plugins/imfile/imfile.c
	plugins/omtesting/omtesting.c
	tcpsrv.c
	threads.c
2012-01-14 18:32:40 +01:00
Rainer Gerhards
0862e839b6 some more files to ASL 2.0 2012-01-11 18:49:00 +01:00
Rainer Gerhards
409cd9496b Merge branch 'v5-devel' 2011-12-20 18:35:37 +01:00
Rainer Gerhards
22b7ecfe76 Merge branch 'v5-stable-newstats' into v5-devel
Conflicts:
	plugins/imuxsock/imuxsock.c
2011-12-20 18:35:20 +01:00
Rainer Gerhards
832d6e1e2c imtcp: added stats counters
also adds counters to other users of tcpsrv.c method, but these do not
work if default submit method is overwritten (currently only the case
for imdiag, what we don't consider a problem)
2011-12-20 18:19:14 +01:00
Rainer Gerhards
4b600b08a1 cosmetic cleanup 2011-05-02 12:31:02 +02:00
Rainer Gerhards
92a782dd2f Merge branch 'v5-devel'
Conflicts:
	configure.ac
	doc/manual.html
	plugins/imtcp/imtcp.c
2011-04-12 11:48:09 +02:00
Rainer Gerhards
0edf73f880 added new config directive $InputTCPFlowControl...
... to select if tcp received messages shall be flagged as
light delayable or not.
2011-04-01 16:26:21 +02:00
Rainer Gerhards
48ab717fed fixing regression: multi-threading had races 2011-01-31 13:13:00 +01:00
Rainer Gerhards
ebba229db9 Merge branch 'v4-devel' into master
Conflicts:
	ChangeLog
2010-08-05 08:40:18 +02:00
Rainer Gerhards
3c1895a699 bugfix: zero-sized (empty) messages were processed by imtcp
they are now dropped as they always should have been
2010-07-28 18:20:13 +02:00
Rainer Gerhards
8f0a8076cc Merge branch 'beta' into master
Conflicts:
	ChangeLog
	configure.ac
	plugins/imudp/imudp.c
	runtime/stream.h
	tests/Makefile.am
	tests/diag.sh
	tools/omfile.c
2010-04-09 13:00:56 +02:00
Rainer Gerhards
8b9cef552d Merge branch 'v4-stable' into v5-stable
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	runtime/debug.c
	runtime/stream.c
	tests/Makefile.am
	tests/diskqueue.sh
	tests/nettester.c
	tools/omfile.c
2010-03-29 11:07:15 +02:00
Rainer Gerhards
ea892d6cf0 cleanup: removed no longer needed variable
Most importantly, this keeps the thread debugger output clean.
2010-03-22 15:53:45 +01:00
Rainer Gerhards
ebf0582261 added capability to turn off standard LF delimiter in TCP server
via new directive "$InputTCPServerDisableLFDelimiter on"
2010-03-01 11:33:48 +01:00
Rainer Gerhards
e04e1b5002 enhanced test environment (including testbench)
support for enhancing probability of memory addressing failure by
using non-NULL default value for malloced memory (optional, only if
requested by configure option). This helps to track down some
otherwise undetected issues within the testbench and is expected
to be very useful in the future.
2009-10-22 11:33:38 +02:00
Rainer Gerhards
05b0c4322b removed no longer needed msg_t property "bParseHOSTNAME" 2009-10-13 07:29:11 +02:00
Rainer Gerhards
5625dbd1b6 bugfix and testbench improvements
- bugfix: solved potential (temporary) stall of messages when the queue was
  almost empty and few new data added (caused testbench to sometimes hang!)
- fixed some race condition in testbench
- added more elaborate diagnostics to parts of the testbench
- solved a potential race inside the queue engine
2009-10-07 18:40:30 +02:00
Rainer Gerhards
7bfa03bdc0 now put the new property-based methods to good use
... hopefully reducing the number of allocs/frees as well as overall
memory usage in a busy system (plus that these shared properties hopefully
remain in cache longer than its single-instance counterparts...)
2009-07-01 14:33:19 +02:00
Rainer Gerhards
d6faee67b4 RcvFromIP now also a property
This sets stage to enable use of the property-interface to speed
up things (mildly), the next step to be done. I have also fixed one
regression of yesterday's changes.
2009-07-01 13:28:17 +02:00
Rainer Gerhards
aaffc4281e introduced a new way of handling the RcvFrom property
... plus a fix for a long-time bug in obj-types.h. That lead to
the object pointer only then to become NULL when the object was
actually destructed, I discovered this issue during
introduction of the pRcvFrom property in msg_t, but it potentially had other
effects, too. I am not sure if some experienced instability resulted from this
bug OR if its fix will cause harm to so-far "correctly" running code. The later
may very well be. Thus I will change it only for the current branch and also
the beta, but not in all old builds. Let's see how things evolve.
2009-06-30 18:45:41 +02:00
Rainer Gerhards
e397c34d2a finished transition to using inputName property
... plus some celanup and adding minor missing functionality
(the rule debug info again tell the property name, not just number).
2009-06-30 15:21:15 +02:00
Rainer Gerhards
de84a12f8a introduced the idea of detached properties
some things inside the message can be used over a large number of
messages and need to to be allocated and re-written every time. I now
begin to implement this as a "prop_t" object, first use for the inputName.
Some input modules are already converted, some others to go. Will do
a little performance check on the new method before I go further.

Also, this commit has some cleanup and a few bug fixes that prevented
compiliation in debug mode (I overlooked this as I did not compile
for debug, what I normally do, and the automatted test also does not
do that)
2009-06-29 16:53:26 +02:00
Rainer Gerhards
8628312396 cleaned up/optimized raw message handling in msg object 2009-06-18 13:22:21 +02:00
Rainer Gerhards
c4e18c5bab implemented first version of multi-enqueue support, queue side 2009-06-16 15:43:22 +02:00
Rainer Gerhards
6f0db63e9b milestone: input-side multiSubmit capability
... commit before I try to touch the queue side ;)
2009-06-16 15:13:47 +02:00
Rainer Gerhards
aef1a38fe8 fixing problems that occurred during the last merge 2009-06-16 13:28:18 +02:00
Rainer Gerhards
f45dfe93af minor cleanup 2009-06-16 13:00:04 +02:00
Rainer Gerhards
98348ae03d Merge branch 'master' into omfile
Conflicts:
	ChangeLog
	runtime/msg.h
	tcps_sess.c
	tcpsrv.c
	tools/syslogd.c
2009-06-16 12:59:55 +02:00
Rainer Gerhards
015d17ca70 some performance optimizations
- saved gettimeofday() calls in imtcp (and increased reception buffer)
- somewhat optimized stringbuf.c
- some other optimizations
2009-06-16 08:46:45 +02:00
Rainer Gerhards
1f874c2208 fixed small bug in testbench 2009-06-12 17:46:16 +02:00
Rainer Gerhards
057c9b11fc fixed a regression from past commit & more performance enhancement
a larger buffer is a cheap, yet useful, enhancement... ;)
2009-06-12 16:30:39 +02:00
Rainer Gerhards
b5ccdf0672 performance-enhanced imtcp
...by now using lowres time and thus saving many time() calls. This needs
some performance testing and must be made configurable if it works out.
2009-06-12 15:59:50 +02:00
Rainer Gerhards
ca0ddc30a3 completed multi-ruleset core support
... as well as added multi-ruleset support for imtcp
2009-06-12 15:31:08 +02:00
Rainer Gerhards
7a7ec37f99 improved testbench / solved imdiag race condition
imdiag/imtcp had a modload race condition (as imdiag is a testing aid,
this has no implications for production deployments). Also, I replaced
netcat by a custom program to talk to imdiag. This, for the first time ever,
is now a Java program. I plan to add some GUI troubleshooting tools and
thought it is a good idea to start doing things in Java that can simply
be done in that language.
2009-05-25 13:02:06 +02:00
Rainer Gerhards
eb1615068c added new testing module imdiag
which enables to talk to the rsyslog core at runtime. The current
implementation is only a beginning, but can be expanded over time
2009-05-25 10:47:22 +02:00
Rainer Gerhards
aba90e8248 added capability to run multiple tcp listeners (on different ports)
Well, actually this and a lot of related things. I improved the
testbench so that the new capabilities are automatically tested and
also did some general cleanup. The current multiple tcp listener
solution will probably receive some further cleanup, too, but looks
quite OK so far. I also reviewed the way tcpsrv et all work, in
preparation of using this code for imdiag. I need to document the
findings, especially as the code is rather complicated "thanks" to
the combination of plain tcp and gssapi transport modes.
2009-05-22 17:06:52 +02:00
Michael Biebl
5ab3e8005f Fix compiler warnings
include <string.h> for memcpy and strlen.

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2009-05-19 07:31:22 +02:00
Rainer Gerhards
42c3dcfc1c performance enhancement: imtcp calls parser no longer on input thread
but rather inside on of the potentially many main msg queue worker
threads (an enhancement scheduled for all input plugins where this is
possible)
2009-04-23 13:39:11 +02:00