19359 Commits

Author SHA1 Message Date
Rainer Gerhards
6c7dc10b4c
Merge pull request #6191 from rgerhards/ci-openeuler
ci: add openEuler 24.03 LTS container and CI job
2025-09-28 11:57:55 +02:00
Rainer Gerhards
8058b8c7e3
imdiag/tests/docs: use RFC5737 test IP in samples
Use a documentation-only IP to avoid confusion and follow best practice.
This prevents irritation when users or scanners see a private address in
samples and wonder if rsyslog is trying to contact it.

Impact: Visible change in sample payloads, tests, and docs (host field).

Technical: Replace the hardcoded "172.20.245.8" in imdiag's generated
messages with a constant default hostname "192.0.2.8" from RFC 5737
(TEST-NET-1). Update tests (e.g., omrabbitmq, perctile, mmexternal,
clickhouse) and template examples to match. No API/ABI change; no effect
on action queues, OMODTX, retry/duplicate semantics, or HUP behavior.
This is purely about sample message contents emitted by the diag tool.

Before/After: samples used 172.20.245.8 -> now 192.0.2.8.

See also: https://gitee.com/src-openeuler/rsyslog/issues/I7V4I8

Fixes: https://github.com/rsyslog/rsyslog/issues/6190
2025-09-28 11:21:51 +02:00
Rainer Gerhards
4af6c5ec1a
ci: add openEuler 24.03 LTS container and CI job
Add an openEuler 24.03 LTS development container and wire it into CI to
validate builds on that platform.

Why: expand RPM-based coverage and catch distro-specific build issues
early.

Impact: CI-only. No runtime or API changes.

Before: no openEuler container or CI job; build breakage went unnoticed.
After: dedicated container and matrix entry compile and run unit tests
on openEuler.

Notes: module and test coverage may differ on openEuler; track gaps in
follow-up issues.
2025-09-28 10:52:44 +02:00
Rainer Gerhards
212e6a86d8
doc: split property documentation into separate files
This is part to make the documentation more accessible and easier to read and find (for human, SEO and AI).

Also, the documentation content has been improved, e.g. by adding additional information which was previously (incorrectly) assume to be present by users.

This is a stepping stone which provides much value. But there is still lots of room for improvement.
2025-09-27 14:17:34 +02:00
Rainer Gerhards
8c8c7bf334
Merge pull request #6187 from rgerhards/ai-agent3
AI: add missing AGENTS.md files
2025-09-26 18:08:55 +02:00
Rainer Gerhards
0f8d5ff7c1 AI: add missing AGENTS.md files
The last commit which I made were missing these files. Now adding them.
2025-09-26 18:07:21 +02:00
Rainer Gerhards
e0d3bd8b93
Merge pull request #6184 from rgerhards/ai-agents-2
AI: further improve code agent instructions
2025-09-26 17:52:13 +02:00
Rainer Gerhards
c14fdb43d4
AI: further improve code agent instructions 2025-09-26 17:39:49 +02:00
Ulrike Gerhards
04807e0a25
mmanon: split parameter docs into reference
- add per-parameter reference files for mmanon action settings
- replace inline parameter tables with summary list-table and toctree
- keep parameter summaries accessible from module page

With the help of AI-Agent: ChatGPT
2025-09-26 17:29:24 +02:00
Rainer Gerhards
6acc0f692f
Merge pull request #6183 from rgerhards/ai-agents-md
docs: add agent guides and module metadata scaffolding
2025-09-26 13:57:45 +02:00
Rainer Gerhards
b8d8faa68c docs: add agent guides and module metadata scaffolding
Improve AI-facing documentation to speed up contributor onboarding after
the gpt5-codex agent update. The guides clarify bootstrap, testing, and
where to find module ownership so agents can work predictably and avoid
expensive CI-only paths.

Impact: documentation-only; no runtime changes. Clarifies when to use
direct test scripts vs. the autotools harness.

This introduces repository-wide AGENTS guides (root, plugins/, contrib/,
tools/, doc/) plus module-focused guides for omelasticsearch, imkafka,
omkafka, and omruleset. It adds metadata templates for core and contrib
modules, initial MODULE_METADATA.yaml files for the Kafka and ES modules,
and a tools/MODULE_METADATA.json for built-ins. The top-level guide now
includes quick links, “priming a fresh AI session,” and explicit
autotools bootstrap instructions (run ./autogen.sh when autotools inputs
change). Testing guidance asks agents to prefer invoking ./tests/*.sh
directly, reserving `make check` for CI reproductions. The doc subtree
gains its own AGENTS.md and an AI doc-builder base prompt to keep edits
consistent. doc/ai/module_map.yaml was annotated to reference per-module
metadata.

Before: scattered or missing agent guidance; unclear when to bootstrap
autotools or run the full harness. After: structured, discoverable docs,
templates, and metadata that align contributor workflow across modules.
2025-09-26 13:00:06 +02:00
Rainer Gerhards
1536b64ba7
doc: update imjournal journald warning 2025-09-25 17:03:27 +02:00
Rainer Gerhards
01f6dca1ab
maintain ChangeLog 2025-09-25 16:07:06 +02:00
Rainer Gerhards
c737766261
Merge pull request #6181 from rgerhards/i5060
omelasticsearch: omit _type by default; use typeless endpoint
2025-09-25 16:03:38 +02:00
Rainer Gerhards
5bb8eb9179
omelasticsearch: omit _type by default; use typeless endpoint
Newer Elasticsearch versions reject typed APIs. This adapts the module
so shipping works out of the box with modern clusters and keeps the
codebase aligned with typeless ES conventions.

Impact: bulk metadata no longer includes _type unless explicitly set.
Old setups that relied on a default "events" type (ES < 8) may need
explicit configuration.

Technically, the default searchType is now NULL
(OMES_SEARCHTYPE_DEFAULT). setPostURL continues to route requests to
the typeless /_doc endpoint, but bulk metadata is generated without a
_type field when searchType is unset. The legacy default "events" for
ES < 8 is removed. Tests are updated to stop passing searchType, and
the searchType-empty test is dropped to reflect the new default. No
OMODTX or action-queue semantics change.

Closes: https://github.com/rsyslog/rsyslog/issues/5060
2025-09-25 11:56:32 +02:00
Appla
b499073b3f
OMHIREDIS: supported UDS redis server address 2025-09-25 15:50:26 +08:00
Rainer Gerhards
60450200b1
maintain ChangeLog 2025-09-25 08:35:47 +02:00
Rainer Gerhards
349483fb06
Merge pull request #6175 from rsyslog/codex/analyze-multi-level-json-generation-feasibility
template: support nested jsonf list output
2025-09-25 08:34:15 +02:00
Rainer Gerhards
8ed92f9b03
Merge pull request #6065 from alorbach/macos-enable-ci
ci: macOS improve test diagnostics
2025-09-24 18:19:51 +02:00
Ulrike Gerhards
13a0627587
mmfields: split parameter docs into reference pages 2025-09-24 18:14:28 +02:00
Rainer Gerhards
e9d485757f
template: add jsonftree option for nested jsonf output
We want easy nested JSON to match common schemas (e.g., Elastic ECS)
without external processors. This introduces an opt-in mode so existing
jsonf users keep exact behavior while enabling structured output when
requested.

Impact: No change unless option.jsonftree is enabled. With jsonftree,
dotted outnames render as nested objects; empty containers are skipped.
On name collisions (object vs value), we fall back to flat rendering.

Before: jsonf always emitted flat name/value pairs, even for dotted
outnames. After: jsonf remains flat by default; enabling jsonftree makes
"host.hostname" and "host.ip" render as {"host":{"hostname":...,"ip":...}}.

Technically, we add option.jsonftree to templates. When set, we lazily
build a per-template JSON tree (tplJsonNode) from dotted segments and
render it in one pass, reusing existing jsonf formatting for leaves.
The tree state is tracked on the template and freed on template delete.
Config parsing enforces mutual exclusivity among sql, stdsql, json,
jsonf, and jsonftree. Constants record bJSONf to reuse serialized
fragments. Tests cover nested output and pure-json cases using
option.jsonftree.
2025-09-24 18:12:00 +02:00
Rainer Gerhards
d27eb9dcd3
Merge pull request #6174 from rgerhards/doc-fix2
doc: further improve template doc
2025-09-24 09:04:54 +02:00
Rainer Gerhards
8fd2821a94
maintain ChangeLog 2025-09-24 09:01:36 +02:00
Rainer Gerhards
5a5ce4d51d
Update doc/source/reference/templates/templates-type-list.rst
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-09-23 18:37:47 +02:00
Rainer Gerhards
aa3db4e4b9
doc: further improve template doc
Overview has been streamlined, also some samples adjusted. This
is a consistent state. Further updates to these pages will be expected
when new functionality, currently underway, is added.
2025-09-23 18:27:57 +02:00
Rainer Gerhards
bde8bc2e4d
Merge pull request #6171 from century6/patch-1
omusrmsg bugfix: potential null pointer dereference causes segfault
2025-09-23 17:40:36 +02:00
Rainer Gerhards
5a165133c0
Merge pull request #6173 from rgerhards/doc-fix
doc: improve subtree, list template documentation
2025-09-23 16:18:01 +02:00
Rainer Gerhards
95d7bc1d11
Update doc/source/reference/templates/templates-type-list.rst
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-09-23 16:10:59 +02:00
Rainer Gerhards
021e2a8d48
doc: improve subtree, list template documentation
The new doc better aligns with how templates and mapping is understood
in the current cloud native infrastructure.

More updates are upcoming.

Also add some generally useful cross-reference anchors.
2025-09-23 15:55:54 +02:00
Qiumiao Zhang
dc8b4ce70d omusrmsg bugfix: potential null pointer dereference causes segfault
If there is no user in the data base with user ID uid, getpwuid() returns a null
pointer value. Therefore, it is necessary to check the return value of the function
to prevent segfault caused by dereference of null pointer.

In addition:
[1] Free the memory allocated for the current session identifier sessions_list[j]
to prevent a memory leak.

[2] Use LogError instead of dbgprintf to display error reports to the user.
2025-09-23 21:25:16 +08:00
Rainer Gerhards
12962cd58b
Merge pull request #6169 from rgerhards/omfile-addlf-default-on
omfile: enable addLF by default
2025-09-23 12:45:19 +02:00
Rainer Gerhards
ce4260da4a
omfile: enable addLF by default
Make default handling more natural for modern logs, especially JSON
lines. This aligns with common expectations of line-separated records
and reduces surprises when viewing files with standard tools.

Impact: Default changes; messages without trailing LF now get one added.

Backward-compatibility: We accept this change because the common and
portable convention is LF-terminated records. Most users expect this,
and many tools assume it. The risk is limited to consumers that require
byte-identical output without a final LF. Those users can restore the
old behavior by setting addLF="off" globally or per action.

There was also some clean-up of variable names and the removal of
accidentally included obsolete-legacy style config directive.

Previously, omfile wrote rendered messages as-is unless addLF was set.
This could yield "incomplete lines" when templates did not terminate
with LF. We now default addLF to on and only append when the message
does not already end with LF, preserving existing full-line writes.
The change is implemented by making the instance default true; module-
and action-level settings continue to override. Behavior remains
transparent with compression and crypto providers; no ABI/API impact.

Before: messages lacking LF were written without a final newline.
After: such messages are written with a single LF appended.
2025-09-23 10:57:29 +02:00
Ulrike Gerhards
d4c72731cb
Codex/refactor module documentation for mmdblookup
* mmdblookup: split parameter docs

Split module and input parameters into per-parameter reference files and replace inline tables with summary list-tables in the module docs. Add a hidden toctree for the new parameter pages. Documented parameters now share reusable anchors and summaries.

With the help of AI-Agent: ChatGPT
2025-09-23 08:38:09 +02:00
Rainer Gerhards
bb36d68515
omfile: add addLF option to append newline (#6165)
* omfile: add addLF option to append newline

Add a boolean addLF option for omfile that appends a trailing LF when
the rendered message does not already end with one. The setting is
available as both a module and action parameter (default off) and it is
propagated to legacy configuration and signature providers.

Documentation and a regression test cover the new behaviour.

With the help of AI-Agent: ChatGPT
2025-09-22 17:42:56 +02:00
Ulrike Gerhards
054f9e7c0c
Codex/refactor rsyslog parameter documentation inmmexternal
mmexternal: split parameter docs into reference pages

With the help of AI-Agent: ChatGPT
2025-09-22 14:40:58 +02:00
Rainer Gerhards
f4a1aa2604
Codex/document mmaudit plugin with sphinx (#6167)
* doc: add mmaudit module documentation

- add Sphinx page that explains how mmaudit detects Linux Audit records and exposes parsed fields under the $!audit subtree
- cover the quoting limitation, parse-success flag, and an example using get_property() for awkward field names
- note the configure option required to build the optional plugin

With the help of AI-Agent: ChatGPT, Gemini
2025-09-22 14:37:45 +02:00
Rainer Gerhards
35bceb4518
Merge pull request #6164 from rgerhards/ci-kafka-optimize
CI: optimize kafka test execution time a bit
2025-09-22 08:48:17 +02:00
Rainer Gerhards
4e7f760979
maintain ChangeLog 2025-09-22 08:47:24 +02:00
Rainer Gerhards
867e0696d6
Merge pull request #6152 from rgerhards/mmleefparse
mmleefparse: new message modification module for LEEF format
2025-09-22 08:35:56 +02:00
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
3f6cbf0b45
CI: optimize kafka test execution time a bit
We more precisely specify when and how exactly kafka tests need to be
carried out.
2025-09-21 17:47:07 +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