Learn how to configure rsyslog impstats push mode, send counters to VictoriaMetrics, verify data end-to-end, and troubleshoot common failures.
Tutorial: impstats Push to VictoriaMetrics#
Goal#
Configure rsyslog to push impstats counters directly to VictoriaMetrics with Prometheus Remote Write, then verify that metrics are queryable.
What you will set up#
impstats (rsyslog) -> /api/v1/write (VictoriaMetrics)
Prerequisites#
rsyslog with impstats push support enabled.
A reachable VictoriaMetrics endpoint.
Permission to restart rsyslog.
You can confirm configuration parsing support with:
rsyslogd -N1
If your config contains push.url and parsing fails with unknown parameter
errors, your build likely does not include impstats push support.
Step 1: Start VictoriaMetrics (local test)#
docker run -d --name vm -p 8428:8428 victoriametrics/victoria-metrics
Step 2: Configure impstats push mode#
Create a test config file:
module(load="impstats"
interval="10"
format="json"
log.file="/var/log/rsyslog-stats.log"
push.url="http://127.0.0.1:8428/api/v1/write"
push.timeout.ms="2000"
push.labels=["env=dev", "pipeline=impstats-push"]
push.label.origin="on"
push.label.name="on")
Use your normal rsyslog configuration layout if preferred; the important part
is the module(load="impstats" ...) block with push.url.
Step 3: Reload or restart rsyslog#
sudo systemctl restart rsyslog
Step 4: Verify metrics in VictoriaMetrics#
Query example metrics:
curl -s http://127.0.0.1:8428/api/v1/query \
-d 'query=impstats_resource_usage_utime_total'
curl -s http://127.0.0.1:8428/api/v1/query \
-d 'query=impstats_resource_usage_openfiles_total'
Expected:
statusissuccessin API response.Result contains one or more time series with recent timestamps.
Labels include your static labels (for example
env=dev).
How names and labels appear#
Metric naming:
<origin>_<name>_<counter>_totalIf
nameis empty, it is omitted.Invalid Prometheus characters are sanitized to
_.
Label behavior:
Static labels from
push.labelsare always included.Optional dynamic labels can add
instance,job,origin,name.If a key already exists in
push.labels, it is not overridden by dynamic label injection.
Troubleshooting quick checks#
Push endpoint down:
Check rsyslog logs for push HTTP failure messages.
Validate endpoint reachability from rsyslog host.
TLS mismatch:
push.tls.*applies only tohttps://URLs.push.tls.certfileandpush.tls.keyfilemust be configured together.
4xx versus 5xx behavior:
4xxgenerally indicates request/configuration issues to fix.5xxis treated as retryable; impstats retries on next interval.
Production tuning notes#
Keep
intervalaligned with your observability needs and endpoint capacity.Use
push.batch.maxSeriesto cap per-request series count.Use
push.batch.maxBytesfor approximate payload size targeting.Keep label cardinality controlled; avoid high-cardinality custom labels.
Remember push is synchronous and no cross-interval push buffering is used.
See also#
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.