GithubHelp home page GithubHelp logo

dsgs's Introduction

dsgs

[d]ocker [s]tatsd [g]raphite [s]etup

A small script to help you run hopsoft/docker-graphite-statsd with a different statsd config file. hopsoft's docker image for statsd and graphite are great, and really flexible. I generally run it with a different config file for statsd (to match closer to what we use in production at the day job).

This script will do the following:

  • create a directory (you choose the name) within your home directory and populate it with other directories to be used as mounted volumes in the docker container
  • copy a given statsd config file (you supply it, or it will use a default one)

Usage

Clone this repo, or download the dsgs file. Move it somewhere that is in your PATH (ala /usr/local/bin). For example:

git clone [email protected]:knomedia/dsgs.git
cd dsgs
cp dsgs /usr/local/bin/dsgs
usage:

dsgs <dir> [config_url]

<dir> is the name of a directory that will be created in your home folder
and updated with a statsd config file, and then used as a local volume for the
docker container that you spin up.

[config_url] optional url to a statsd config file to use

For example:

dsgs local_statsd_config

this would create a ~/local_statsd_config directory with some sub directories, and copy a default statsd config.js file into ~/local_statsd_config/statsds/

Then follow the prompt to start up your container locally. It will look something like:

VIRTUAL_HOST=graphite.docker docker run -d
  --name graphite\
  -p 81:80  -p 2003:2003\
  -p 8125:8125/udp\
  -v ~/local_statsd_config/graphite/configs:/opt/graphite/conf\
  -v ~/local_statsd_config/graphite/data:/opt/graphite/storage\
  -v ~/local_statsd_config/statsd:/opt/statsd\
  hopsoft/graphite-statsd

From there you can follow the directions at hopsoft/docker-graphite-statsd. But the td/dr; is:

# stop the container from running
docker stop graphite

# start the container up
docker start graphite

# remove the container
docker rm graphite

Assuming you are using https://github.com/codekitchen/dinghy you will be able to get access to the graphite web ui at http://graphite.docker:81, and can send statsd metrics over UDP to graphite.docker:8125 something like:

echo "some.key.bucket:1|c" | nc -w 1 -u graphite.docker 8125

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.