12947 Commits

Author SHA1 Message Date
PascalWithopf
4ff58bbf26 omrelp: permit all authmodes; updated tests
omrelp for some time limited authentication modes to those
that were known. While this was OK, it prevented the easy
introduction of new auth modes into librel.

This has now been changed; omrelp now checks the validity of
the authmode directly via librelp by doing some librelp calls
upon processing the configuration.

Also, some tests have been updated to check this feature and
also ensure that the new librelp mode "certvalid" works
(if it is available).
2018-09-14 15:33:47 +02:00
Rainer Gerhards
889a78a6e6
maintain ChangeLog 2018-09-14 14:44:26 +02:00
97308b5610 Imkafka: Added multithreaded support for kafka consumers (#3013)
* imkafka: implement multithreading support for kafka consumers.

Each consumer runs in it's own consumer thread now. New tests have also been
added for this.
2018-09-14 14:42:35 +02:00
Rainer Gerhards
8f12199cc4
Merge pull request #3020 from PascalWithopf/pmnormalize-test
pmnormalize: fix memory leak
2018-09-14 14:40:38 +02:00
PascalWithopf
77193c3077 bugfix pmnormalize/core: several memory leaks, invld property handling
- major memory leak which occurred once per message processed
  So this could lead to OOM. Caused by improper free of json
  structure
- another two major leaks of similar magnitued could occur if
  "fromhost-ip" and/or "fromhost" properties were set
- minor leaks upon termination. these were unproblematic as
  static and only occured immediately before shutdown.
  But they triggered memory debugger errors.
- fixed test which did not check for mem leaks albeit it should
- core invalid handling of the "fromhost" property, if set via
  the MsgSetPropsViaJSON() call. This was primarily of concern
  for pmnormalize and mmexternal, and only if these properties
  were used by either the rulebase or the external program
  response.

Actually, most of the leaks go back to rsyslog core, but that
core functionality was not used by other modules in the same
way. But if some other would have used it, the effects would
have been the same (so be aware if you wrote custom modules).
2018-09-14 13:11:31 +02:00
Rainer Gerhards
b4180ef409
maintain ChangeLog 2018-09-14 11:22:35 +02:00
Rainer Gerhards
9f6249a739
Merge pull request #2991 from PascalWithopf/i-323
queue.c: add error if queue file can't be accessed
2018-09-14 10:43:53 +02:00
jeverakes
22e9151602 imptcp: fixed pointers for session counting (#3018)
imptcp open, failedopen, and closed pstats counters were assigned the wrong name, thus pstats
values did provide a totally wrong picture of what was going on.
2018-09-14 10:40:05 +02:00
Rainer Gerhards
11e5717104
Merge pull request #2937 from snaix/imkafka_parsehost_fix
fix imkafka can't parse hostname
2018-09-14 09:49:29 +02:00
Rainer Gerhards
a978072b86
maintain ChangeLog 2018-09-14 09:37:11 +02:00
Rainer Gerhards
8ff3a710e9
Merge pull request #3009 from jsiwrk/bugfix/omprog_force_single_instance
omprog: fix forceSingleInstance flag
2018-09-14 09:28:41 +02:00
Rainer Gerhards
765202177f
maintain ChangeLog 2018-09-14 09:13:33 +02:00
Rainer Gerhards
d0ba9d36e5
Merge pull request #3014 from richm/imfile-endmsg.regex
imfile: support for endmsg.regex
2018-09-14 09:08:50 +02:00
Rainer Gerhards
5b8d6830dc
Merge pull request #3016 from rgerhards/relp-test-improve
testbench: make imrelp tests faster and avoid imtcp
2018-09-13 20:28:21 +02:00
Rainer Gerhards
b7b4453cff
testbench: make imrelp tests faster and avoid imtcp
imtcp was primarily used for historical reasons and is actually
to inferior method of injection messages for such cases
2018-09-13 17:44:21 +02:00
Rainer Gerhards
1fd704e2fc
Merge pull request #3007 from rgerhards/tb20
testbench: improve plumbing, especially in kafka tests
2018-09-13 17:36:47 +02:00
Rainer Gerhards
74207603ad
testbench: remove imtcp in kafka test where not strictly needed
This method currently has some race associated with it, also it is
really not required and the injectmsg method is superior.

Also fix imdiag's new $imdiagInjectDelayMode config directive. While
it was added, it was forgotten to actually apply the value.
We are not doing a separate commit as this is thightly coupled into
our testing here (which also as a side-effect tests the new imdiag
functionality).
2018-09-13 14:25:17 +02:00
Rich Megginson
c902a0938f imfile: support for endmsg.regex
This adds support for endmsg.regex.  It is similar to
startmsg.regex except that it matches the line that denotes
the end of the message, rather than the start of the next message.
This is primarily for container log file use cases such as this:

    date stdout P start of message
    date stdout P  middle of message
    date stdout F  end of message

The `F` means this is the line which contains the final part of
the message.  The fully assembled message should be
`start of message middle of message end of message`.
`startmsg.regex="^[^ ]+ stdout F "` will match.
2018-09-11 20:01:47 -06:00
PascalWithopf
5b33121fe9 queue.c: add error if queue file can't be accessed
When having a disk-assisted queue without permission
to write to the specified queue file an error will
be put out.

closes https://github.com/rsyslog/rsyslog/issues/323
2018-09-11 10:11:05 +02:00
Rainer Gerhards
07978e7431 testbench: make cleanup not try to cancel grep itself 2018-09-10 10:55:43 +02:00
Rainer Gerhards
01c2b48325
Merge pull request #3010 from rgerhards/imdiag-delaymode
imdiag: add capability to specify input flow control mode
2018-09-10 09:51:13 +02:00
Rainer Gerhards
63a9323b49
imdiag: add capability to specify input flow control mode
This is required for tests with longer-running outputs.
2018-09-10 08:21:34 +02:00
Rainer Gerhards
2cc1398176
maintain ChangeLog 2018-09-10 08:07:12 +02:00
Joan Sala
f342794bfd omprog: fix forceSingleInstance flag
Closes #2813
Closes #2468
2018-09-09 20:56:10 +02:00
Rainer Gerhards
e49c2b90b3
Merge pull request #2999 from rgerhards/i2960
imfile: experimental input throtteling feature
2018-09-09 18:33:49 +02:00
Rainer Gerhards
48ebfec6c6
Merge pull request #3008 from jsiwrk/bugfix/imdiag_memleak
testbench: fix imdiag memory leak reported by valgrind
2018-09-09 18:32:32 +02:00
Joan Sala
fdcb023dc8 testbench: fix imdiag memory leak reported by valgrind 2018-09-09 16:01:39 +02:00
Rainer Gerhards
8af131c2e0
Merge pull request #3005 from rgerhards/tb19
testbench: some more modernization
2018-09-08 14:09:18 +02:00
Rainer Gerhards
cd8fb150c2
testbench debug 2018-09-08 10:44:04 +02:00
Rainer Gerhards
e072935450
prototype change of sndrcv test via injectmsg 2018-09-08 10:40:09 +02:00
Rainer Gerhards
c096f21c46
testbench: some more modernization 2018-09-07 17:56:22 +02:00
Rainer Gerhards
95c87691ad Merge branch 'master' of https://github.com/rsyslog/rsyslog 2018-09-07 17:36:50 +02:00
Rainer Gerhards
d41f40d02f
maintain ChangeLog 2018-09-07 17:36:31 +02:00
Rainer Gerhards
14ee6a0d59
Merge pull request #3004 from rgerhards/tb18
testbench: modernize, next part
2018-09-07 17:36:12 +02:00
Rainer Gerhards
ca5452fe74
Merge pull request #2993 from PascalWithopf/m2782
add contrib module omhttp
2018-09-07 17:33:21 +02:00
Rainer Gerhards
5cb4060a0e
Merge pull request #2974 from alorbach/master-kafka-newtests
testbench: Added new kafka tests using kafkacat for better debugging.
2018-09-07 17:29:13 +02:00
Rainer Gerhards
d4464e2950
Merge pull request #3001 from rgerhards/i2997
AIX: HUP not processed when running as non-service
2018-09-07 16:24:34 +02:00
Rainer Gerhards
74541cf56c
testbench: modernize, next part 2018-09-07 14:58:26 +02:00
Rainer Gerhards
fcc3b59156
maintain ChangeLog 2018-09-07 14:40:35 +02:00
Rainer Gerhards
489ad0ae99
Merge pull request #3003 from rgerhards/better-dlload-errors
core: improve error message on module load fail
2018-09-07 14:31:34 +02:00
Rainer Gerhards
bcabee67f6
Merge pull request #3002 from rgerhards/fix-linker
fix build error e.g. on FreeBSD
2018-09-07 14:07:47 +02:00
847d4223ef testbench: Incremented input timeout to 60000 because kafka tests may fail on load otherwise.
Also fixed minor configuration and syntax issues.
Moved test init in kafka tests as far as possible to the top.
2018-09-07 11:52:57 +02:00
Rainer Gerhards
4bcf65ed05
core: improve error message on module load fail 2018-09-07 11:52:28 +02:00
Rainer Gerhards
31d58a2eee AIX: HUP not processed when running as non-service
When rsyslog is not run as a service (under SRC control), HUP does not
awake the main loop timeout. In theory, it should do so, but in practice
this does not happen. As a work-around we now implement a kind of
ressource-saving busy waiting where we awake every half second to check
if HUP (or something else noteworthy) happened. This should not cause
any real issue in any case, because running rsyslog as a non-service
is very uncommon and probably only happens during testbench runs.

closes https://github.com/rsyslog/rsyslog/issues/2997
2018-09-07 03:25:38 -05:00
Rainer Gerhards
ef6d877540 fix build error e.g. on FreeBSD
regression form 9c0f2d4066b7d5a393f2f5acd080caa4dc4c1144
2018-09-07 10:24:49 +02:00
Rainer Gerhards
d716d659ea testbench: replace importable zcat tool by better method
seen on AIX, but also enables test on Solaris
2018-09-07 01:09:31 -05:00
Rainer Gerhards
d98f1cbb9d AIX: some more rsyslog core symbols need to be exported
seen while working on testbench. Unfortunately, we seem to be unable
to automatically export all global symbols, which is what we really
need.
2018-09-06 11:03:04 -05:00
48c48207f8 kafka: Fixed failing imkafka/omkafka when "debug" parameter was set.
also added some debug output when reporterr is off fo failed parameters.
2018-09-06 17:31:03 +02:00
Rainer Gerhards
7d5b1c6fba
imfile: experimental input throtteling feature
The new input parameter delay.message has been added. It specifies
a delay in microseconds after each line read.

closes https://github.com/rsyslog/rsyslog/issues/2960
2018-09-06 15:36:29 +02:00
Rainer Gerhards
1c08c57cc9
cleanup 2018-09-06 15:16:50 +02:00