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.
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.
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.
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.
docker run \
-p 127.0.0.1:8125:8125 \
-p 127.0.0.1:8125:8125/udp \
--name statsite \
paperg/statsite
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
There are also unit tests for the Statsite container that can be run with:
bundle install
rspec
Content type
Image
Digest
sha256:8e39b428e…
Size
71.7 MB
Last updated
almost 11 years ago
docker pull paperg/statsite