rsyslog/sidecar/tests/run-test-udp.sh
Andre Lorbach eb7b57ed1d sidecar: add rsyslog impstats exporter
Make a production-ready sidecar exporter to simplify operations and
support consistent deployments across hosts and containers.
Before: no sidecar tooling shipped. After: exporter, scripts, and docs.
Impact: new sidecar defaults to udp on loopback; tests add venv runners.

Implement JSON/CEE/Prometheus parsing with counter/gauge heuristics.
Add UDP burst buffering, size limits, and optional source filtering.
Expose /metrics and /health with parse and drop status reporting.
Provide Dockerfile, docker-compose examples, and systemd install flow.
Add validation and UDP test runners plus sample impstats data.
Document production setup, security posture, and file growth caveats.

With the help of AI-Agents: GitHub Copilot

See also: https://github.com/rsyslog/rsyslog/issues/5824
2026-01-23 07:54:56 +00:00

23 lines
610 B
Bash

#!/usr/bin/env bash
## run-test-udp.sh: Run the UDP test with a local venv.
##
## Usage:
## ./tests/run-test-udp.sh
##
## This script creates .venv in the sidecar directory if missing,
## installs requirements.txt, and runs tests/test_udp.py.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SIDECAR_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
VENV_DIR="${SIDECAR_DIR}/.venv"
if [[ ! -x "${VENV_DIR}/bin/python" ]]; then
python3 -m venv "${VENV_DIR}"
fi
"${VENV_DIR}/bin/pip" install -r "${SIDECAR_DIR}/requirements.txt"
exec "${VENV_DIR}/bin/python" "${SCRIPT_DIR}/test_udp.py"