18879 Commits

Author SHA1 Message Date
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
Rainer Gerhards
6bba692bba
dev doc: add design notes to queue subsystem files 2025-07-12 12:23:46 +02:00
Rainer Gerhards
516dfb0ef4
github: next try 2025-07-11 19:18:49 +02:00
Rainer Gerhards
1f6e94e79e
next try
sorry for the thrash in history, but github has no preview...
2025-07-11 19:16:51 +02:00
Rainer Gerhards
6d405130bd
github: next trx a issue template sort order 2025-07-11 19:15:37 +02:00
Rainer Gerhards
05ce2ce063
github: work-around for issue template display order 2025-07-11 19:12:07 +02:00
Rainer Gerhards
2486f21ac0
github: improve issue template configuration 2025-07-11 18:53:38 +02:00
Rainer Gerhards
cd01660e81 Merge branch 'mytmp' 2025-07-11 18:48:09 +02:00
Rainer Gerhards
76b38072f3
github: move to new issue template system
Most importantly, make use of the great new features.
2025-07-11 18:45:09 +02:00
Rainer Gerhards
5ee3f94775
github: move to new issue template system
Most importantly, make use of the great new features.
2025-07-11 18:29:30 +02:00
Rainer Gerhards
e109e0a7d5
Add optional PCRE match module 2025-07-11 17:08:26 +02:00
Rainer Gerhards
f1f55bc32d
mainain ChangeLog 2025-07-11 17:00:12 +02:00
Rainer Gerhards
d5b45c0f5f
Merge pull request #5748 from rgerhards/i1255
scripting: add endswith operator to property filters and RainerScript
2025-07-11 16:58:00 +02:00
Rainer Gerhards
661803ec4a
Merge pull request #5752 from rgerhards/nsd_ptcp-invld_imptcp_msg
nsd_ptcp fix: misleading error messages (regression from ad1fd21)
2025-07-11 16:56:03 +02:00
Rainer Gerhards
5879fd493c
maintain ChangeLog 2025-07-11 16:13:59 +02:00
Rainer Gerhards
3cd89a47e6
nsd_ptcp fix: misleading error messages (regression from ad1fd21)
We received reports of log messages incorrectly referring to "imptcp" even
though the imptcp module was not loaded on the system. This caused confusion
during troubleshooting.

One such message was:

  rsyslogd: imptcp cannot set keepalive intvl - ignored: Bad file descriptor

This message originated from the nsd_ptcp module, but the LogError() calls
in EnableKeepAlive() still used "imptcp" as the source name.

This is a regression introduced in commit ad1fd21, which restructured
TCP input handling and moved responsibility for keepalive setup to nsd_ptcp,
but did not update the associated log messages.

This patch corrects the affected log strings to use "nsd_ptcp", accurately
reflecting the code path that emits them.

There is no functional change; the patch improves clarity of log output and
prevents misleading diagnostics.

The actual error shown could be related to a different issue,
see also https://github.com/rsyslog/rsyslog/pull/5749
2025-07-11 16:10:57 +02:00