219 Commits

Author SHA1 Message Date
7508010750 Basic Imfile FEN API support for Solaris (#2141)
imfile: Initial implementation of solaris FEN API (without wildcards)

FEN API is used to implement simular event based file
monitoring like with inotify.

This commit provides partial functionality. It supports event-driven
processing of files but does not yet provide wildcard functionality.
Wildscards will be provided by a later commit.

This can be committed as-is because the previous code did also
not provide wildcard support, so this is an improvement for
Solaris in any case.

see also https://github.com/rsyslog/rsyslog/issues/1954
2017-12-01 12:49:38 +01:00
Rainer Gerhards
dfe89f29e0
Merge pull request #2071 from rgerhards/es-testbench-additions
testbench: improvements in elasticsearch testing
2017-11-24 10:43:15 +01:00
Rainer Gerhards
cf425b2c36 testbench/omkafka: update valgrind test to more flexible test framework 2017-11-24 08:14:32 +01:00
Rainer Gerhards
61ccf4a159 testbench: improve elasticsearch test harness
see also https://github.com/rsyslog/rsyslog/issues/1989
2017-11-21 15:29:48 +01:00
8d1ffbf3c3 testsuite: Added es-basic-abort test to simulate elasticsearch shutdown/restart
Also changed start/stop method in diag.sh for elasticsearch
2017-11-21 15:28:15 +01:00
013c7304e9 testsuite: Added support to download, setup and start Elasticsearch from source
Works equal like for kafka and zookeeper. Elasticsearch is downloaded, configured and
started/stopped by the diag.sh script. Normal user access is sufficient.

Only es-basic.sh test has been adjusted with the new
method. Elasticsearch instance is limited to 128MB memory, should be sufficient for
the testbench.
2017-11-21 15:28:15 +01:00
Rainer Gerhards
1f859e7ad6 testbench/kafka: add valgrind test for kafka
Note: we need to add a supression file for a memory leak that looks
like it is caused by librdkafka.
See https://github.com/edenhill/librdkafka/issues/1536
for more details.

Once this issue is finally resolved, we should revisit the approach taken.

closes https://github.com/rsyslog/rsyslog/issues/2050
2017-11-21 13:12:29 +01:00
Rainer Gerhards
4b0f69d0ec testbench: check rsyslogd abort if tcpflood fails
this is useful if rsyslogd only abort in such tests - otherwise we
do not get a core analysis
2017-11-14 14:27:11 +01:00
Rainer Gerhards
2f76d61821 testbench: add threading correctness dynamic tests
utilizing the valgrind helgrind debugger

closes https://github.com/rsyslog/rsyslog/issues/1971
see also https://github.com/rsyslog/rsyslog/issues/2012
2017-11-10 19:03:01 +01:00
Rainer Gerhards
c13bbe60c0 testbench: update zookeeper version used in tests
unfortunately, there is no generic URL available...
2017-11-09 19:51:01 +01:00
Rainer Gerhards
1ca0f3d776 testbench: detect and report error download kafka dependency
make sure we are not puzzled when things go wrong.
2017-11-09 18:14:30 +01:00
Rainer Gerhards
39c3c4bd59 testbench: run gdb in batch mode, nicer diagnostic output 2017-11-08 11:27:19 +01:00
Rainer Gerhards
d49880b843 testbench: provide easier to read core dump analysis 2017-11-08 11:27:19 +01:00
Rainer Gerhards
c0b80d8756 testbench: harden tests against hanging previous instances
cleaning at exit does not always work because it sometimes is
not reached, especially in cases that go really wrong
2017-10-17 10:27:48 +02:00
Rainer Gerhards
6af7996d8b testbench: add (commented-out) troubleshooting support for solaris 2017-10-15 10:59:21 +02:00
Rainer Gerhards
fffbcc2ddc Merge pull request #1758 from rgerhards/pr-1633
implement fileoffset metadata
2017-09-12 08:54:09 +02:00
Rainer Gerhards
960bb25902 testbench: download kafka in quiet mode
... otherwise the testbench log is spammed by wget status display.
2017-09-11 12:53:10 +02:00
ab8e59657c testbench: Updated kafka server version from 0.9.0.1 to 0.10.2.1 2017-09-11 10:57:46 +02:00
e5d48d89c0 testbench: Added support to dump kafka / zookeeper server logs on test failure 2017-09-11 10:17:12 +02:00
Rainer Gerhards
0858209381 imfile: adjust offset metadata to give begin offset of file 2017-09-07 17:08:21 +02:00
Rainer Gerhards
090f105e9d testbench: improve queue test diagnostics
this is a bit more verbose, but helps greatly when diagnosing
queue file related issues

closes https://github.com/rsyslog/rsyslog/issues/170 (kind of...)
2017-09-07 09:26:56 +02:00
Rainer Gerhards
025ed2a933 impstats bugfix: impstats does not handle HUP
If the parameter "log.file" is specified, impstats writes its own
log file. However, HUP is not handled for this file, which makes
the functionality unusable with log rotation. It is also counter-
intuitive for users.

This patch enables correct HUP processing. As a sideline, it also
introduces a generic HUP processing framework for non-action type
of loadable modules.

closes https://github.com/rsyslog/rsyslog/issues/1662
closes https://github.com/rsyslog/rsyslog/issues/1663
2017-07-20 14:22:19 +02:00
8ecf0aeb34 kafka: Added option enable static linking of librdkafa (disabled by default).
Also saving failed msgs now when kafka produce fails. No message loss should
be possible anymore.

Also removed old kafka tests and readded new kafka tests.
If kafka instances cannot be started (happens from time to time when
kafka/zookepper sync fails), tests will be skipped instead of failing.

Closes https://github.com/rsyslog/rsyslog/issues/1559
Closes https://github.com/rsyslog/rsyslog/issues/1584
Closes https://github.com/rsyslog/rsyslog/issues/1515
May fix https://github.com/rsyslog/rsyslog/issues/1230
Closes https://github.com/rsyslog/rsyslog/issues/1052
2017-06-19 17:14:35 +02:00
b71c1871d0 omkafka: Added new options to save and load failed messages.
When enabled, failed messages are kept in memory queue and saved on
shutdown and loaded on startup. This prevents message loss of failed
messages.

The failed items are saved in a simple Linked List and automatically
being reprocessed on resume or doaction.

Load/Save logik implemented.

This should also remove the last possible message loss from issue:
https://github.com/rsyslog/rsyslog/issues/1052
2017-06-08 15:35:45 +02:00
702df5eed6 omkafka: Implemented newer delivery callback from librdkafka.
This somehow elimitated a lot of failing messages which were not
processed on shutdown (flush) before. The old callback API was
depreceated.

This should also elimitate most of the message loss when
kafka queue is full from issue:
https://github.com/rsyslog/rsyslog/issues/1052

The new code was tested with
queue.buffering.max.messages=100 and 2000 injected messages.

Testbench: Try starting kafka server second time if failed on
first try. Sometimes the broker is still registered in zookeeper.
2017-06-08 15:35:45 +02:00
732d0e21a7 omkafka: Enhanced support to detect kafka broker problems.
Also fixed tryresume and doAction handling when action is
in suspend state.

Calling for Callbacks more often.

Adjusted kafka fail test settings.

diag.sh script detects of kafka server comes up proberly

Added liblz4 to dependencies for omkafka/imkafka needed
for static linking.

This addresses the omkafka queue problem from issue:
https://github.com/rsyslog/rsyslog/issues/1052
Yet it does not fully solve the message problem yet,
but I am working on this.
2017-06-08 15:35:45 +02:00
Rainer Gerhards
8a5a62fd5c testbench: cleanup & move kafka test to new style config 2017-05-31 13:43:05 +02:00
Rainer Gerhards
0407bc8276 mmdblookup bugfix: multiple memory leaks
There were multiple large memory leaks in mmdblookup, which made
it unusable when used more than lightly.

closes https://github.com/rsyslog/rsyslog/issues/1415
2017-05-19 17:26:22 +02:00
Rainer Gerhards
a744313570 Merge pull request #1558 from alorbach/kafka-extension
imkafka input module extension
2017-05-12 15:20:32 +02:00
Pascal Withopf
8a84f775d5 imkafka: add new parameter confParam (#1)
testbench: Fixed testbench settings for new imkafka/omkafka tests
2017-05-11 14:05:38 +02:00
Rainer Gerhards
397ae67d8d testbench: add test for internal message processing memleak
also does some required changes to the test plumbing
2017-05-10 12:43:45 +02:00
7cba5f8128 testbench: Changed kafka server properties for propper multi setup
These changes are required for future testcases.
2017-05-10 09:27:31 +02:00
f5438bdea2 imkafka: Initial version if imkafka added
Basic features need to be added now.

testbench: Added kafka test with multi kafka instances

All kafka instances are connected to one zookeeper instance.
Diag script has been adjusted to propper start/stop single
kafka instances.

autotools: Added version check for librdkafka to be higher than 0.9.1
2017-05-09 11:15:20 +02:00
Rainer Gerhards
0d35f40356 testbench: reduce kafka test verbosity
(squash) enhance kafka test
2017-05-09 11:14:42 +02:00
d277650721 testbench: Added omkafka test with multiple kafka/zookeeper instances 2017-05-09 11:09:20 +02:00
PascalWithopf
1628ef2a37 testbench: workaround for solaris 2017-04-13 14:07:38 +02:00
Rainer Gerhards
af60b7f9e1 testbench: reduce start-/stop-timeout
The current value (5 minutes) seemed excessevily wrong and should
probably indicate an error in any case. The new value of 2 minutes
should be fairly safe as well.
2017-04-11 15:12:02 +02:00
Rainer Gerhards
203cf82be8 testbench: add support for solaris 2017-04-03 14:14:56 +02:00
Rainer Gerhards
8e83d6c280 testbench: improve error reporting in dynstats-related tests 2017-03-20 10:32:02 +01:00
Rainer Gerhards
e654c27af4 testbench: do not spam testbench log with output from ps command
ps is used when waiting on startup and spams the test log if
rsyslog takes longer to start up (or fails to do so). This
makes the log hard to read.
2017-03-02 08:20:35 +01:00
Rainer Gerhards
71984ef6c5 fix testbench: shutdown-immediate command did not work for instance 2 2017-02-02 15:32:49 +01:00
3bf605255a testsuite: Added 3 new tests for imfile checking wildcard support.
Testing wildcards matching in filename and directory name including
dynamically adding and removing directories and files.
2017-01-17 14:38:32 +01:00
Rainer Gerhards
4904b9bdca testbench: ease testbench debugging by outputting generated conf
most importantly, include line numbers, so that rsyslog startup
error messages can be traced to the right line. Due to the framework,
the line number info is otherwise not visible.
2016-11-30 15:46:42 +01:00
Janmejay Singh
24436aec20 omprog test for force-kill scenario (linux-only at this point) 2016-11-03 23:48:43 +05:30
Janmejay Singh
ba22858037 - fixed omprog FD-leak (it had out-FD leaking in both outfile and no-outfile scenarios)
- now omprog kills the program by issuing TERM signal, but it can wait indefinitely when TERM is ignored (will fix this in a separate commit)
- omkafka was complaining of deprecated-fn-use in 0.9.x versions of librdkafka, which is now fixed
- fixed an incorrect comment in imdiag
2016-11-03 23:44:33 +05:30
Rainer Gerhards
75715fe2f8 testbench: add test for empty host name 2016-10-27 11:12:47 +02:00
Rainer Gerhards
e4b257b47b Merge pull request #1123 from rgerhards/log-to-syslog
make rsyslog log by default to syslog()
2016-08-23 10:51:27 +02:00
Rainer Gerhards
99ac6d5143 make rsyslog log by default to syslog()
this enables us to put error messages to systemd journal; which is
especially useful as most distros by default throw away rsyslog
error messages.
2016-08-22 18:18:33 +02:00
Rainer Gerhards
148fdfd667 testbench: add test for dirty queue shutdown
This test simulates the case where the OS force-terminates rsyslog
before it completely finishes persisting the queue to disk.
2016-08-22 16:20:02 +02:00
Rainer Gerhards
3336b911b2 testbench: file HOSTNAME was not properly deleted on test initialization 2016-07-11 08:40:57 +02:00