Skip to content

Monitoring

Avinash Gupta edited this page Oct 18, 2026 · 1 revision

Monitoring rdstail

How to know rdstail itself is healthy. To monitor your databases through their logs, see Recipes and Security Detections.

Endpoints

Served on metrics.listen (default :9090) when metrics.enabled: true:

Path Meaning
/metrics Prometheus metrics, all prefixed rdstail_
/healthz 200 once the process is up (liveness)
/readyz 503 while booting, 200 once the scheduler runs (readiness)

The port has no authentication. Bind it to localhost or a private network.

Metrics

Metric Type Labels Watch for
rdstail_logs_processed_total counter instance, engine, log_file, sink_type flat for an instance that should be busy
rdstail_logs_failed_total counter instance, sink_type, reason any increase
rdstail_dlq_depth gauge sink_name > 0: data is parked, waiting for dlq replay
rdstail_api_calls_total counter operation, outcome (ok, throttled, error) sustained throttled or error
rdstail_ingestion_lag_seconds gauge instance, log_file smoke signal only (see below)
rdstail_poll_interval_seconds gauge instance adaptive polling backing off / snapping back
rdstail_sink_write_duration_seconds histogram sink_type p99 rising: slow sink or retries
rdstail_batch_bytes histogram sink_type batch sizes vs receiver limits
rdstail_state_store_ops_total counter op, outcome errors: disk full / permissions
rdstail_read_anomalies_total counter instance, kind any increase: gap, stall, truncated_line, restart

Cardinality is bounded: log_file is the basename capped at 64 characters, and a process holds at most 500 instances.

rdstail_ingestion_lag_seconds is "now minus the file's last-written time". An idle database looks behind too, and clock skew inflates it. Use it as a hint, not a page.

Alerts

Ready-made Prometheus rules: docs/ops/prometheus-alerts.yml

Alert Fires when Action
RdstailDLQNotEmpty rdstail_dlq_depth > 0 fix the sink, then rdstail dlq replay (how)
RdstailDLQGrowing DLQ depth rising a sink is down right now
RdstailSinkWriteFailures terminal sink failures check credentials, endpoint, ACLs
RdstailAPIErrors high RDS API error ratio IAM change? instance deleted? throttling?
RdstailDown scrape fails process down: nothing is shipping
RdstailIngestionLagHigh lag > 30 min for 30 min informational; check the instance is actually active

Worth adding:

- alert: RdstailThrottled
  expr: sum(rate(rdstail_api_calls_total{outcome="throttled"}[10m])) > 0.1
  for: 15m
  labels: {severity: warning}
  annotations:
    summary: "RDS log API throttling; latency is rising"
    description: "Lengthen poll_interval or enable poll_interval_max. See the Scaling wiki page."

- alert: RdstailReadAnomaly
  expr: increase(rdstail_read_anomalies_total{kind=~"gap|stall"}[1h]) > 0
  labels: {severity: warning}
  annotations:
    summary: "rdstail read anomaly ({{ $labels.kind }}) on {{ $labels.instance }}"

Dashboard

Import docs/ops/grafana-dashboard.json into Grafana and pick your Prometheus datasource. It shows throughput, failures, DLQ depth, adaptive polling, API health and sink latency.

Useful PromQL

# records shipped per second, per instance
sum by (instance) (rate(rdstail_logs_processed_total[5m]))

# API budget in use (≈ 14/s per account + region is the ceiling)
sum(rate(rdstail_api_calls_total{outcome="ok"}[5m]))

# sink p99 write latency
histogram_quantile(0.99, sum by (le, sink_type) (rate(rdstail_sink_write_duration_seconds_bucket[5m])))

# instances that shipped nothing in 6h (may just be quiet)
sum by (instance) (increase(rdstail_logs_processed_total[6h])) == 0

Logs

rdstail logs JSON lines to stderr (logging.level: info by default), with instance, engine and log_file context:

journalctl -u rdstail -o cat | jq -c 'select(.level=="WARN" or .level=="ERROR") | {time, msg, instance, log_file, err}'

The messages that matter are listed in Troubleshooting.

Clone this wiki locally