Commands Cheat Sheet

Evaluating engineering tools? Get the comparison in Google Sheets

(Perfect for making buy/build decisions or internal reviews.)

Most-used commands
Your email is safe thing.

Thankyou for your submission

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

Connection

vmctl -src-addr=
Connect to source VM instance

vmctl -dst-addr=
Connect to destination VM instance

vmctl -src-account-id=
Connect with account ID (when using managed service)

Querying

curl -G 'http://localhost:8428/api/v1/query' --data-urlencode 'query='
Instant query

curl -G 'http://localhost:8428/api/v1/query_range' --data-urlencode 'query=' --data-urlencode 'start=' --data-urlencode 'end=' --data-urlencode 'step='
Range query

curl -G 'http://localhost:8428/api/v1/series' --data-urlencode 'match[]='
Series query

Data Management

vmctl migrate
Migrate data between VM instances

vmctl influx -src-addr= -dst-addr= -remote-read-src-addr=
Import data from InfluxDB

vmctl prometheus -src-addr= -dst-addr=
Import data from Prometheus

Administration

curl -X POST 'http://localhost:8428/api/v1/admin/tsdb/delete_series' -d '{"match[]": [""]}'
Delete time series

curl -s 'http://localhost:8428/metrics'
Get VM metrics

curl 'http://localhost:8428/api/v1/status/tsdb'
Get TSDB status

curl 'http://localhost:8428/api/v1/status/active_queries'
Get currently running queries

Monitoring

curl 'http://localhost:8428/prometheus/api/v1/labels'
Get all label names

curl -G 'http://localhost:8428/prometheus/api/v1/label//values'
Get values for a label

curl 'http://localhost:8428/api/v1/targets'
Get target info