Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
graphite/statsd/grafana setup on new Amazon Linux instance
# graphite/statsd/grafana setup on new Amazon Linux instance
# add http://graphite/ to grafana as a data source
sudo su
yum update --assumeyes
yum install --assumeyes docker
service docker start
docker \
run \
--name graphite \
--detach=true \
--publish 8125:8125/udp \
hopsoft/graphite-statsd
# new 'official' is https://hub.docker.com/r/graphiteapp/docker-graphite-statsd/
# create /var/lib/grafana as persistent volume storage
docker run -d -v /var/lib/grafana --name grafana-storage busybox:latest
docker \
run \
--name grafana \
--detach=true \
--publish 80:3000 \
--link graphite:graphite \
--volumes-from grafana-storage \
grafana/grafana
# or mount /var/lib/grafana to local dir
# -v ~/grafana-storage:/var/lib/grafana
# or just create a named data volume
# docker volume create --name grafana-storage-volume
# docker run ... -v grafana-storage-volume:/var/lib/grafana
# To turn off sending of idle stats in statsd:
# ssh to instance
# sudo su
# docker exec -it graphite bash
# Add "deleteIdleStats": true to /opt/statsd/config.js
# sv restart statsd
# https/ssl for Grafana - put the server behind a load balancer and set up AWS certificate on the LB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment