Created
June 28, 2013 09:39
-
-
Save nychng/5883607 to your computer and use it in GitHub Desktop.
test script for graphite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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