18694 Commits

Author SHA1 Message Date
Rainer Gerhards
01d7ac9381
style: reformat Config Settings block with Doxygen comments
Reorganized the “Config Settings” section in rsyslog.h to improve
readability and documentation:

- Added a banner header for the Config Settings block
- Consolidated general MAXSIZE/BUFSIZE guidelines into a single Doxygen
  comment
- Provided individual `@brief` comments for each `#define`
- Aligned macro definitions for consistent formatting

No functional changes were made; this is purely a documentation and
style cleanup.
2025-07-16 12:31:17 +02:00
Rainer Gerhards
3570a564a7
Merge pull request #5798 from rgerhards/mmaitag
build: mmaitag in configure disabled by default
2025-07-16 08:25:47 +02:00
Rainer Gerhards
2fc65efc4f
build: mmaitag in configure disabled by default (#5797)
This was originally intended, but for testing it was set to
enabled by default. This is now corrected. Not all CI workers
support the necessary dependencies.
2025-07-15 22:05:45 +02:00
Rainer Gerhards
d8717d3d80
build: mmaitag in configure disabled by default
This was originally intended, but for testing it was set to
enabled by default. This is now corrected. Not all CI workers
support the necessary dependencies.
2025-07-15 18:25:15 +02:00
4a42252af8 Investigate and resolve rsyslog issue 2693 (#5793)
* Fix issue with queue.maxDiskSpace validation

When queue.maxDiskSpace is set smaller than queue.maxfilesize, rsyslog
could enter an infinite loop during shutdown. This fix adds validation
to ensure maxDiskSpace is at least as large as maxFileSize.

If an invalid configuration is detected, the system will log a warning
and automatically adjust maxDiskSpace to match maxFileSize to prevent
the shutdown loop.

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

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-07-15 17:42:23 +02:00
Rainer Gerhards
862ea79a00
maintain ChangeLog 2025-07-15 17:35:06 +02:00
Rainer Gerhards
fb51433919
feat: introduce mmaitag PoC with Gemini AI provider (#5754)
This commit adds the initial implementation of the `mmaitag` module,
a pluggable AI-based message classification processor.

The module supports two providers:
- `gemini`: uses the Gemini API via libcurl and JSON-C
- `gemini_mock`: a deterministic in-memory mock used for testing

Each log message is classified individually and tagged with a label
stored in a configurable message variable (default: `$.aitag`).

Included:
- Provider abstraction layer (`ai_provider.h`)
- Gemini provider with API key support (inline or via file)
- Prompt customization and input property selection
- Two regression tests: basic and invalid-key scenarios
- Sphinx documentation under `doc/configuration/modules`

Note: mmaitag is in its infancy and primarily a PoC. Future work
will improve batching, performance, and add more providers.

Refs:
- https://github.com/rsyslog/rsyslog/issues/5747 (AI-first strategy)

With the help of AI Agents: Codex, Gemini
2025-07-15 17:33:07 +02:00
Rainer Gerhards
460423a68a
maintain ChangeLog 2025-07-15 17:14:07 +02:00
Rainer Gerhards
381e2053f1
TESTING: Enhance action resume interval sleep time (#5260)
* Fixed a race issue between action.resumeInterval and action.resumeIntervalMax

  * The sleep time of the action.resumeInterval can make a retry scheduled by
    the action.resumeInterval unable to be executed under some circumstance.

Co-authored-by: Flos Lonicerae <lonicerae@gmail.com>
2025-07-15 17:08:18 +02:00
Rainer Gerhards
341ca7c205
Merge pull request #5653 from rgerhards/imhttp-enh
imhttp: add simple http health check functionality
2025-07-15 17:04:58 +02:00
Rainer Gerhards
3a1024379c
Merge pull request #5596 from rgerhards/coverity-imptcp
imptcp bugfix: potential socket leak
2025-07-15 17:01:34 +02:00
Rainer Gerhards
d1fa394acc
Merge pull request #5789 from rgerhards/docker-mmaitag
CI: prepare ubuntu 24.04 testing container to support mmaitag
2025-07-15 16:54:41 +02:00
Rainer Gerhards
dcea678968
Merge pull request #5792 from rgerhards/save-syslog-redefinitions
fix: Prevent redefinition warnings for syslog macros
2025-07-15 16:53:58 +02:00
Rainer Gerhards
da0eaec1a8
fix: Prevent redefinition warnings for syslog macros
Undefine common syslog severity and facility macros before
redefining them in rsyslog.h. As rsyslog, we need consistent
definitions. This resolves "redefined" warnings when other
system headers are included. Improves build cleanliness.
2025-07-15 16:53:07 +02:00
Rainer Gerhards
2160df760b
Merge pull request #5790 from rgerhards/ci-run-c_tests-on-c_changes
CI: run code checks only when code files were changed
2025-07-15 15:01:38 +02:00
Rainer Gerhards
f274d74b38
CI: run code checks only when code files were changed 2025-07-15 14:59:59 +02:00
Rainer Gerhards
8ece550970 CI: prepare ubuntu 24.04 testing container to support mmaitag 2025-07-15 14:44:44 +02:00
Rainer Gerhards
ef6351f0f3
Merge pull request #5788 from rgerhards/doc-common-mistakes
doc: add FAQ with commonly misunderstood config sequences
2025-07-15 14:35:26 +02:00
Rainer Gerhards
477debf155
doc: add FAQ with commonly misunderstood config sequences
"& stop" is right on top of the misunderstandings
2025-07-15 14:21:10 +02:00
Rainer Gerhards
b7c6bd5c54
imhttp: add simple http health check functionality
This also includes a basic Prometheus scrape entry point, which
currently can only be used for health checking.

We plan futher enhancement in this direction.

Also some "fixes" in regard to rsyslog code style and portability
methods.
2025-07-15 14:06:09 +02:00
Rainer Gerhards
a6aaa52869
maintain ChangeLog 2025-07-15 14:05:45 +02:00
Rainer Gerhards
fbbd523a72
Merge pull request #5782 from rgerhards/impstats-prometheus
impstats: add support for Prometheus metrics output format
2025-07-15 14:02:52 +02:00
Rainer Gerhards
5644c2e9e1
maintain ChangeLog 2025-07-15 13:10:53 +02:00
Rainer Gerhards
fe4ac615aa
Merge pull request #5665 from rsyslog/codex/evaluate-adding-pcre-matches-to-rsyslog
Add optional PCRE match function
2025-07-15 13:08:30 +02:00
Rainer Gerhards
70991d516c
maintain ChangeLog 2025-07-15 12:55:07 +02:00
Rainer Gerhards
63c7e7d67d impstats: add support for Prometheus metrics output format
This commit extends the impstats input module to support a new
"prometheus" format for exporting statistics. The output is
generated via statsobj.c, which already provides Prometheus-
compatible formatting.

To enable this, a new "format" config option value ("prometheus")
was added and recognized by impstats.c. When selected, impstats
invokes the appropriate statsobj function to generate output in
Prometheus exposition format.

The default behavior remains unchanged. Existing formats such as
"json" and "legacy" are not modified.

A new test has been added under tests/ to validate correct
Prometheus output generation. The test verifies that the format
header and at least one representative metric line conform to the
Prometheus text format specification.

This enhancement enables rsyslog to integrate more easily with
Prometheus-based monitoring stacks and paves the way for native
metrics scraping without external translation layers.
2025-07-15 12:29:06 +02:00
Rainer Gerhards
e2a646c6c8
Merge pull request #5787 from rgerhards/daily-stable-tag
build: adjust version tag used for daily stable build process
2025-07-15 12:22:59 +02:00
Rainer Gerhards
249a2d1228
Merge pull request #5744 from Cropi/imfile-state-file-fix
Introduce new imfile module parameter: deleteStateOnFileMove
2025-07-15 12:21:37 +02:00
Rainer Gerhards
c6db93a6f9
build: adjust version tag used for daily stable build process
Change version tag from ".master" to ".daily" to better reflect its
use in the automated daily stable build process. This also aligns with
the ongoing effort to eliminate use of the "master" name throughout the
repository.

see also: https://github.com/rsyslog/rsyslog/issues/5786
2025-07-15 10:53:54 +02:00
Rainer Gerhards
c2d6f9929b
Merge pull request #5785 from edadell/MinorTypo
docs: Fix minor typos
2025-07-15 10:38:43 +02:00
Cropi
0f5dbad19e imfile: add new module/input parameter deleteStateOnFileMove
When enabled, state files are deleted when the watched file is moved or
rotated away.  This prevents accumulation of stale state files from
rotated logs.  By default the state file is kept. Does not change
default behavior for existing inputs.  The config option is available as
per-input and per-module parameter.
2025-07-15 10:03:42 +02:00
Rainer Gerhards
fb6d5caeb9
maintain ChangeLog 2025-07-15 09:04:43 +02:00
Rainer Gerhards
f5cd377721
Merge pull request #5784 from rgerhards/macro-streamlining
refactor: normalize common macro usage to stmt-like form
2025-07-15 09:00:47 +02:00
Rainer Gerhards
7225999b77 refactor: modernize macro definitions to support formatting and clarity
This commit performs a broad modernization of widely used rsyslog
macros to align with modern C practices and support automated
formatting tools like clang-format. The changes focus on improving
syntactic regularity, readability, and tooling compatibility — without
altering behavior.

Macros refactored in this commit now follow a consistent,
statement-like form with explicit trailing semicolons. Where
applicable, macro blocks that define module interfaces (`queryEtryPt`)
have been updated to use simple `if` statements instead of `else if`
chains. While this slightly increases evaluation time, the affected
functions are only called once per module during load time to register
supported interfaces — making the performance cost irrelevant in
practice.

These improvements serve multiple purposes:
- Enable reliable clang-format usage without mangling macro logic
- Simplify reasoning about macro-expanded code for human readers
- Reduce style drift and merge conflicts
- Facilitate development for contributors using assistive tools
- Support future formatting pipelines using:
  1. `clang-format`
  2. a post-fixup normalization script

Refactored macros:
- MODULE_TYPE_NOKEEP
- MODULE_TYPE_KEEP
- MODULE_TYPE_INPUT
- MODULE_TYPE_OUTPUT
- MODULE_TYPE_FUNCTION
- MODULE_TYPE_PARSER
- MODULE_TYPE_LIB
- DEF_IMOD_STATIC_DATA
- DEF_OMOD_STATIC_DATA
- DEF_PMOD_STATIC_DATA
- DEF_FMOD_STATIC_DATA
- DEFobjStaticHelpers
- SIMP_PROP(...)

And all `queryEtryPt()` dispatch macros:
- CODEqueryEtryPt_STD_MOD_QUERIES
- CODEqueryEtryPt_STD_OMOD_QUERIES
- CODEqueryEtryPt_STD_OMODTX_QUERIES
- CODEqueryEtryPt_STD_OMOD8_QUERIES
- CODEqueryEtryPt_TXIF_OMOD_QUERIES
- CODEqueryEtryPt_IsCompatibleWithFeature_IF_OMOD_QUERIES
- CODEqueryEtryPt_STD_IMOD_QUERIES
- CODEqueryEtryPt_STD_CONF2_QUERIES
- CODEqueryEtryPt_STD_CONF2_setModCnf_QUERIES
- CODEqueryEtryPt_STD_CONF2_OMOD_QUERIES
- CODEqueryEtryPt_STD_CONF2_IMOD_QUERIES
- CODEqueryEtryPt_STD_CONF2_PREPRIVDROP_QUERIES
- CODEqueryEtryPt_STD_CONF2_CNFNAME_QUERIES
- CODEqueryEtryPt_STD_PMOD_QUERIES
- CODEqueryEtryPt_STD_PMOD2_QUERIES
- CODEqueryEtryPt_STD_FMOD_QUERIES
- CODEqueryEtryPt_STD_SMOD_QUERIES
- CODEqueryEtryPt_doHUPWrkr
- CODEqueryEtryPt_doHUP

This general modernization reduces macro misuse, improves DX, and
lays the foundation for a robust, automated style normalization
system.

See also: https://github.com/rsyslog/rsyslog/issues/5747
2025-07-15 08:25:58 +02:00
Eugene Adell
a1b8e88f8b docs: Fix minor typos 2025-07-14 17:54:44 +02:00
Rainer Gerhards
4f7130ae53
Merge pull request #5781 from rsyslog/codex/review-packaging-and-docker-integration
Update README and unify dev container builds
2025-07-13 10:59:41 +02:00
Rainer Gerhards
84f9296c02
Merge pull request #5772 from rsyslog/codex/untersuchen-und-beheben-von-fehler-2547
Document GTLS certificate chain behavior
2025-07-13 10:15:19 +02:00
Rainer Gerhards
6b6f862bbb docs: link merged Docker images 2025-07-12 22:05:44 +02:00
Rainer Gerhards
8de14c6b08
Merge pull request #5779 from rgerhards/docker-readme
docker: reflect new state of repo
2025-07-12 19:31:57 +02:00
Rainer Gerhards
a4513312ba
docker: reflect new state of repo
also fixes https://github.com/rsyslog/rsyslog/issues/5743
2025-07-12 19:30:43 +02:00
Rainer Gerhards
f62dfb6d2c
merge: import rsyslog-docker into packaging/docker/
This commit integrates the full history of the
rsyslog/rsyslog-docker GitHub repository into the main rsyslog
monorepo under packaging/docker/.

The merge was performed on 2025-07-12 using 'git subtree add' to
preserve all commit history in a clean and non-interleaved form.
No changes were made to the imported content during this commit.

Rationale:
- Unify Docker artifacts with the core rsyslog development
- Reduce repository fragmentation
- Improve discoverability and cross-component development
- Simplify CI integration and contributor workflow

The original rsyslog-docker repository will be archived in
read-only mode. All future work on Docker images and related
tooling will continue under packaging/docker/ in this repository.

This merge is part of a broader effort to consolidate related
rsyslog projects into a complete, maintainable monorepo.
2025-07-12 19:28:10 +02:00
Rainer Gerhards
ea63b6a760
Add 'packaging/docker/' from commit '6987e9e05ae1b12549f06838c7e0662e64ebef37'
git-subtree-dir: packaging/docker
git-subtree-mainline: 1b35859ad174894eeb51da335823ec24a7aa5f5e
git-subtree-split: 6987e9e05ae1b12549f06838c7e0662e64ebef37

This commit imports the full history of the cleaned
rsyslog-docker repository, after removing large binary blobs
via git-filter-repo. The cleaned repo was pushed to a temporary
repo:

  https://github.com/rgerhards/rsyslog-docker-temp

All future development of rsyslog Docker images continues here
in packaging/docker/ as part of the unified rsyslog monorepo.
2025-07-12 19:24:52 +02:00
Rainer Gerhards
1b35859ad1 Merge branch 'codex/create-doxygen-header-for-statsobj' 2025-07-12 19:09:51 +02:00
Rainer Gerhards
348a962e97 AI support: relax indention rules
Strict rules break a lot of AI Agent capabilites as we have seen. Repo will
most probably soon moved to space-indention.
2025-07-12 19:09:18 +02:00
Rainer Gerhards
dc1a8fb072
Improve TLS handshake error logging (#5762)
Log remote port on TLS handshake errors, this has been implemented at the netstream driver layer and is now easy to support by all drivers.
2025-07-12 17:42:04 +02:00
Rainer Gerhards
cd495fae6f
doc: document gtls intermediate cert chain 2025-07-12 17:39:44 +02:00
Rainer Gerhards
d86fcb2271
Document statsobj architecture and formats
Adds Doxygen headers to runtime/statsobj.c and runtime/statsobj.h.
The comments describe how statistics objects store counters and how
GetAllStatsLines emits data. Supported output formats such as
legacy, JSON, CEE, JSON_ES and Prometheus are listed. This clarifies
the stats subsystem for future maintainers.

AI-Agent: Codex, Gemini
2025-07-12 17:35:05 +02:00
Rainer Gerhards
138540d3e1
Merge pull request #5768 from rsyslog/codex/fix-bug-in-issue-#382
Document MsgSetRawMsg side effects
2025-07-12 12:54:27 +02:00
Rainer Gerhards
9a0f29d5c6
Merge pull request #5769 from rgerhards/queue-inline-doc
dev doc: add design notes to queue subsystem files
2025-07-12 12:31:33 +02:00
Rainer Gerhards
b21c861a0b
doc: clarify purpose of MsgSetRawMsg side effects 2025-07-12 12:27:33 +02:00