Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Statsite

This container packages statsite. It is responsible for receiving metrics
from the network, aggregating those metrics over a configurable time period,
then forwarding those aggregated metrics to Graphite. It is part of the
metrics project.

This container listens on port 8125, TCP or UDP, for metrics.

The aggregated result is sent to a configurable backend. In the statsite repo
there are a list of available sinks and more can be added on request.

Usage

Using this tool always starts with getting an image.

docker build .

or

docker pull paperg/statsite

There are a few configurable environment variables that change the
functionality of this tool. The default configuration expects Graphite and will
send metrics to placelocal.metrics.paperg.com.

Config

Graphite

FLUSH_INTERVAL=1
STREAM_CMD=python /usr/local/lib/statsite/sinks/graphite.py \
                  carbon.hostedgraphite.com\
                  2003

The graphite BACKEND requires a METRIC_NAMESPACE variable. The container
will fail if the trailing . is missing on the METRIC_NAMESPACE variable.

Stackdriver

There is a variable for a default Stackdriver setup as well. If you set
BACKEND=stackdriver and pass in your STACKDRIVER_KEY then the config will
look like this:

FLUSH_INTERVAL=60
STREAM_CMD=statsite-stackdriver --key $STACKDRIVER_KEY
GLOBAL_PREFIX="[ec2-instance-id-here]."

Note: The instance-id will be prepended for EC2 instances using the stackdriver
BACKEND. This will be stripped off the final metric but is used for "instance
metrics" on stackdriver.

Any of the configuration variables can be manually overridden with
BACKEND=custom.

Basic Docker Usage

docker run \
    -p 127.0.0.1:8125:8125 \
    -p 127.0.0.1:8125:8125/udp \
    --name statsite \
    paperg/statsite

G-box

dev.paperg.com:
  api:
    docker:
      statsite:
        image: paperg/statsite
        ports:
            - 127.0.0.1:8125:8125
            - 127.0.0.1:8125:8125/udp
        environment:
            BACKEND: stackdriver
            STACKDRIVER_KEY: omgs0secr3tk3yher3

Tests

There are also unit tests for the Statsite container that can be run with:

bundle install
rspec
Docker Pull Command
Owner
paperg
Source Repository

Comments (0)