Cheat Sheets

Prometheus and M3DB in Docker in 5min


Quick Setup

Download stuff
docker pull
tar zxvf prometheus-2.6.0.linux-amd64.tar.gz
Start M3DB
mkdir m3db_data
docker run -p 7201:7201 -p 9003:9003 --name m3db -v $(pwd)/m3db_data:/var/lib/m3db
Configure and Start Prometheus
cd prometheus-2.6.0

# Add m3coordinator as read/write backend cat <<EOT remote_read: - url: "http://localhost:7201/api/v1/prom/remote/read" # To test reading even when local Prometheus has the data read_recent: true remote_write: - url: "http://localhost:7201/api/v1/prom/remote/write" EOT >>prometheus.yml

./prometheus --config.file="prometheus.yml


Verify M3DB is running by accessing http://localhost:7201/api/v1/openapi.

Check that Prometheus is running and returning its self-monitoring metrics http://localhost:9090/graph?g0.range_input=1d&g0.expr=go_memstats_alloc_bytes&

Comment on Disqus