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.
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.
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.
* 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>
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
* 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>
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.
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.
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.
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
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.
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
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.
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.
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