14284 Commits

Author SHA1 Message Date
Rainer Gerhards
d801ea1ae7
Merge pull request #4044 from rgerhards/fix-indent
fix indention
2019-12-18 10:02:48 +01:00
Rainer Gerhards
61773e15e4
fix indention
detected by clang 10
2019-12-18 09:35:56 +01:00
Jiri Vymazal
0de93c9e15 Changed default for permitExpiredCerts to "off"
This is to be conssitent with rsyslog's prior behavior where
expired certs were automatically rejected
2019-12-11 15:35:26 +01:00
Rainer Gerhards
7e1b40427b
maintain ChangeLog 2019-12-10 10:33:21 +01:00
Rainer Gerhards
393e48e86b
Merge pull request #4019 from rgerhards/i4011
core/config bugfix: do not emit false error when config.enabled="on" is used
2019-12-10 10:32:10 +01:00
Rainer Gerhards
7daed87a8a
testbench: add test for config param "config.enabled"
Make existing test more reliable and cover new bug scenario.

see also https://github.com/rsyslog/rsyslog/issues/4011
2019-12-09 17:43:53 +01:00
Rainer Gerhards
fec4535f1c
core/config bugfix: false error msg when config.enabled="on" is used
When the 'config.enabled="on"' config parameter an invalid error message
was emitted that this parameter is not supported. However, it was still
applied properly. This commit removes the invalid error message.

closes https://github.com/rsyslog/rsyslog/issues/4011
2019-12-09 17:43:53 +01:00
Rainer Gerhards
f55591cc7c
Merge pull request #4013 from jvymazal/imjournal_rotation_cosmetic
Make handleRotation() function bit easier to read
2019-12-09 08:51:10 +01:00
Jiri Vymazal
38ef313f0e Make handleRotation() function bit easier to read 2019-12-04 11:57:09 +01:00
Rainer Gerhards
92d01f4446
maintain ChangeLog 2019-12-03 15:47:34 +01:00
Rainer Gerhards
0c24ac3ed2
Merge pull request #3994 from alorbach/pr-issue-3991
omsnmp: Add support for new option "snmpv1dynsource"
2019-12-03 15:43:59 +01:00
fd6c32c2f2 testbench: Add two real tests for omsnmp
Adds a python based SNMP Trap Receiver which outputs received
SNMP Traps by UDP onyl at the moment. Can be extended later.
Tests results are verified by content_check.

The tests have to be enabed with ./configure --enable-snmp-tests

Test sndrcv_omsnmpv1_udp_dynsource.sh checks the new snmpv1dynsource
option.

In order to work, the following python packages needs to be installed:
	pip install pysnmp

On Ubuntu 18, we need these packages to be installed:
	apt install snmp libsnmp-dev snmp-mibs-downloader

closes: https://github.com/rsyslog/rsyslog/issues/3985
2019-12-03 13:26:36 +01:00
Rainer Gerhards
e2b9eedd15
Merge pull request #3986 from alorbach/pr-issue-3973
omsnmp: Fix "traptype" variable checking.
2019-12-03 09:42:41 +01:00
Rainer Gerhards
b9f27772cf
Merge pull request #4004 from rgerhards/try-fix-suse-valgrind
core/config: "fix" valgrind false positive
2019-12-03 08:52:09 +01:00
Rainer Gerhards
9d2084989a
core/config: "fix" valgrind false positive
While this is a false positiv, we actually restructure the code to
"solve" the issue. As it is only-config related code, the performance
is not affected. As such the "fix" is acceptable.
2019-12-02 18:33:42 +01:00
Rainer Gerhards
64357d484b
maintain ChangeLog 2019-12-02 17:18:41 +01:00
Rainer Gerhards
3a73ac39a7
Merge pull request #3990 from jvymazal/inode_hash_imfile_fix
Thorougher state-file renaming and cleaning
2019-12-02 17:08:52 +01:00
Rainer Gerhards
df17aee501
Merge pull request #3981 from 3chas3/normalize-rate-limits
ratelimit: increase rate limit interval parameter
2019-12-02 17:07:11 +01:00
Rainer Gerhards
5dca2f96c5
Merge pull request #3987 from VultureProject/ommongodb-merge-upstream
OMMONGODB :: Add other supported formats for 'time' and 'date' fields
2019-12-02 17:04:42 +01:00
Rainer Gerhards
b16f2cba5d
Merge pull request #4000 from 3chas3/handle-ignore-previous-after-sd-journal-invalidate
Handle journal invalidate
2019-12-02 17:01:25 +01:00
Rainer Gerhards
1bf1290cfc
Merge pull request #4002 from rgerhards/pgsql-pkgconfig
build system: make postgres module use pkg_config
2019-12-02 10:40:39 +01:00
Rainer Gerhards
312ba4e3b9
build system: make postgres module use pkg_config
This is the recommended method and we use pkg_config in any
case. With the old method, postgres server-development packages
needed to be installed just to build the client, which was
neither intuitive nor clean.
2019-12-02 09:44:50 +01:00
Charles (Chas) Williams
e5eb85129f Handle journal invalidate
The journal API will sometimes issue an SD_JOURNAL_INVALIDATE
which results in a repositioning of the cursor. From the man page:

    Programs only interested in a strictly sequential stream
    of log data may treat SD_JOURNAL_INVALIDATE the same way as
    SD_JOURNAL_APPEND, thus ignoring any changes to the log view
    earlier than the old end of the log stream.

If we have configured IgnorePreviousMessages, we want to treat the
invalidate event as an append, and wind to the end of the message
stream.
2019-11-29 15:57:36 -05:00
44d489cf52 omsnmp: Add support for new option "snmpv1dynsource"
If set, the source field from SNMPv1 trap can be overwritten
with a template, default is "%fromhost-ip%". The content should be a
valid IPv4 Address that can be passed to inet_addr(). If the content
is not a valid IPv4 Address, the source will not be set.

closes: https://github.com/rsyslog/rsyslog/issues/3991
2019-11-29 16:01:50 +01:00
2bd6c99cbe relp: Add support setting openssl configuration commands.
Add new configuration parameter tls.tlscfgcmd to omrelp and imrelp.
(Using relpSrvSetTlsConfigCmd and relpCltSetTlsConfigCmd)

OpenSSL Version 1.0.2 or higher is required for this feature.
A list of possible commands and their valid values can be found in the
documentation: https://www.openssl.org/docs/man1.0.2/man3/SSL_CONF_cmd.html

The setting can be single or multiline, each configuration command is
separated by linefeed (n). Command and value are separated by
equal sign (=). Here are a few samples:

tls.tlscfgcmd="Protocol=ALL,-SSLv2,-SSLv3,-TLSv1,-TLSv1.2"

tls.tlscfgcmd="Protocol=ALL,-SSLv2,-SSLv3,-TLSv1
MinProtocol=TLSv1.2"

Add to new testcases for librelp and tlscfgcmd.

closes https://github.com/rsyslog/rsyslog/issues/3959
2019-11-29 16:00:27 +01:00
Rainer Gerhards
8945dcfd02
Merge pull request #3999 from rgerhards/tb-python3-3
testbench: fix some issue finding correct python interpreter
2019-11-29 15:54:52 +01:00
Rainer Gerhards
71561b0d7b
Merge pull request #3998 from rgerhards/tb-python3-2
testbench: fix some python env-induced issues
2019-11-29 15:30:50 +01:00
Rainer Gerhards
0bb33d153e
testbench: fix some issue finding correct python interpreter
see also https://github.com/rsyslog/rsyslog/issues/3853
2019-11-29 14:06:41 +01:00
Rainer Gerhards
0421e3c34d
testbench: fix some python env-induced issues
see also https://github.com/rsyslog/rsyslog/issues/3853
2019-11-29 13:15:25 +01:00
1fb0529e0c omsnmp bugfix: "traptype" parameter invalidly rejected value 6
"Traptype" needs to support values 0 to 6.
However, if value 6(ENTERPRISESPECIFIC) was set, an invalid error message
was emitted. Otherwise processing was correct.

This could lead to problems with automatic config deployment,
as valid configurations were invalidly reported as incorrect.
That in turn could make a deployment fail.

closes https://github.com/rsyslog/rsyslog/issues/3973
2019-11-29 11:49:46 +01:00
Rainer Gerhards
aa0f2d6cfc
Merge pull request #3997 from rgerhards/python3
testbench: improve python3 support
2019-11-29 08:48:06 +01:00
Rainer Gerhards
2869f471d6
testbench: improve python3 support 2019-11-28 13:49:09 +01:00
Rainer Gerhards
0f6e23ef59
Merge pull request #3968 from alorbach/pr-issue-3945
openssl: Fixed Error output (logmsg).
2019-11-28 12:14:32 +01:00
f1741c05a6 openssl: Fixed Error output (logmsg).
Full error details will now printed out in all error cases.

See also: https://github.com/rsyslog/rsyslog/issues/3945
2019-11-27 17:59:25 +01:00
Jiri Vymazal
ac30968b78 Thorougher state-file renaming and cleaning
Now checking if file-id changes and reanming - cleaning state file
accordingly and always checking and cleaning old inode-only style
state files.
2019-11-27 17:25:52 +01:00
Rainer Gerhards
426e9578e0
Merge pull request #3995 from rgerhards/tb-tls
testbench: make some tls/ossl tests more robust
2019-11-27 13:30:52 +01:00
Rainer Gerhards
34f0aa2106
maintain ChangeLog 2019-11-27 12:22:05 +01:00
Rainer Gerhards
fc3eae5ea4
Merge pull request #3869 from kortemik/fix-ATRHEFB
fix transactional on remove HardErrors
2019-11-27 12:18:30 +01:00
Rainer Gerhards
a6d6101916
testbench: make some tls/ossl tests more robust
This commit makes them use the reliable method to obtain a
dynamic port. The previous method lead to unreliability (flakes)
especially on busy machines.
2019-11-27 10:15:26 +01:00
Rainer Gerhards
23065df56e
maintain ChangeLog 2019-11-27 09:22:58 +01:00
Rainer Gerhards
5127b1ab2c
Merge pull request #3971 from rgerhards/tb-mysql-basic
testbench: improve mysql test framework plumbing
2019-11-27 09:21:43 +01:00
Mikko Kortelainen
0f04c18432 destination addressing on remove HardErrors 2019-11-27 08:04:12 +02:00
Rainer Gerhards
0307a0cc0a
testbench: improve mysql test framework plumbing
This is an initial try to make mysql tests able to run in parallel,
which also hardens them against some timing problems.
2019-11-26 10:56:33 +01:00
frikilax
497509b6d6 OMMONGODB :: Add other supported formats for 'time' and 'date' fields 2019-11-22 19:22:13 +01:00
Rainer Gerhards
cdeb3bbf00
maintain ChangeLog 2019-11-22 16:47:16 +01:00
Rainer Gerhards
771fc80112
Merge pull request #3982 from dmolik/omhttp-loki
omhttp: add basic support for Loki Rest
2019-11-22 16:41:24 +01:00
Rainer Gerhards
fa63625f03
maintain ChangeLog 2019-11-22 16:28:59 +01:00
Rainer Gerhards
35e3200566
Merge pull request #3984 from rgerhards/tb-am_path_python
testbench: obtain python binary path via AM_PATH_PYTHON
2019-11-22 16:11:33 +01:00
Dan Molik
8793a88987
omhttp: add basic support for Loki Rest
Loki is a new message indexer and querier from Grafana Labs. See
https://github.com/grafana/loki for details on Loki.

This change provides the initial message structure to send bulk message
payloads to the Loki Rest endpoint. omhttp, recieved a new bulk message
format called lokirest. Additionally, the plugin relies on the user to
provide the correct "stream" read message format.

A loki template must be json compatible and include a "stream" key of
key value tags, and a values key of an array of 2 element arrays, where
each 2 element array is the unix epoch in nanoseconds followed by an
unstrectured message.

An example:

    template(name="array_loki" type="string" string="{\"stream\":{\"host\":\"%HOSTNAME%\",\"facility\":\"%syslogfacility-text%\",\"priority\":\"%syslogpriority-text%\",\"syslogtag\":\"%syslogtag%\"},\"values\": [[ \"%timegenerated:::date-unixtimestamp%000000000\", \"%msg%\" ]]}")
2019-11-22 09:03:10 -05:00
Rainer Gerhards
27cab772a6
maintain ChangeLog 2019-11-22 14:50:05 +01:00