1715 Commits

Author SHA1 Message Date
Rainer Gerhards
0d122c64fd
Merge pull request #2455 from PascalWithopf/omstdout_new_config_style
omstdout: add new configuration format
2018-02-14 08:19:05 +01:00
Rainer Gerhards
537cec5fce
Merge pull request #2459 from rgerhards/i2348
core/template: add format jsonf to constant template entries
2018-02-12 15:59:08 +01:00
Rainer Gerhards
87f296fd2e core/template: add format jsonf to constant template entries
closes https://github.com/rsyslog/rsyslog/issues/2348
2018-02-10 19:04:40 +01:00
Harshvardhan Shrivastava
ade17f9259 adding hash64 and hash64mod functions support in rainerscript
removing logmsg

fixing typo in Makefile.am

fixing typo

making default hash static

fixing cast issue

fixing test
2018-02-08 20:09:52 +05:30
PascalWithopf
c5e09041ce omstdout: add new configuration format
Omstdout can now be configured in the new style
and a parameter for the template was added.

closes http://github.com/rsyslog/rsyslog/issues/2376
2018-02-02 12:42:25 +01:00
Rainer Gerhards
254785e147 testbench: disable omprog-cleanup.sh test as it is unstable
see also https://github.com/rsyslog/rsyslog/issues/2403
2018-01-31 09:57:36 +01:00
Rainer Gerhards
565f74963c
Merge pull request #2441 from rgerhards/inline-alpine
remove build warnings under Alpine Linux
2018-01-27 10:54:05 +01:00
Rainer Gerhards
4f7c3438a7 testbench: do not override default Alpine CFLAGS
... as this brought us away from the abuild environment. Most importantly,
-Os was overriden by -O2, which did make a lot of warning go away.
2018-01-25 17:10:59 +01:00
Rainer Gerhards
8b6169fde8 testbench: temporarily disable sndrcv_kafka-vg-rcvr.sh test
This test is known to fail rather frequently. We disable it until
the root cause is solved, because otherwise CI does have too many
false positive failures.

see also https://github.com/rsyslog/rsyslog/issues/2434
2018-01-25 11:26:28 +01:00
Rainer Gerhards
548067fcc0 config: add ability to disable config parameter ("config.enable")
For auto-generated configs, it is useful to have the ability to disable some
config constructs even though they may be specified inside the config. This
can now be done via the ```config.disable``` parameter, applicable to all
script objects. If set to ```on``` or not specified, the construct will be
used, if set to any other value, it will be ignored. This can be used
together with the backtick functionality to configure enable and disable
from either a file or environment variable.

Example:
Let's say we want to conditionally load a module. Environment variable ```LOAD_IMPTCP```will be either unset or ```off``` . Then we can use this config construct:
```
module(load="imptcp" config.enabled=`echo $LOAD_IMPTCP`)
```
It the variable is set to ```off```, the module will **not** be loaded.

closes https://github.com/rsyslog/rsyslog/issues/2431
2018-01-24 16:16:45 +01:00
Rainer Gerhards
8cb9c5b3d2 script: implement cat file backticks capablity
gets us a bit closer to (essential) shell backtick capability
2018-01-23 16:51:28 +01:00
Rainer Gerhards
6327e43ea9 config: add include() script object
This permits to include files (like legacy $IncludeConfig) via a
script object. Needless to say, the script object offers more
features:

- include files can now be
  - required, with rsyslog aborting when not present
  - required, with rsyslog emitting an error message but otherwise
    continuing when not present
  - optional, which means non-present include files will be
    skipped without notice
  This is controlled by the "mode" parameter.
- text can be included form e.g. an environment variable
  --> ex: include(text=`echo $ENVVAR`)

This finally really obsoletes $IncludeConfig.

closes https://github.com/rsyslog/rsyslog/issues/2151
2018-01-22 18:36:03 +01:00
Rainer Gerhards
ff4a354f7b testbench: add test for new rscript backticks feature 2018-01-21 12:52:30 +01:00
Rainer Gerhards
82e30bf85f
Merge pull request #2413 from rgerhards/i2054
core: set TZ on startup if not already set
2018-01-19 12:04:51 +01:00
Rainer Gerhards
d01ea7e2eb core: set TZ on startup if not already set
In theory, TZ should be set by the OS. Unfortuantely, this seems
to be not the case any longer on many Linux distros. We now check
it and set it appropriate if not already given.

closes https://github.com/rsyslog/rsyslog/issues/2054
2018-01-19 10:29:56 +01:00
Rainer Gerhards
43daca630e testbench: add test for external command line parser
via omprog, which uses it

see also https://github.com/rsyslog/rsyslog/issues/2408
2018-01-18 12:30:28 +01:00
Rainer Gerhards
bcdce73362
Merge pull request #2402 from rgerhards/i2396-teste
improve testbench plumbing, new test
2018-01-18 10:54:43 +01:00
Rainer Gerhards
58fcfc4909 testbench: work-around racy tests
some omprog tests are racy as they depend on sleep calls to "synchoronize".
We have mostly been able to change this to more reliable synchronization.
A small window of raciness remains for some tests, but this seem to be
inevitable. Tests on fully loaded systems seem to incidate that we have
solved the issue sufficiently.

If that doesn't solve the sporadic failures, we need to further think about
how to handle this.

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-01-17 15:53:49 +01:00
Rainer Gerhards
76ef7a58b2 testbench: ensure we have the necessary commands to execute test
this might have caused sporadic failures on platform where "lsof" was
missing.

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-01-17 13:30:46 +01:00
Rainer Gerhards
00a18acefa testbench: add new test to check proper creation of jsonmesg property
see also https://github.com/rsyslog/rsyslog/issues/2396
2018-01-17 13:02:08 +01:00
Rainer Gerhards
3e058ba9ea testbench: fix/upgrade diag.sh framework
fixed some obvious copy&paste error, removed invalid verboseness and
added a standard way of doing grep checks on test result
2018-01-17 11:44:52 +01:00
Rainer Gerhards
639234201f
Merge pull request #2398 from rgerhards/i2391
fix memory leak in parse_json()
2018-01-17 08:13:50 +01:00
Rainer Gerhards
a26e57e4e7
Merge pull request #2397 from rgerhards/travis2
Travis: further collapse build matrix
2018-01-17 08:11:40 +01:00
Rainer Gerhards
b06a48d6b5 Travis: further collapse build matrix 2018-01-16 13:04:47 +01:00
Rainer Gerhards
0b01af41ed testbench: add test for potential parse_json() memory leaks
see also https://github.com/rsyslog/rsyslog/issues/2391
2018-01-16 12:28:51 +01:00
Rainer Gerhards
f87498e1f1
Merge pull request #2385 from jsiwrk/feature/omprog_feedback_simple_test
omprog: added test for feedback feature (without using transactions)
2018-01-16 09:15:40 +01:00
Rainer Gerhards
89318b2dea travis: combine some build checks
... and do them via containers. This also reduces resource usage and
runtime on Travis a bit.
2018-01-15 18:07:06 +01:00
Rainer Gerhards
b89466e105 Travis: run static analyzer via standard dev container
also some improvements to somewhat optimize the build matrix so
that we avoid unnecessary work.
2018-01-14 13:56:27 +01:00
Joan Sala
b6b0c54ebb omprog: added test for feedback feature (without using transactions) 2018-01-13 19:22:18 +01:00
Rainer Gerhards
f356d9f399 Travis: check build on Alpine Linux and Ubunut rolling (via docker container) 2018-01-12 17:29:02 +01:00
Rainer Gerhards
a87de59f6d
Merge pull request #2341 from bayaro/master
doFuncReplace(): add tail of src if tail is partially similar to 'replaceWith'
2018-01-12 11:48:56 +01:00
Thomas Deutschmann
468eeb79b8
tests: Run rscript_http_request.sh only when built with libcurl 2018-01-11 18:39:23 +01:00
baya
94e2be20d8 + yet one rscript_replace_complex test 2018-01-09 12:23:13 +02:00
Rainer Gerhards
3bf95fd46f
Merge pull request #2361 from rgerhards/i1836
core/action: implement errorfile capability
2018-01-08 13:17:05 +01:00
Rainer Gerhards
53930f31f2
Merge pull request #2364 from rgerhards/merge-2181
Merge PR #2181
2018-01-08 13:06:42 +01:00
Rainer Gerhards
ac152d89d2
Merge pull request #2355 from rgerhards/testbench-more-bsd-tests
testbench: enable more tests on BSD
2018-01-07 16:11:52 +01:00
Rainer Gerhards
0032ba12e5 build system: fix build of testbench tools under Alpine Linux
closes https://github.com/rsyslog/rsyslog/issues/2365
2018-01-07 13:42:07 +01:00
Rainer Gerhards
e134b545b3 mmpstrucdata: make case preservation of SD_IDs optional
commit 5cee06a60 introduced case-perservation, but did not make
it optional. This broke existing behavior and thus potentially
existing configurations. This commit introduces a new parameter
"sd_name.lowercase" which now controls this behavior.

Note that 5cee06a60 is merged to master branch together with this
commit, so no released code ever had the potential regression.

see also https://github.com/rsyslog/rsyslog/pull/2181
2018-01-07 10:18:57 +01:00
Rainer Gerhards
48a49644d5 Merge branch 'master' of https://github.com/alanrobson/rsyslog into merge-2181 2018-01-06 11:28:01 +01:00
Rainer Gerhards
c1a601e72f core/action: implement errorfile capability
in case an action needs to discard messages, these discarded
messages can now be written to an "error file" if so configured.
This permits to detect, diagnose and re-process failed messages.

closes https://github.com/rsyslog/rsyslog/issues/1836
2018-01-06 11:25:13 +01:00
Rainer Gerhards
23ae3018bf
Merge pull request #2358 from jgerhards/mmanon-error
mmanon bugfix: fix wrong ipv6 embedded recognition
2018-01-05 17:20:04 +01:00
Rainer Gerhards
2b2678a72a
Merge pull request #2353 from alorbach/imfile-i2271
imfile: Fixed issues not detecting files in directory when wildcards …
2018-01-05 17:14:39 +01:00
Rainer Gerhards
9a7481aa43
Merge pull request #2335 from rgerhards/i326
config processing: bare variable root access not permitted
2018-01-05 17:12:27 +01:00
af09d33b49 imfile: Partially fixed issues not detecting files in directory when wildcards are used.
When directories and files are created at the same time,
imfile may missed subdirs or file if the machine is on high load.

The handling has been enhanced to scan newly created directories ALWAYS for
matching files.

This should fix following issues:
closes https://github.com/rsyslog/rsyslog/issues/2271

However we still have a problem when a multilevel directory configurations.
Details are discussed here https://github.com/rsyslog/rsyslog/issues/2354
2018-01-05 12:59:19 +01:00
Jan Gerhards
782982d94a mmanon bugfix: fix wrong ipv6 embedded recognition
mmanon recognizes IPv6 with embedded IPv4 that have too few (16 bit) fields.

example: 13:abd:45:0.0.0.0

closes https://github.com/rsyslog/rsyslog/issues/2357
2018-01-05 12:33:36 +01:00
Rainer Gerhards
fd6a30a652 testbench: enable more tests on BSD
These tests have command line tool incompatibilities which are
easy to solve. This doesn't fix all test's issues, but at least
we get some more on board.
2018-01-05 09:17:26 +01:00
Rainer Gerhards
31cc4355bd testbench: check if external URLs can be accessed, skip if not
They may not be accessible because they (or parts of the
network) can be down or access is not permitted. In this
case, the affected tests skip themselves.

Special thanks to Thomas D. (Whissi) for providing the check
function.

closes https://github.com/rsyslog/rsyslog/issues/2339
2018-01-03 17:25:12 +01:00
Rainer Gerhards
22df64124c testbench: add test case for bare empty var root access 2018-01-03 16:20:32 +01:00
Rainer Gerhards
ff7e123872 testbench: add test for bare variable root script access 2018-01-03 16:20:32 +01:00
Rainer Gerhards
03531cb4ab testbench: temporarily disable another imfile tests
this is known to fail due to known bug in imfile (which
will be worked on soon).

Thanks to whissi for mentioning this test.

see also https://github.com/rsyslog/rsyslog/issues/2325
2018-01-03 09:34:44 +01:00