116 Commits

Author SHA1 Message Date
Rainer Gerhards
115718de96 Merge branch 'v5-stable' into v5-devel
Conflicts:
	ChangeLog
	plugins/imklog/imklog.c
	plugins/imklog/imklog.h
2012-03-01 12:25:39 +01:00
Rainer Gerhards
c2970de8b0 bugfix: imklog invalidly computed facility and severity
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=313
2012-03-01 12:19:32 +01:00
Rainer Gerhards
aafa9b41a5 bugfix: imklog invalidly computed facility and severity
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=313
2012-03-01 12:16:59 +01:00
Rainer Gerhards
2c172dcf82 Merge branch 'v4-stable' into v5-stable 2012-01-27 12:50:19 +01:00
Rainer Gerhards
cca05921dc imklog: forgot to remove one file; now done 2012-01-23 18:06:26 +01:00
Rainer Gerhards
01405d78f4 refactored imklog linux driver, now combined with BSD driver
The Linux driver no longer supports outdated kernel symbol resolution,
which was disabled by default for very long. Also overall cleanup,
resulting in much smaller code. Linux and BSD are now covered by a
single small driver.
2012-01-23 18:05:07 +01:00
Rainer Gerhards
0b5980df01 licensing change 2012-01-21 17:41:15 +01:00
Rainer Gerhards
8162ff020d preparing for 5.9.1 release 2011-06-30 10:09:03 +02:00
Rainer Gerhards
47729f3b93 added support for obtaining timestamp for kernel message from message
If the kernel time-stamps messages, time is now take from that
timestamp instead of the system time when the message was read. This
provides much better accuracy. Thanks to Lennart Poettering for
suggesting this feature and his help during implementation.
2011-06-24 17:07:11 +02:00
Rainer Gerhards
bb67fd7fbf experimental: support for systemd-induced second PRI in klog
if systemd writes a kernel log entry with a non-kernel priority,
the priority recorded in the kernel log will be wrong. However,
it will be immediately followed by another priority (with the
kernel timestamp in between, if enabled). So imklog now tries
to see if there is a second PRI and, if so, uses it. Note that
we already support non-kernel PRIs in the kernel log, as this
was done in BSD for quite some while. HOWEVER the config
statement "$klogpermitnonkernelfacility on" must be used to
permit this (otherwise non kernel messages are dropped).
Sample of a such a message on a kernel without timestamping
enabled:

$ echo '<14>text' > /dev/kmsg
$ dmesg -r
<4><14>text

NOTE: support for timestamp is NOT YET ENABLED!
2011-03-18 14:21:09 +01:00
Bojan Smojver
d1eb6e0edc added work-around for bug in gtls, which causes fd leak when using TLS
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2011-02-23 11:25:43 +01:00
Rainer Gerhards
189a26c044 Merge branch 'v4-stable' into v5-stable
Conflicts:
	ChangeLog
	runtime/parser.c
	runtime/queue.c
	runtime/wtp.c
	template.c
	threads.c
	tools/syslogd.c
2010-12-16 13:59:16 +01:00
Rainer Gerhards
4da2cbcae7 Merge branch 'v4-stable' into v4-devel
Conflicts:
	runtime/parser.c
2010-12-16 13:00:27 +01:00
Rainer Gerhards
371a8eec29 some cleanup based on clang static analyzer results 2010-12-16 12:57:55 +01:00
Rainer Gerhards
ed36822e37 Merge branch 'v4-stable' into v5-stable
Conflicts:

	configure.ac
	runtime/cfsysline.c
	tools/ompipe.c
2010-10-19 12:54:38 +02:00
Rainer Gerhards
ec339c9097 Merge branch 'v4-stable' into v4-devel
Conflicts:

	runtime/cfsysline.c
	tools/ompipe.c
2010-10-19 12:44:22 +02:00
Rainer Gerhards
0a24b3afc0 fixing some compile problems on FreeBSD 2010-10-19 12:39:48 +02:00
Rainer Gerhards
ada87cbaef Merge branch 'v4-devel' into master
Conflicts:
	ChangeLog
	Makefile.am
	configure.ac
	doc/manual.html
	runtime/debug.c
	runtime/rsyslog.h
	tests/Makefile.am
	tests/diag.sh
	tests/nettester.c
	tools/syslogd.c
2010-04-19 15:13:33 +02:00
Rainer Gerhards
b00e7946e8 first version of imsolaris created, cleanup for solaris done
more cleanup required, but things now basically work
2010-04-15 17:59:38 +02:00
Rainer Gerhards
2a8d484a73 some cleanup of solaris imklog 2010-04-12 17:09:50 +02:00
Rainer Gerhards
87a957b0f5 Merge branch 'v4-stable-solaris' into beta
Conflicts:
	runtime/Makefile.am
	runtime/rsyslog.c
	tests/nettester.c
	tools/syslogd.c
2010-04-09 12:27:59 +02:00
Rainer Gerhards
23a3fdb094 git "bugfix": added file previously forgotten 2010-04-01 15:16:05 +02:00
Rainer Gerhards
3ab759c40d cleanup in solaris components for imklog 2010-03-26 16:59:00 +01:00
Rainer Gerhards
91a5e176d6 added initial files for door support & fixed imklog
imklog now basically works, but needs quite some more work to do
2010-03-26 15:49:39 +01:00
Rainer Gerhards
ee6ce30b47 interim commit: imklog/solaris compiles, but does not work
saving this area of work, because some further clarification
is needed. Do not try to run the current imklog, it will fail.
2010-03-26 09:14:31 +01:00
Rainer Gerhards
da65d88017 added forgotten file 2010-03-25 18:36:27 +01:00
Rainer Gerhards
92369b253c added some starting point for a solaris imklog driver
... far from being functional at this time!
2010-03-25 18:22:14 +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
da933a7e10 added $klogConsoleLogLevel directive
...which permits to set a new console log level while rsyslog is active
2009-07-03 11:57:21 +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
Michael Terry
ba4806a704 add support for KLogPath 2009-06-29 10:58:38 +02:00
Rainer Gerhards
662ad3e4bf optimized hostname processing 2009-06-23 16:32:29 +02:00
Rainer Gerhards
2de4964aff optimized handling of MSG part in msg object
WARNING: currently, message repeation processing is disabled, must
be reenabled (but prefer to do some other tests first)
2009-06-18 16:51:40 +02:00
Rainer Gerhards
2f86678c57 optimized TAG handling in msg object 2009-06-18 14:30:21 +02:00
Rainer Gerhards
8628312396 cleaned up/optimized raw message handling in msg object 2009-06-18 13:22:21 +02:00
Rainer Gerhards
74b2b24f50 removed long-obsoleted property UxTradMsg
... as well as some cleanup (some commented-out code is left to
support UxTradMsg again is someone really complains ;)).
2009-06-16 12:31:27 +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
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
Rainer Gerhards
09ca443377 update project status & cleanup
removed some warning in imklog compilation, but may not have
solved a lurking issue (but placed comment so that we know if
something surfaces)
2009-04-17 15:10:06 +02:00
Rainer Gerhards
eb807027af added O_CLOEXEC to open() calls
to make sure only the minimum number of file handles is left open
during a exec call. This is not a 100% solution, as there are also
some fopen() calls and, more importantly, file descriptors opened
by libraries. But it is better than nothing (and it was quick, at
least until we run into platform hell, what we will for sure ;)).
2009-04-02 15:12:57 +02:00
Michael Biebl
1448e2486e make all cflags and libs variables uppercase
pkg-config uses uppercase for its _CFLAGS and _LIBS variable names.
So we follow suit and convert all _cflags and _libs variables to
uppercase for more consistency.
2009-02-24 13:09:44 +01:00
Rainer Gerhards
2275a915e0 bugfix: imklog did not compile on freeBSD 2008-11-24 17:48:12 +01:00
Rainer Gerhards
02bb3c901d consolidated time calls during msg object creation
...this improves performance and consistency and also fixes
a bug where subsecond time properties generated by imfile, imklog and
internal messages could be slightly inconsistent.
2008-10-02 15:52:24 +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