Public | Automated Build

Last pushed: 9 months ago
Short Description
Example image for running Graphite (0.9.14) with sitespeed.io
Full Description

Docker Image for Graphite

Get Graphite running instantly to use with sitespeed.io

This is a fork from Hopsoft Massive love to Hopsoft for setting up the original image.

In this image, Graphite is always setup with Basic Auth (feed your .htpasswd file when starting) and the Graphite data dir is set to /opt/graphite/storage/whisper.

Quick Start

sudo docker run -d \
  --name graphite \
  -p 8080:80 \
  -p 2003:2003 \
  sitespeedio/graphite

This starts a Docker container named: graphite with Basic Auth guest/guest. Please change the login that by feeding your own .htpasswd file when starting the container (more info about how to create your .htpasswd file):

sudo docker run -d \
  --name graphite \
  -p 8080:80 \
  -p 2003:2003 \
  -v /local/path/to/.htpasswd:/etc/nginx/.htpasswd \
  sitespeedio/graphite

And the final config that you should do is map the Graphite data dir outside of your container:

sudo docker run -d \
  --name graphite \
  -p 8080:80 \
  -p 2003:2003 \
  -v /local/path/to/.htpasswd:/etc/nginx/.htpasswd \
  -v /path/to/data/graphite/storage/whisper:/opt/graphite/storage/whisper \
  sitespeedio/graphite

TODO also map log dirs

Data retention

You can change how often data will be stored in the storage-schemas.conf and how metrics will be aggregated over time in storage-aggregation.conf.

The default one looks like this:

retentions = 10m:60d,30m:90d

It will store data for 3 months, change that if you need to store data longer. Etsy has good documentation on how to setup your Graphite metrics.

To change it, you can feed the image with a new storage-schemas.conf. The one you want to replace is located
/opt/graphite/conf/storage-schemas.conf

Start your image like this:

sudo docker run -d \
  --name graphite \
  -p 8080:80 \
  -p 2003:2003 \
  -v /local/path/to/.htpasswd:/etc/nginx/.htpasswd \
  -v /path/to/data/graphite/storage/whisper:/opt/graphite/storage/whisper \
  -v /path/to/storage-schemas.conf:/opt/graphite/conf/storage-schemas.conf \
  sitespeedio/graphite

Base Image

Built using Phusion's base image.

  • All Graphite related processes are run as daemons & monitored with runit.
  • Includes additional services such as logrotate.
Docker Pull Command
Owner
sitespeedio

Comments (5)
yesoreyeram
6 months ago

Is there any documentation/steps on how to cluster graphite?

soulgalore
2 years ago

Yes. To preserve your dashboard if you use Grafana, make sure to map the data dir inside Grafana to your server, something like -v /data/grafana/data:/var/lib/grafana else check the Grafana docs.

depend
2 years ago

Thanks for this great image. Is there a way to preserve dashboards after container is deleted?

soulgalore
2 years ago

Ooops, I've missed the comment. Always add issues at Github if you need help. https://github.com/sitespeedio/sitespeed.io

wang1022
2 years ago

Dears

I am used "sitespeed.io + graphite" container to analyze my website, after docker processes run finished, I got some log "info: Sending data to Graphite host:10.0.5.120 port:2003" and no errors, then I check the graphite directory there is no data.
Could anyone can give me some advice?

thanks a lot.