Skip to content

Quick Start

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

Quick Start

You need rdstail installed and AWS credentials in your environment (profile, SSO, env vars or an instance role) that can read RDS logs.

1. Look at logs: 30 seconds, no config

# live tail; the engine is auto-detected
rdstail tail -i orders-db --region us-east-1

# only errors and worse
rdstail tail -i orders-db --region us-east-1 --min-severity ERROR

# last hour, primary + replica together, filtered by regex
rdstail tail -i orders-db -i orders-db-replica --region us-east-1 --since 1h --grep 'deadlock|timeout'

# structured output for jq
rdstail tail -i orders-db --region us-east-1 --format ndjson | jq -r '[.severity, .message] | @tsv'

tail keeps nothing on disk. Stop it and it starts fresh next time.

2. Grab an incident window

rdstail dump -i orders-db --region us-east-1 --since 24h -o incident.ndjson.gz

dump fetches the window, writes NDJSON (gzipped for .gz) and exits. Read-only IAM, no state. Analyse the file with DuckDB or attach it to a ticket.

3. Ship continuously: 5 minutes

The wizard lists your instances, lets you pick instances and a sink, and writes a validated config:

rdstail init

Or write the smallest useful config yourself:

# rdstail.yaml
sources:
  - type: rds
    region: us-east-1
    instances: [orders-db]          # engine auto-detected

sinks:
  - name: archive
    type: s3
    s3:
      bucket: my-log-bucket
      region: us-east-1
      prefix: rds/

state:
  type: sqlite
  path: ./state.db

runtime:
  poll_interval: 10s
  start_from: end                   # only new lines; `beginning` backfills what RDS still keeps

Then:

rdstail iam-policy -c rdstail.yaml          # least-privilege policy to attach
rdstail validate -c rdstail.yaml --deep     # checks credentials, instances, bucket
rdstail run -c rdstail.yaml

Objects appear under s3://my-log-bucket/rds/<instance>/<engine>/<log file>/YYYY/MM/DD/. Stop and restart run and it resumes from its checkpoints, without re-shipping or skipping anything.

4. Check it's working

curl -s localhost:9090/metrics | grep -E '^rdstail_(logs_processed_total|dlq_depth)'
sqlite3 state.db "SELECT instance_id, log_file, updated_at FROM checkpoints;"
aws s3 ls s3://my-log-bucket/rds/ --recursive | tail

Next steps

Clone this wiki locally