56 Commits

Author SHA1 Message Date
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
Rainer Gerhards
483be40471 enhanced imtcp, among others to handel invalid NetScreen framing
- added $InputTCPServerAddtlFrameDelimiter config directive, which
  enabeles to specify an additional, non-standard message delimiter
  for processing plain tcp syslog. This is primarily a fix for the invalid
  framing used in Juniper's NetScreen products. Credit to forum user
  Arv for suggesting this solution.
- added $InputTCPServerInputName property, which enables a name to be
  specified that will be available during message processing in the
  inputname property. This is considered useful for logic that treats
  messages differently depending on which input received them.
2008-12-10 14:26:19 +01:00
Rainer Gerhards
6c6e9a0f3f moved bParseHostname and bIsParsed to msgFlags
This enables us to use more efficient calling conventions and
also helps us keep the on-disk structure of a msg object more
consistent in future releases.
2008-10-09 13:45:56 +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
65f74a712b added $UDPServerTimeRequery option
...which enables to work with
less acurate timestamps in favor of performance. This enables querying
of the time only every n-th time if imudp is running in the tight
receive loop (aka receiving messsages at a high rate)
2008-10-06 14:25:23 +02:00
Rainer Gerhards
262f61d869 added properties "inputname" and "$myhostname"
- added message property "inputname", which contains the name of the
  input (module) that generated it. Presence is depending on suport in
  each input module (else it is blank).
- added system property "$myhostname", which contains the name of the
  local host as it knows itself.
2008-09-10 15:59:53 +02:00
Rainer Gerhards
1a9ac0ced7 removed compile time fixed message size limit (was 2K)
The limit can now be set via $MaxMessageSize global config
directive (finally gotten rid of MAXLINE ;))
2008-09-02 11:38: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
09afe64f29 added fromhost-ip properties and some bugfixes
- bugfix: TCP input modules did incorrectly set fromhost property
  (always blank)
- bugfix: imklog did not set fromhost property
- added "fromhost-ip" property
- added "RSYSLOG_DebugFormat" canned template
- bugfix: hostname and fromhost were swapped when a persisted message
  (in queued mode) was read in
2008-05-16 13:36:41 +02:00
Rainer Gerhards
d8b191a1f3 bugfix: TLS server went into an endless loop in some situations.
Thanks to Michael Biebl for reporting the problem.
2008-05-15 07:58:01 +02:00
Rainer Gerhards
e0a2745d3f some cleanup (gotten rid of some more plain chars) 2008-05-06 15:05:39 +02:00
Rainer Gerhards
055d4ffc2a fixed problem with module unload sequence 2008-04-29 15:36:22 +02:00
Rainer Gerhards
0e19d501bb fixed newly introduced memory leaks 2008-04-24 10:54:51 +02:00
Rainer Gerhards
bf3d2c1b39 message reception via TCP work again
... at least in some cases ;) I assume there are still a couple
of bugs inside the code. But at least we have something from
where we can continue to work on.
2008-04-24 09:57:43 +02:00
Rainer Gerhards
721b9ee252 client functionality works again (with the new socket abstraction) 2008-04-23 17:48:13 +02:00
Rainer Gerhards
2be459c4d7 objects for receive-side socket abstraction specified
The objects for receiver-side socket abstraction have now be
specified. The project as whole does not yet compile and
definitely not run, but I'd like to commit some milestones along
this way.
2008-04-23 09:59:01 +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
13c32d03f3 added flow control options to other input sources 2008-03-19 07:50:47 +00:00
Rainer Gerhards
b1dac8fdda oversize message handling in TCP/GSSAPI receiver 2008-03-14 18:20:38 +00:00
Rainer Gerhards
b0e8ce6c3d bugfix: TCP (and GSSAPI) octet-counted frame did not work correctly in all
situations. If the header was split across two packet reads, it was
    invalidly processed, causing loss or modification of messages.
2008-03-14 17:03:14 +00:00
Rainer Gerhards
17f36a76cb bugfix: imgssapi segfaulted under some conditions; this fix is actually not
just a fix but a change in the object model. Thanks to varmojfekoj for
    providing the bug report, an initial fix and lots of good discussion
    that lead to where we finally ended up.
2008-03-13 11:04:33 +00:00
Rainer Gerhards
e946e122d0 implemented module unload handling (required a number of interface changes) 2008-03-11 16:43:13 +00:00
Rainer Gerhards
dbfc032913 some cleanup 2008-03-07 17:36:57 +00:00