From 26308d9fd912648ae4cd08558e49c1ede9e80961 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 00:20:39 +0100 Subject: tinc_stats: remove Graphite code --- .../scripts/adv_graphgen/tinc_stats/Graphite.py | 24 ---------------------- 1 file changed, 24 deletions(-) delete mode 100644 retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py (limited to 'retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py') diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py deleted file mode 100644 index 5002d8e5..00000000 --- a/retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/python - -import socket -from time import time - -class GraphiteSender: - def __init__(self,host,port=2003,prefix="retiolum"): - self.host = host - self.port = port - self.prefix = prefix - self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - self.sock.connect((host,port)) - - def send(name,data): - # construct a message for graphite, honor the configured prefix - self.sock.send("%s.%s %d %d\r\n"%(self.prefix,name,data,time())) - - def send_raw(path,data): - #ignore the configured prefix, just it to the path given - self.sock.send("%s %d %d\r\n"%(path,data,time())) - -if __name__ == "__main__": - import sys - GraphiteSender(sys.argv[1]).send_raw(sys.argv[2],sys.argv[3]) -- cgit v1.2.3