88 Commits

Author SHA1 Message Date
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
Rainer Gerhards
b829284f37 Merge branch 'v3-stable' into beta
Conflicts:

	ChangeLog
	configure.ac
	doc/manual.html
2008-07-25 13:51:46 +02:00
Michael Biebl
01e15eda33 Update man pages, fix a small typo
- Update the version number and date in the man pages
- s/imklogd/imklog/

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2008-07-21 15:34:38 +02:00
Rainer Gerhards
d45a286f2d Merge branch 'v3-stable' into beta
Conflicts:

	doc/property_replacer.html
	tools/syslogd.c
2008-07-18 14:51:49 +02:00
Rainer Gerhards
2879b72bdc bugfix: remove PRI part from kernel message if it is present 2008-07-18 11:10:07 +02:00
Rainer Gerhards
b003f85091 Merge branch 'beta'
Conflicts:

	ChangeLog
	configure.ac
	doc/manual.html
	plugins/imklog/linux.c
2008-06-12 08:25:05 +02:00
Rainer Gerhards
23153f03af changed default for i$KlogSymbolLookup to "off" 2008-06-12 08:13:59 +02:00
Michael Biebl
b6b53972e1 Remove .cvsignore files, add .gitignore.
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2008-06-11 17:03:47 +02:00
Rainer Gerhards
d25586126f Merge branch 'beta'
Conflicts:

	ChangeLog
2008-05-21 16:55:11 +02:00
Rainer Gerhards
8f53b0f4d5 bugfix: imklog went into an endless loop if a PRI value was inside
a kernel log message

This is an unusual case under Linux, and a frequent one under BSD
2008-05-21 16:53:57 +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
bad4228f84 Merge branch 'beta'
Conflicts:

	plugins/imklog/linux.c
	runtime/cfsysline.c
	runtime/ctok.c
	runtime/linkedlist.c
	runtime/sysvar.c
2008-05-02 12:40:48 +02:00
Rainer Gerhards
9e88340fe9 restored debug output 2008-05-02 10:57:40 +02:00
Rainer Gerhards
dc423197ba bugfix: segfault in imklog
A symbol file was closed when it couldn't opened. That lead to a
NULL pointer being passed to fclose()
2008-04-30 18:59:01 +02:00
Rainer Gerhards
a84a60d8dd uncommented dbgprintf's as I think these may be the trouble source
this callback is somewhat unportable in combination with dlopen()
2008-04-29 10:38:22 +02:00
Rainer Gerhards
3a4f679c3b perparing for klog debug
... and some cleanup
2008-04-28 09:49:07 +02:00
Rainer Gerhards
858f1efd05 preparation for bughunt
including some cleanups
2008-04-28 09:21:07 +02:00
Rainer Gerhards
60309004df completed better modularity of runtime
- added the ability to specify an error log function for the
  runtime
- removed dependency of core runtime on dirty.h

Note that it is "better" modularity, not perfect. There is still
work to do, but I think we can for the time being proceed with
other things.
2008-04-17 12:46:57 +02:00
Rainer Gerhards
e1791996b8 moved host/domain-name related variables to global data pool 2008-04-17 10:58:30 +02:00
Rainer Gerhards
538ec6d401 Merge branch 'rfc3195' 2008-04-16 17:01:55 +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
d7f33053da made everything compile with the new runtime subdirectory 2008-04-16 08:42:00 +02:00
Rainer Gerhards
dd7e91f35d more or less finished im3195
but need changes in liblogging to complete this
work - does not compile yet
2008-04-16 08:12:11 +02:00
Rainer Gerhards
0e83bd69fc final work for release of v3.17.1 2008-04-15 15:19:53 +02:00
Rainer Gerhards
318be337dd fix compiler warning on char/uchar 2008-04-14 13:35:19 +02:00
Rainer Gerhards
f8dff16a4a cleanup of imklog + addtl. config directives
- implemented $KLogInternalMsgFacility config directive
- implemented $KLogPermitNonKernelFacility config directive
- modified internal interfaces
2008-04-14 14:44:32 +02:00
Rainer Gerhards
3669057997 provided ability to discard non-kernel messages present in the kernel msg buffer
This obviously happens on BSD (<118> markers seen). We now have the ability
to allow or prevent it, with the default being not permitted. Should not at
all affect other drivers, but it is implemented on a common code basis,
not on the driver layer.
2008-04-14 12:10:00 +02:00
Rainer Gerhards
9030b96c7b implemented high precision timestamps for the kernel log.
Thanks to Michael Biebl for pointing out that the kernel log did
not have them.
2008-04-12 16:55:04 +02:00
Rainer Gerhards
d041cdd050 removed trailing whitespace 2008-04-10 12:16:05 +02:00