Commands Cheat Sheet

Try DrDroid: AI Agent for Debugging

80+ monitoring tool integrations
Long term memory about your stack
Locally run Mac App available

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

Thank you for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.
Read more
Time to stop copy pasting your errors onto Google!

Connection

thanos query --endpoint=:10902
Connect to a Thanos query instance

thanos query --endpoint=:10902 --store=:10901
Connect to Thanos query with store API endpoint

thanos query-frontend --query-endpoint=:10902
Connect to query frontend

Querying Data

thanos query --http-address=0.0.0.0:19192 --store=:10901
Start a query instance that pulls data from store API

curl -X POST http://:10902/api/v1/query?query=
Execute a PromQL query

curl -X POST http://:10902/api/v1/query_range?query=&start=&end=&step=
Execute a range query

Storage Management

thanos compact --data-dir= --retention.resolution-raw=
Compact and downsample metrics

thanos store --data-dir= --objstore.config-file=
Start a store gateway to access object storage

thanos bucket verify --objstore.config-file=
Verify bucket consistency

thanos bucket web --objstore.config-file=
Start a web UI for the bucket

Sidecar Operations

thanos sidecar --prometheus.url=http:// --tsdb.path=
Start a sidecar for Prometheus

thanos sidecar --prometheus.url=http:// --tsdb.path= --objstore.config-file=
Start a sidecar with object storage upload

thanos receive --tsdb.path= --remote-write.address=0.0.0.0:19291
Start a receiver for remote write

Configuration

thanos tools bucket web --objstore.config-file=bucket.yml
Check bucket web UI

thanos check rules --objstore.config-file=bucket.yml
Check rules syntax

thanos tools rules-check --rules=rules.yaml
Check rule files for correctness

Debugging

thanos tools bucket inspect --objstore.config-file=bucket.yml
Inspect object storage

thanos tools bucket ls --objstore.config-file=bucket.yml
List items in bucket

thanos tools bucket replicate --objstore.config-file=source.yml --objstore.config-to-file=dest.yml
Replicate data between buckets