120 Commits

Author SHA1 Message Date
Rainer Gerhards
9b4a225c59 refactor tpl processor so that date is queried once per template
Things like $YEAR, $MONTH required a time() call each.
2012-10-10 19:20:19 +02:00
Rainer Gerhards
037eaa0d69 new ruleengine: implement template type "subtree" 2012-09-18 11:32:45 +02:00
Rainer Gerhards
71f602c4e9 new ruleengine: Implent "unset" statement 2012-09-17 08:00:34 +02:00
Rainer Gerhards
197d9ef643 add native json-passing to output modules using JSON API 2012-08-31 14:12:49 +02:00
Rainer Gerhards
2a4e1c12f2 Merge branch 'master' into v7-devel
Conflicts:
	runtime/msg.c
2012-08-27 17:16:25 +02:00
Rainer Gerhards
1f3d7e3a9d milestone: libee event removed from rsyslog core. Now pure JSON. 2012-08-27 17:00:17 +02:00
Rainer Gerhards
6bb9c7c18e milestone: first PoC for hierarchical data inside msg 2012-08-27 15:29:39 +02:00
Jérôme Renard
744d7c426d add uuid property to message object 2012-08-26 14:13:26 +02:00
Rainer Gerhards
b88ba949f8 added "date-unixtimestamp" property replacer option to format as a unix timestamp 2012-03-29 18:04:12 +02:00
Rainer Gerhards
66ab2a70e5 added message property parsesuccess to indicate status of higher level parser run
added message property parsesuccess to indicate if the last run
higher-level parser could successfully parse the message or not
(see property replacer html doc for details)
2012-03-15 17:25:26 +01:00
Rainer Gerhards
379bd30a54 milestone/[PARTWORK]: integrated all variable types (msg/sys/cee) 2011-07-08 14:50:35 +02:00
Rainer Gerhards
8a9e0cc68e milestone/[PARTWORK]: obtaining msg vars integrated, "==" works for strings 2011-07-07 16:35:51 +02:00
Rainer Gerhards
74a71e798e Merge branch 'v5-beta'
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
2011-02-25 14:46:07 +01:00
Rainer Gerhards
e867cb4137 added debug support for trying to find well-hidden bug 2011-02-23 08:54:31 +01:00
Rainer Gerhards
4618773be6 milestone: added support for CEE-variables to RainerScript 2010-12-03 17:11:03 +01:00
Rainer Gerhards
48877c8ef4 milestone: added support for CEE-properties in property-based filters 2010-12-01 17:28:36 +01:00
Rainer Gerhards
471f07f45a milestone: template supports CEE output via %$!all-json% 2010-12-01 10:19:50 +01:00
Rainer Gerhards
b9d3cdceab milestone: added mmnormalize (compiles, but untested) 2010-12-01 08:46:20 +01:00
Chris Metcalf
afafd9e0d7 bugfix: atomic increment for msg object may not work correct on all platforms.
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2010-11-25 15:51:49 +01:00
Rainer Gerhards
d9e64c16e5 finshed implementation of strgen modules
and also provided four build-in modules for the most common use
cases, hopefully resulting in a speedup of around 5% for typical
rsyslog processing.
2010-06-04 12:45:31 +02:00
Rainer Gerhards
4a5a3196fb Merge branch 'v4-devel' into master
Conflicts:
	runtime/Makefile.am
	runtime/atomic.h
	runtime/queue.c
	runtime/queue.h
	runtime/wti.c
	runtime/wti.h
	runtime/wtp.c
	runtime/wtp.h
2010-04-27 17:49:06 +02:00
Rainer Gerhards
cbe2e3d444 bugfix: problems with atomic operations emulation
replaced atomic operation emulation with new code. The previous code
seemed to have some issue and also limited concurrency severely. The
whole atomic operation emulation has been rewritten.
2010-04-27 17:31:28 +02:00
Rainer Gerhards
6b8e9477a2 changed flag value for v5-compatibility 2010-04-19 17:14:09 +02:00
Rainer Gerhards
d3eb89a5fe Merge branch 'v4-devel' into master
Conflicts:
	runtime/msg.h
2010-04-19 17:13:08 +02:00
Rainer Gerhards
587036bfb0 changed imsolaris to use submitMsg() API
This includes a modification to the rsyslog engine so that messages
without PRI inside the message can properly be handled.
2010-04-19 17:03:08 +02:00
Rainer Gerhards
38cb392672 replaced data type "bool" by "sbool" because this created some portability issues 2010-02-02 15:51:01 +01:00
Rainer Gerhards
8c29f28435 moved DNS resolution code out of imudp and into the backend processing
Most importantly, DNS resolution now never happens if the resolved name
is not required. Note that this applies to imudp - for the other inputs,
DNS resolution almost comes for free, so we do not do it there. However,
the new method has been implemented in a generic way and as such may
also be used by other modules in the future.
2009-11-17 08:11:31 +01:00
Rainer Gerhards
1ada506e2d added the capability to have ruleset-specific main message queues
This offers considerable additional flexibility AND superior performance
(in cases where multiple inputs now can avoid lock contention)
2009-10-27 17:31:27 +01:00
Rainer Gerhards
05b0c4322b removed no longer needed msg_t property "bParseHOSTNAME" 2009-10-13 07:29:11 +02:00
Rainer Gerhards
fa9684d8c6 Merge branch 'beta' 2009-08-27 14:18:15 +02:00
Rainer Gerhards
aba8792c8a bugfix: message sanitation had some issues
- control character DEL was not properly escaped
- NUL and LF characters were not properly stripped if no control
  character replacement was to be done
- NUL characters in the message body were silently dropped (this was
  a regeression introduced by some of the recent optimizations)
2009-08-26 12:57:06 +02:00
Rainer Gerhards
809f0a16e7 Merge branch 'master' into udpspoof & cleanup & slight optimization
Conflicts:
	runtime/msg.c

I messed up and did some changes during the merge commit ;) But these are
not large, just a little bit of cleanup and some very slight optimizations
inside the msg object.
2009-07-09 17:45:21 +02:00
Rainer Gerhards
6fde78cb74 small performance improvement and cleanup
optimized substring processing, should bring a small enhancement when
forwarding with the default forwarding templates. Also did some uchar
cleanup in msg.c (thus so many changes, in reality they are few...).
2009-07-09 17:19: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
Rainer Gerhards
7ea63db2f9 optimization: propert names are now internally identified by integers 2009-06-26 15:31:40 +02:00
Rainer Gerhards
d88803c8e4 got rid of the recursive requirement for msg_t mutex (finally!) 2009-06-26 13:42:52 +02:00
Rainer Gerhards
b2fa740b9a optimized TAG handling 2009-06-23 17:14:42 +02:00
Rainer Gerhards
662ad3e4bf optimized hostname processing 2009-06-23 16:32:29 +02:00
Rainer Gerhards
86e37f70fe more strict parsing of the hostname in rfc3164 mode
... hopefully removes false positives (but may cause some trouble
with hostname parsing). For details, see this bug tracker:

  http://bugzilla.adiscon.com/show_bug.cgi?id=126

This patch is not optimal for v4 - another one will follow. The spirit
of this commit is to enable easier backporting if someone is interested
in doing so.
2009-06-23 16:14:19 +02:00
Rainer Gerhards
b50d13a6a9 restored repeated message reduction processing 2009-06-23 14:50:03 +02:00
Rainer Gerhards
d798f5b66f some more optimizations
- done malloc() instead of calloc() for msg_t, as we have large space
  which needs not be initialized
- shrunk syslogTime structure in the hope to get better cache and
  write performance (non-aligned data should not hurt much here)
2009-06-23 11:22:07 +02:00
Rainer Gerhards
ce5869f7c4 optimized processing of TAG message field 2009-06-22 18:52:30 +02:00
Rainer Gerhards
221dc8a322 some more optimizations of the msg_t object (minor) 2009-06-22 18:19:10 +02:00
Rainer Gerhards
f33dd51c80 fixed abort condition with oversize tags
this was a regression I introduced this afternoon
2009-06-18 17:48:11 +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
df9012f755 slight optimization of template generation 2009-06-18 16:20:06 +02:00