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
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
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.
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.
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.
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
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
"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
This commit makes them use the reliable method to obtain a
dynamic port. The previous method lead to unreliability (flakes)
especially on busy machines.
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%\" ]]}")