1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-02 09:21:53 +02:00
dockerfiles/statsd
2020-08-25 17:39:13 +08:00
..
data update statsd 2019-06-07 20:51:48 +08:00
docker-compose.yml upgrade statsd to 0.8.6 2020-08-25 17:39:13 +08:00
Dockerfile upgrade statsd to 0.8.6 2020-08-25 17:39:13 +08:00
README.md fix typo 2019-07-15 11:35:09 +08:00

statsd

StatsD is a network daemon that runs on the Node.js platform and listens for statistics, like counters and timers, sent over UDP or TCP and sends aggregates to one or more pluggable backend services (e.g., Graphite).

docker-compose.yml

statsd:
  image: vimagick/statsd
  ports:
    - "8125:8125/udp"
    - "8126:8126/tcp"
  external_links:
    - graphite_graphite_1:graphite
  restart: always

python client

$ pip install statsd
import statsd
c = statsd.StatsClient('localhost', 8125)
c.incr('foo')  # Increment the 'foo' counter.
c.timing('stats.timed', 320)  # Record a 320ms 'stats.timed'.