Statsd, Graphite and graphs

Posted by w00t on Server Fault See other posts from Server Fault or by w00t
Published on 2012-10-01T15:18:54Z Indexed on 2012/10/01 15:41 UTC
Read the original article Hit count: 231

Filed under:
|

I've setup Graphite and statsd and both are running well. I'm using the example-client.py from graphite/examples to measure load values and it's OK.
I started doing tests with statsd and at first it seemed ok because it generated some graphs but now it doesn't look quite well.
First, this is my storage-schema.conf:
pattern = .*
retentions = 10:2160,60:10080,600:262974

I'm using this command to send data to statsd:
echo 'ssh.invalid_users:1|c'| nc -w 1 -u localhost 8126
it executes, I click Update Graph in the Graphite web interface, it generates a line, hit again Update and the line disappears.
If I execute the previous command 5 times, the graph line will reach 2 and it will actually save it. Again running the same command two times, graph line reaches 2 and disappears.
I can't find what I have misconfigured.
The intended use is this:
tail -n 0 -f /var/log/auth.log|grep --line-buffered "Invalid user" | while read line; do echo "ssh.invalid_users:1|c" | nc -w 1 -u localhost 8126; done

© Server Fault or respective owner

Related posts about graphite

Related posts about statsd