19167 Commits

Author SHA1 Message Date
Rainer Gerhards
20a09456c5
mmleefparse: new message modification module for LEEF format
This parses the LEEF message (if it is) and creates a JSON subtree.
The current implementation is PoC and will be provided to gather
early review.

Changes, including breaking changes, may happen in future versions of
this module.
2025-09-21 18:11:01 +02:00
Rainer Gerhards
48c1eae384
Merge pull request #6163 from rgerhards/ci-kafka-dl-fix
CI: fix invalid download name for zookeeper
2025-09-21 17:40:17 +02:00
Rainer Gerhards
57412b475c
CI: fix invalid download name for zookeeper
We invalidly specified the source distribution, which does not include
the necessary class files. This lead to zookeeper start failure and thus
no kafka tests being executed.
2025-09-21 17:32:26 +02:00
Rainer Gerhards
448347b358
tests: improve kafka startup readiness handling (#6157)
* tests: improve kafka startup readiness handling
* add generic TCP wait helper and kafka readiness check that replaces fixed sleeps in start_kafka
* verify zookeeper client port availability after startup
* replace ad-hoc sleeps in kafka-focused tests with wait_for_kafka_startup
* rely on kafka-topics probe instead of port checks
* share kafka layout helper to avoid duplicated logic
* align kafkapid emptiness checks for consistent style

With the help of AI-Agent: ChatGPT
2025-09-21 15:42:18 +02:00
Rainer Gerhards
ea1d77eee3
maintain ChangeLog 2025-09-21 14:50:49 +02:00
Rainer Gerhards
279718178f
Merge pull request #6160 from rgerhards/codex/fix-elasticsearch-compliance-in-tests
tests/omelasticsearch: align suite with ES 7.14, reduce flakiness
2025-09-21 14:49:28 +02:00
Rainer Gerhards
cd26aecaf9
tests/omelasticsearch: align suite with ES 7.14, reduce flakiness
Non-technical: test flakiness makes it hard to validate unrelated changes.
This aligns omelasticsearch tests with ES 7.14 defaults to get the
testbench back to a deterministic state and pave the way for further
modernization.

Impact: test behavior changes; one test skipped; CI coverage slightly reduced.

Before: tests mixed ES 6-era types and ad-hoc tarball picks; deprecation
checks intermittently failed and retries were brittle. After: tests use the
7.14.1 tarball via diag.sh default, typeless mappings, and `_doc` type in
omelasticsearch actions; known-flaky bulk-retry test is skipped for now.

Technical details:
- Add `searchType="_doc"` to all omelasticsearch actions and update index
  provisioning to typeless mappings compatible with ES 7.14.
- Remove script-level `ES_DOWNLOAD` overrides to follow diag.sh's 7.14.1
  default, keeping test scripts and helper defaults in sync.
- Drop deprecation-log assertion in `es-searchType-empty.sh` to prevent
  spurious failures specific to ES 6-era types.
- Temporarily skip `es-bulk-retry.sh` (exit 77) pending a rewrite of retry
  semantics under ES 7.x.
- CI: export `VERBOSE=1`; disable Kafka and Elasticsearch tests in the
  affected matrix job to keep CI green while ES/Kafka suites are refactored.
  VERBOSE ensures test logs are emitted to stderr and as such are
  visible in CI test runs.
- Minor whitespace/indent cleanups; no runtime code or plugin behavior
  changes.
2025-09-21 14:09:09 +02:00
Ulrike Gerhards
917af8ccbf
refactor rsyslog parameter documentation mmcount
split parameter docs into reference pages
2025-09-19 15:22:35 +02:00
Ulrike Gerhards
0fe81958b3
refactor rsyslog module parameter documentation mmaitag
split parameter docs into reference pages
2025-09-19 15:15:11 +02:00
Rainer Gerhards
d9637f513e
Merge pull request #6148 from alorbach/cursor/build-and-document-python-virtual-environments-a8a6
doc: Improve Documentation Build Process with Cross-Platform Helper Scripts
2025-09-19 15:11:13 +02:00
Rainer Gerhards
5530bac48e
Merge pull request #6155 from rgerhards/ci-fix
CI: fix zookeeper install errors
2025-09-19 15:08:17 +02:00
Ulrike Gerhards
23cadd4efd
refactor rsyslog parameter documentation mmdarwin
Split the module parameter docs into standalone reference pages and
replace the inline tables with list tables that include the summaries.
Add the hidden toctree for the new parameter files.
2025-09-19 15:07:24 +02:00
Rainer Gerhards
b6c9fa83a1
CI: fix zookeeper install errors
Provide different file name for zookeeper tar - it looks like apache
changed the name (not sure, but it worked previously).

Also now cached the file on rsyslog.com, so that we have reliable
access even on name change or apache download rate-limiting.
2025-09-19 12:18:02 +02:00
Rainer Gerhards
4ef19eee9a
maintain ChangeLog 2025-09-17 17:26:15 +02:00
Rainer Gerhards
79febe5fd0
* imtcp: warn on TLS handshakes received on plain listeners
Admins often report "gibberish" when a TLS-enabled sender connects to a
plain imtcp port. Making the mismatch explicit reduces operator confusion
and support churn, and points directly to remediation.

Impact: logs one explicit error per mismatched connection; no change to
parsing or transport on plain listeners.

Before/After: before, ClientHello bytes were ingested as binary with no
hint; after, imtcp detects a TLS ClientHello on ptcp and logs a clear
message with a troubleshooting URL.

Technically, we add a small per-session probe in tcps_sess_t and sample
the first 5 bytes of new sessions. If the record header matches a TLS
handshake (type 0x16, version 0x03.00–0x04, length 40–16384) and the
listener is plain TCP (streamDriver.mode=0), we emit a single error and
disable further probing for that session. The probe is called from
DataRcvd() and returns RS_RET_SERVER_NO_TLS when triggered; the session
is otherwise left untouched.

Runtime: introduce RS_RET_SERVER_NO_TLS (-2465) to tag the condition.
Docs: add imtcp troubleshooting section and a dedicated FAQ page.
Tests/tools: add test imtcp-tls-gibberish.sh and extend tcpflood with
-H to send only a ClientHello (OpenSSL and GnuTLS paths tolerate early
termination and non-blocking I/O for this mode).
2025-09-17 17:22:01 +02:00
f37377e4ed doc: Add helper scripts to build documentation
This commit introduces cross-platform helper scripts to streamline the
rsyslog documentation build process and updates the build instructions
for better user experience.

Changes:
- Add build-doc-linux.sh: Linux helper script with virtual environment
  management, pip bootstrapping, and flexible build options
- Add build-doc-windows.ps1: Windows PowerShell script with equivalent
  functionality for Windows environments
- Update doc/BUILDS_README.md: Add quick links and simplified build
  instructions for maintainers
- Update doc/README.md: Add Linux distribution package installation
  instructions and quickstart guide with helper script usage

Key features:
- Automatic virtual environment creation and management
- Fallback support for systems without python3-venv (uses virtualenv)
- Cross-platform compatibility (Linux/Windows)
- Support for multiple output formats (HTML, EPUB)
- Strict mode option for treating warnings as errors
- Automatic pip bootstrapping for environments without ensurepip
- Clean build option to remove previous build artifacts

The scripts handle common pain points in documentation builds:
- Missing python3-venv package on some distributions
- Missing pip in virtual environments
- Complex manual setup procedures
- Platform-specific differences

This improves the contributor experience by providing one-command
documentation builds while maintaining backward compatibility with
manual setup procedures.

Co-authored-by: alorbach <alorbach@adiscon.com>
AI-Agent: Cursor
2025-09-17 14:44:42 +02:00
Rainer Gerhards
474ad7ffac
Merge pull request #6142 from rgerhards/codex/implement-kafka-message-headers-support
omkafka: allow sending static headers
2025-09-17 12:55:43 +02:00
Rainer Gerhards
04d2d3e2b1
CI: make "make distcheck" output failed test logs 2025-09-17 12:25:12 +02:00
Rainer Gerhards
07e4375550
omkafka: allow sending static headers
Add kafkaHeader parameter to define key/value pairs
that are attached as headers to every produced message.
Require librdkafka v0.11 for header support. Update
configure checks, docs and add a regression test.

closes: https://github.com/rsyslog/rsyslog/issues/5185

With help of AI-Agent: OpenAI ChatGPT
2025-09-17 12:25:12 +02:00
Rainer Gerhards
213b7b9806
Merge pull request #6137 from rgerhards/libgcrypt
dev container: do not work-around libgcrypt dev interface change
2025-09-17 10:20:14 +02:00
Rainer Gerhards
55cf512240
maintain ChangeLog 2025-09-17 10:04:38 +02:00
Rainer Gerhards
654c350789
Merge pull request #6136 from zhw2101024/patch-1
fix config error on systems with pkg-config but not libgcrypt-config
2025-09-17 10:00:48 +02:00
Zhang Wen
1cc882f5eb fix config error on systems with pkg-config but not libgcrypt-config
The AC_CHECK_PROG macro requires a value-if-found parameter
and an optional value-if-not-found parameter
Fix by adding the value-if-found parameter
Also handle the situation where there's no libgcrypt.pc
file for libgcrypt versions before 1.8.4
2025-09-17 14:26:18 +08:00
Rainer Gerhards
3914e16992
maintain ChangeLog 2025-09-16 13:18:24 +02:00
Rainer Gerhards
21e6d804c4
Merge pull request #6077 from rgerhards/implement-fromhost-port-feature
core: add fromhost-port message property
2025-09-16 13:12:29 +02:00
Ulrike Gerhards
fdc50a32c4
refactor rsyslog parameter documentation mmutf8fix 2025-09-16 11:36:23 +02:00
Rainer Gerhards
bc25eea171
maintain ChangeLog 2025-09-15 17:25:23 +02:00
Rainer Gerhards
4341365d1f
Merge pull request #6117 from alorbach/cursor/investigate-and-resolve-rsyslog-issue-5627-c0ec
PR Summary: Handle TLS 1.3 KeyUpdate during send in ossl/gtls
2025-09-15 17:22:18 +02:00
Rainer Gerhards
dc1bad1a8c
Merge pull request #6138 from rgerhards/do
docs/getting_started: add AI assistants page
2025-09-15 15:17:57 +02:00
Rainer Gerhards
4cb9c793bf
docs/getting_started: add AI assistants page
Improve discoverability of rsyslog-specific AI helpers for users and
contributors. This supports onboarding and troubleshooting and aligns
with the project's AI-first strategy.

Impact: docs-only; adds a new page under Getting Started navigation.
2025-09-15 15:11:25 +02:00
Rainer Gerhards
5e2ca5a119
dev container: do not work-around libgcrypt dev interface change
there was "workaround" introduced in the container which prevented
to detect some issues in libgrypt-related code. This was probably done
to get newer version in dev env without the need to adapt code to
broken libgrypt API level in new version.

That prevented issues in https://github.com/rsyslog/rsyslog/pull/5406
to be deteced.
2025-09-15 12:13:51 +02:00
Rainer Gerhards
56afd10818
Merge pull request #6135 from rgerhards/doc-beginner
doc: new beginner tutorials
2025-09-15 10:38:29 +02:00
Rainer Gerhards
6dbdd0fcdd
doc: new beginner tutorials
We are redesigning the new user onboarding doc. This commit
provides very first experience documentation. Some is duplicate
content to the previous version, which we keep for now.

A cleanup will follow later. We want to gain some feedback first.
Thus the early merge.
2025-09-15 10:20:25 +02:00
Cursor Agent
78541ffaf5 tls: process TLS 1.3 KeyUpdate during send (ossl/gtls)
Handle post-handshake KeyUpdate by driving a minimal non-blocking read when the
TLS library requests READ during Send(). This prevents stalls when servers send
TLS 1.3 KeyUpdate and aligns behavior with RFC 8446 §4.6.3.

- nsd_ossl.c: SSL_ERROR_WANT_READ => small SSL_read(), then retry write
- nsd_gtls.c: E_AGAIN/E_INTERRUPTED with READ direction => small gnutls_record_recv(), then retry write

Backward-compatible and only active when the TLS stack signals a need to read.

closes: https://github.com/rsyslog/rsyslog/issues/5627
2025-09-15 09:52:40 +02:00
Rainer Gerhards
57c90287e3
Merge pull request #6121 from billie-alsup/dev/balsup/netns_socket
net: Add NetworkNamespace APIs
2025-09-13 14:19:34 +02:00
Ulrike Gerhards
a8077c1295
Codex/refactor rsyslog parameter documentation for mmtaghostname 2025-09-13 14:03:59 +02:00
Rainer Gerhards
6742c65180
Merge pull request #6130 from rgerhards/errmsg-doxygen
core: add doxygen comments to errmsg object
2025-09-13 13:52:32 +02:00
Rainer Gerhards
5c34ebb5e9
Merge pull request #6132 from rgerhards/codex/update-documentation-for-regex-type-lookup-tables
doc: describe regex lookup table type
2025-09-13 13:12:07 +02:00
Rainer Gerhards
10a728eaa4
core: add doxygen comments to errmsg object
most importantly, header file now includes comments that enable
tooltip-like behaviour in IDEs. Also includes antipaterns, which
is useful for developers and hopefully also for AI to detect
them e.g. in code reviews (and get it right in AI-generated code).
2025-09-13 10:27:30 +02:00
Rainer Gerhards
0c3529359e doc: describe regex lookup table type
Add reference for regex lookup tables. Describe POSIX regex support, first-match semantics, performance drawbacks, and overlapping pattern caution. Include sample table and fix minor wording.

AI-Agent: ChatGPT-4o
2025-09-13 08:34:30 +02:00
Billie Alsup
c78c587caf net: Add NetworkNamespace APIs
This moves NetworkNamespace functionality into
the net module. This allows the same code to
be reused across multiple tools and plugins.
The first usage is with omfwd, which is changed
to use the common net implementation.  Note
the net implementation is based on the original
omfwd implementation.  Subsequent PRs will be
opened for integrating this into omuxsock and
imtcp.

The original test case tcp_forwarding_ns_tpl.sh
was broken due to use of single quotes rather
than double quotes, thus preventing the proper
port number argument to be passed to the
listener.  Note this test must be run as
root.

Development has occurred across Fedora41 and
Fedora42, which uses glibc 2.40 and glibc2.41
respectively.  The valgrind suppressions are
updated to handle new glibc issues
accordingly.

Four new functions are callable through the
net module. These allow one to save a handle
to the current namespace, switch to a new
namespace by name, and restore the namespace
from the saved handle.  A fourth higher
level wrapper is used to open a socket in
a named network namespace, and handles the
invocation of the lower level functions.
Ideally this would be the only public
function, however it simplifies integration
into imtcp in the future (which doesn't
directly open sockets).  This may change
in the future as network namespaces are
integrated into more modules and plugins.

Signed-off-by: Billie Alsup <balsup@cisco.com>
2025-09-12 08:48:31 -07:00
Rainer Gerhards
4342184267
maintain ChangeLog 2025-09-12 15:42:22 +02:00
Rainer Gerhards
24d705eafe
Merge pull request #6129 from rgerhards/docker-fix-collector
docker: fix collector, udp and tcp could not be enabled individually
2025-09-12 15:41:01 +02:00
Rainer Gerhards
769e4c1998
docker: fix collector, udp and tcp could not be enabled individually
If either one was disabled, so was the other one as well.
2025-09-12 15:38:09 +02:00
Rainer Gerhards
bd51ec69da
Merge pull request #6128 from rgerhards/doc-container-collector
doc: better doc for rsyslog collector container
2025-09-12 15:34:34 +02:00
Rainer Gerhards
b9f6596568
doc: better doc for rsyslog collector container
among others, includes now also an example docker compose definition
2025-09-12 15:28:17 +02:00
Rainer Gerhards
d8659e21a0
doc: document compactjsonstring global option (#6127) 2025-09-12 15:28:04 +02:00
Rainer Gerhards
6091244efa
Merge pull request #6125 from rgerhards/docker-enh
docker: enhancements to debian sid and ubuntu 24.04 dev container
2025-09-12 13:13:14 +02:00
Rainer Gerhards
f8873814e8
docker: enhancements to debian sid and ubuntu 24.04 dev container
permit to build and test more modules; be more consistent

Overall helps improve CI quality.
2025-09-12 13:07:14 +02:00
Rainer Gerhards
d2e08849fe
Merge pull request #6124 from rgerhards/fix-logctl
logctl tool: fix mongoc.h include location
2025-09-12 13:03:47 +02:00