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

graphite-cli -h -p
Connect to a Graphite server

nc 2003
Manually send metrics via netcat

Sending Metrics

echo " " | nc 2003
Send a single metric via netcat

python3 -c "import socket, time; sock = socket.socket(); sock.connect(('', 2003)); sock.send(f'test.metric {value} {int(time.time())}'.encode())"
Send a metric using Python

Querying Metrics

whisper-fetch /var/lib/graphite/whisper/test/metric.wsp
Fetch raw data from Whisper database

whisper-dump /var/lib/graphite/whisper/test/metric.wsp
Dump metadata from Whisper file

curl 'http:///render?target=test.metric&format=json&from=-1h'
Query metrics via HTTP API

Graphite Database Management

whisper-create /var/lib/graphite/whisper/test/metric.wsp 60:1d 300:7d 1800:30d
Create a new Whisper file with retention policies

whisper-resize /var/lib/graphite/whisper/test/metric.wsp 60:1d 300:7d 1800:90d
Resize a Whisper file (change retention)

whisper-info /var/lib/graphite/whisper/test/metric.wsp
Get info about a Whisper file

Carbon Cache Management

carbon-cache.py start
Start Carbon cache daemon

carbon-cache.py stop
Stop Carbon cache daemon

carbon-cache.py status
Check Carbon cache status

carbon-cache.py --debug start
Start Carbon cache in debug mode

Graphite Web UI

curl 'http:///metrics/find?query=test.*'
Find metrics matching a pattern

curl 'http:///render?target=summarize(test.metric,"1day")&format=json'
Get daily summaries in JSON format

curl 'http:///render?target=test.metric&format=csv'
Get metrics in CSV format

Functions and Transformations

curl 'http:///render?target=movingAverage(test.metric,10)'
Calculate moving average

curl 'http:///render?target=aliasByNode(test.metric,1)'
Alias metric by a specific node

curl 'http:///render?target=summarize(test.metric,"1min","sum")'
Summarize data in 1-minute intervals