mirror of
https://github.com/rsyslog/rsyslog.git
synced 2026-03-19 14:09:30 +01:00
add initial tests omazuredce: add Azure Monitor output module This adds a documented Azure Monitor output path so rsyslog can ship events to Azure-hosted observability workflows. It also makes the module easier to review and iterate on as a project feature. Impact: adds a new output module, config parameters, docs, and tests. Before: rsyslog had no native Azure Monitor DCE output module. After: rsyslog can batch and send records to Azure Monitor via omazuredce. The change adds a new omazuredce plugin and wires it into the build system and module map. The module obtains Azure tokens, renders payloads from templates, batches records by size, and flushes them through the existing action queue model. The patch also documents the module and its parameters so the feature is usable without external notes. Supporting config and build integration are included so the module can be compiled and packaged consistently with the rest of the tree. AI-Agent: Codex 2025-06 With the help of AI-Agents: Codex add tests and address issues address issues more issues more issues more issues issues issues fix issues fixfix fixy fix fix fixy fix pants fix fixy fix pants2 redo the doc
50 lines
1.2 KiB
Bash
Executable File
50 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# This file is part of the rsyslog project, released under ASL 2.0
|
|
. ${srcdir:=.}/diag.sh init
|
|
. ${srcdir:=.}/omazuredce-env.sh
|
|
|
|
require_plugin "omazuredce"
|
|
|
|
export NUMMESSAGES=10
|
|
|
|
omazuredce_require_env
|
|
|
|
generate_conf
|
|
add_conf '
|
|
global(processInternalMessages="on" internalmsg.severity="info")
|
|
|
|
module(load="../plugins/omazuredce/.libs/omazuredce")
|
|
|
|
template(name="tplAzureDce" type="list" option.jsonftree="on") {
|
|
property(outname="TimeGenerated" name="timereported" dateFormat="rfc3339" format="jsonf")
|
|
property(outname="host" name="hostname" format="jsonf")
|
|
property(outname="message" name="msg" format="jsonf")
|
|
}
|
|
|
|
local4.* action(
|
|
type="omazuredce"
|
|
template="tplAzureDce"
|
|
client_id="'$AZURE_DCE_CLIENT_ID'"
|
|
client_secret=`echo $AZURE_DCE_CLIENT_SECRET`
|
|
tenant_id="'$AZURE_DCE_TENANT_ID'"
|
|
dce_url="'$AZURE_DCE_URL'"
|
|
dcr_id="'$AZURE_DCE_DCR_ID'"
|
|
table_name="'$AZURE_DCE_TABLE_NAME'"
|
|
max_batch_bytes="1048576"
|
|
flush_timeout_ms="0"
|
|
action.resumeInterval="1"
|
|
action.resumeRetryCount="1"
|
|
)
|
|
|
|
action(type="omfile" file="'$RSYSLOG_OUT_LOG'")
|
|
'
|
|
|
|
startup
|
|
injectmsg 0 $NUMMESSAGES
|
|
shutdown_when_empty
|
|
wait_shutdown
|
|
|
|
content_check "omazuredce: posted batch records="
|
|
|
|
exit_test
|