summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-01-14 00:20:39 +0100
committermakefu <github@syntax-fehler.de>2014-01-14 00:20:39 +0100
commit26308d9fd912648ae4cd08558e49c1ede9e80961 (patch)
tree4b71d926dffe7c21547579d46a369d3bcc111624
parent83f27b39a2df428e5de137a02014858ae44b4f80 (diff)
tinc_stats: remove Graphite code
-rw-r--r--retiolum/scripts/adv_graphgen/tinc_stats/Graph.py9
-rw-r--r--retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py24
-rw-r--r--retiolum/scripts/adv_graphgen/tinc_stats/__init__.py1
3 files changed, 0 insertions, 34 deletions
diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py
index 18c3d545..e78b7795 100644
--- a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py
+++ b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py
@@ -1,6 +1,5 @@
#!/usr/bin/python
from BackwardsReader import BackwardsReader
-from Graphite import GraphiteSender
import sys,json,os
from Supernodes import check_all_the_super
from Availability import get_node_availability
@@ -187,11 +186,6 @@ def anonymize_nodes(nodes):
if __name__ == "__main__":
supernodes= []
- try:
- gr = GraphiteSender(os.environ.get("GRAPHITE_HOST","localhost"))
- begin = time()
- except Exception as e:
- sys.stderr.write( "Cannot connect to graphite: " + str(e))
if len(sys.argv) != 2 or sys.argv[1] not in ["anonymous","complete"]:
print("usage: %s (anonymous|complete)")
sys.exit(1)
@@ -226,6 +220,3 @@ if __name__ == "__main__":
print_stat_node(nodes)
print ('}')
- try:
- gr.send("graph.anon_build_time",(time()-begin)*1000)
- except Exception as e: pass
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])
diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/__init__.py b/retiolum/scripts/adv_graphgen/tinc_stats/__init__.py
index d4a686bf..62f541d1 100644
--- a/retiolum/scripts/adv_graphgen/tinc_stats/__init__.py
+++ b/retiolum/scripts/adv_graphgen/tinc_stats/__init__.py
@@ -4,4 +4,3 @@ import Log2JSON
import Supernodes
import Geo
import Graph
-import Graphite