Skip to content

Instantly share code, notes, and snippets.

@nychng nychng/gist:5883607
Created Jun 28, 2013

Embed
What would you like to do?
test script for graphite
#!/usr/bin/env python
import socket
import time
CARBON_SERVER = '0.0.0.0'
CARBON_PORT = 2003
message = 'foo.bar.baz 42 %d\n' % int(time.time())
print 'sending message:\n%s' % message
sock = socket.socket()
sock.connect((CARBON_SERVER, CARBON_PORT))
sock.sendall(message)
sock.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.