0
votes

I have installed graphite, nodejs-statsd (to receive data), and python statsd client(to send data).

below is a test script which sends data to the udp socket of statsd process.

#!/usr/bin/env python
import time
import random
import statsd
c = statsd.StatsClient('localhost',8125)
c.incr('test')
i = 0
while i <= 10000:
    time.sleep(2)
    digit = random.randrange(200 , 999)
    c.timing('stats.timed',digit)
    i = i + 1

since its sending the data every 2secs, but graphite/statsd renders the graph every 60seconds and the x-axis is also in 60 seconds, any idea how i can set x-axis points to 2 seconds

1

1 Answers

0
votes

For graphite, you have to configure you storage schema correctly. I'd suggest you take a look at this: http://graphite.wikidot.com/getting-your-data-into-graphite. Specifically step 2.

Statsd flushes the metrics every 10 seconds to graphite. You can change that to 2 seconds using the flushInterval option.