19359 Commits

Author SHA1 Message Date
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
4f5da2c50d ci: add macOS CI workflows and improve test diagnostics
Add comprehensive macOS CI support with two new GitHub Actions workflows:

- run_macos.yml: PR-triggered CI with matrix strategy covering macOS 13-15,
  x64/arm64 architectures, and sanitizer combinations (none, ASAN, TSAN)
- run_macos_weekly.yml: Scheduled weekly testing with full matrix coverage
  and automated failure reporting via GitHub issues

Enhance test diagnostics in tests/diag.sh:
- Add separate startup timeout handling for valgrind vs normal runs
- Implement immediate crash detection during rsyslog startup
- Add comprehensive core dump analysis with platform-specific debuggers
- Improve macOS-specific error reporting and system information gathering
- Add disk space monitoring to prevent core dump creation failures
- tests/kafka: give unique names in sndrcv_kafka_multi_topics
  Rename the second omkafka action to a distinct name (kafka-fwd-2).
  Using the same action name twice can lead to only one effective
  publisher with newer builds, which caused
  tests/sndrcv_kafka_multi_topics.sh to publish to a single topic and
  fail the final count check.

Fix macOS-specific test issues:
- Skip failing TCP tests on Darwin due to TCP chunking behavior
- Add maxframesize parameter to imptcp tests for better reliability

The CI workflows include proper sanitizer configuration, core dump handling,
disk space management, and comprehensive error reporting to improve
debugging capabilities on macOS platforms.

Impact: Enables continuous testing on macOS, improves test reliability,
and provides better diagnostics for platform-specific issues.

Fixes: https://github.com/rsyslog/rsyslog/issues/5629
Refs: https://github.com/rsyslog/rsyslog/pull/5635
Refs: https://github.com/Homebrew/homebrew-core/issues/221869
Refs: https://github.com/Homebrew/homebrew-core/issues/226378
2025-09-17 12:58:46 +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
Billie Alsup
367c47e38c imtcp support for NetworkNamespace
This builds on "PR#6121 net: Add NetworkNamespace APIS"
to add Network Namespace support to imtcp module.  This
extends imtcp to support a wider range of Unix/Linux
environments (or any environment supporting network
namespaces).

The imtcp module is enhanced to accept a NetworkNamespace
parameter, both as a default at the module level, and
on a per-instance basis.

The tcpsrv module is enhanced to allow the NetworkNamespace
to be applied to a listener's configuration parameters.

Finally, the netstrm module is enhanced to switch namespaces
before invoking the downstream (driver specific) LstnInit
function.

A new test imtcp-netns (and associated imtcp-netns-vg) is
added to test this functionality.  This must be run as root
(technically it must be run by a user with CAP_SYS_ADMIN
capabilities, as network namespace creating/change is
required).

A slight change to diag.sh is made to allow passing $RS_REDIR
to valgrind (as $RS_REDIR is used in the imtcp-netns.sh
test for some negative cases).

Signed-off-by: Billie Alsup <balsup@cisco.com>
2025-09-14 08:16:33 -07: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
Rainer Gerhards
0b4dd2943c
logctl tool: fix mongoc.h include location 2025-09-12 11:26:28 +02:00
Rainer Gerhards
56185d2fa8
Merge pull request #6123 from rgerhards/docker-collector-relp
docker: add relp listener to rsyslog "collector"
2025-09-12 11:19:06 +02:00
Rainer Gerhards
d96db7cfe1
Merge pull request #6122 from rgerhards/ci-journal
CI: fix imjournal build
2025-09-12 11:17:49 +02:00
Rainer Gerhards
f8177f2186
docker: add relp listener to rsyslog "collector"
closes: https://github.com/rsyslog/rsyslog/issues/6118
2025-09-12 11:04:20 +02:00
Rainer Gerhards
eb1cca883c
CI: fix imjournal build 2025-09-12 10:03:31 +02:00
8f6d554af8
docs: fix doc build instructions (Sphinx 4.5+, main, monorepo) (#6114)
Also some other fixes, like invalid URLs.
2025-09-12 09:47:03 +02:00
Ulrike Gerhards
341f5a39e7
refactor rsyslog module parameter documentation for mmsnmptrapd
* mmsnmptrapd: split parameter docs into reference pages
2025-09-11 18:07:23 +02:00
Rainer Gerhards
db68b34e40
maintain ChangeLog 2025-09-11 08:58:23 +02:00