diff options
-rw-r--r-- | ovh/README | 10 | ||||
-rwxr-xr-x | ovh/soapi/zoneEntryAdd | 10 | ||||
-rw-r--r-- | retiolum/hosts/monitoring | 2 | ||||
-rwxr-xr-x | retiolum/scripts/adv_graphgen/all_the_graphs.sh | 3 | ||||
-rwxr-xr-x | retiolum/scripts/adv_graphgen/parse_tinc_anon.py | 8 | ||||
-rwxr-xr-x | retiolum/scripts/adv_graphgen/parse_tinc_stats.py | 16 |
6 files changed, 29 insertions, 20 deletions
@@ -15,8 +15,12 @@ export PATH="$PWD/bin${PATH+:$PATH}" export KREBS_OVH_USER=... export KREBS_OVH_PASS=... -zoneExport > /tmp/foo -$EDITOR /tmp/foo -zoneImport < /tmp/foo + +zoneEntryAdd "krebsco.de" "subdomain" "A" "a.b.c.d." + +# ZoneExport Broken since 2012-07-16 +# zoneExport > /tmp/foo +# $EDITOR /tmp/foo +# zoneImport < /tmp/foo # Have a nice day!^_^ diff --git a/ovh/soapi/zoneEntryAdd b/ovh/soapi/zoneEntryAdd index bf1f4a92..20ecd1fd 100755 --- a/ovh/soapi/zoneEntryAdd +++ b/ovh/soapi/zoneEntryAdd @@ -20,14 +20,14 @@ soap = WSDL.Proxy(wsdl) username = environ['KREBS_OVH_USER'] password = environ['KREBS_OVH_PASS'] -domain = argv[2] -subdomain = argv[3] -fieldtype = argv[4] -target = argv[5] +domain = argv[1] +subdomain = argv[2] if argv[2] is not " " else "" +fieldtype = argv[3] +target = argv[4] session = soap.login(username, password, 'de', 0) -result = soap.zoneEntryAdd(session, domain, subdomain, fieldtype, target) +result = soap.zoneEntryAdd(session, domain, subdomain, fieldtype, target,1) print dumps(result, sort_keys=True, indent=2, default=default) soap.logout(session) diff --git a/retiolum/hosts/monitoring b/retiolum/hosts/monitoring index 8bc6dd16..e51c309d 100644 --- a/retiolum/hosts/monitoring +++ b/retiolum/hosts/monitoring @@ -1,5 +1,5 @@ Subnet = 42:82cb:f60c:6f27:611a:42f8:906c:2c70/128 -Subnet = 42.160.97.250/32 +Subnet = 10.243.97.250/32 -----BEGIN RSA PUBLIC KEY----- MIGJAoGBAMjS8WxgbfJKVGRIFD0Bv+odQ7THNWDIcr1p4riVbOUPxtce+abasYGl DOwaejcHP5bF11EAOOvdEtrivZReIZqYbMz5oWHLO6GCJn7nOCZVCW4LnUuNP3u8 diff --git a/retiolum/scripts/adv_graphgen/all_the_graphs.sh b/retiolum/scripts/adv_graphgen/all_the_graphs.sh index 1640a446..5533c722 100755 --- a/retiolum/scripts/adv_graphgen/all_the_graphs.sh +++ b/retiolum/scripts/adv_graphgen/all_the_graphs.sh @@ -6,9 +6,10 @@ PATH=$PATH:../../../util/bin/ export LOG_FILE=/var/log/retiolum.log begin=`timer` + export GRAPHITE_HOST="no_omo" (./anonytize.sh /srv/http/pub/graphs/retiolum/ && echo "`date` anonytize done" >> /tmp/build_graph)& (./sanitize.sh /srv/http/priv/graphs/retiolum/ && echo "`date` sanitize done" >> /tmp/build_graph)& # wait -# graphitec "retiolum.graph.buildtime" "$(timer $begin)" >> /tmp/build_graph + graphitec "retiolum.graph.buildtime" "$(timer $begin)" >> /tmp/build_graph echo "`date` end all graphs" >> /tmp/build_graph )& diff --git a/retiolum/scripts/adv_graphgen/parse_tinc_anon.py b/retiolum/scripts/adv_graphgen/parse_tinc_anon.py index c603d398..e0bea913 100755 --- a/retiolum/scripts/adv_graphgen/parse_tinc_anon.py +++ b/retiolum/scripts/adv_graphgen/parse_tinc_anon.py @@ -6,11 +6,13 @@ import sys,json try: import socket from time import time - host = "localhost" + import os + host = os.environ.get("GRAPHITE_HOST","localhost") port = 2003 - g_path = "retiolum" + g_path = os.environ.get("GRAPHITE_PATH","retiolum") begin = time() s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sys.stderr.write("connecting to %s:%d"%(host,port)) s.connect((host,port)) except Exception as e: print >>sys.stderr, "Cannot connect to graphite: " + str(e) @@ -146,7 +148,7 @@ nodes = delete_unused_nodes(nodes) write_digraph(nodes) try: end = time() - msg = '%s.graph.anon_build_time %d %d\n' % (g_path,((end-begin)*1000),end) + msg = '%s.graph.anon_build_time %d %d\r\n' % (g_path,((end-begin)*1000),end) s.send(msg) s.close() except Exception as e: print >>sys.stderr, e diff --git a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py index a255a918..16f4f795 100755 --- a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py +++ b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py @@ -5,14 +5,16 @@ import sys,json try: from time import time import socket - host = "localhost" + import os + host = os.environ.get("GRAPHITE_HOST","localhost") port = 2003 - g_path = "retiolum" + g_path = os.environ.get("GRAPHITE_PATH","retiolum") begin = time() s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sys.stderr.write("connecting to %s:%d"%(host,port)) s.connect((host,port)) except Exception as e: - print >>sys.stderr, "Cannot connect to graphite: " + str(e) + sys.stderr.write("Cannot connect to graphite: %s\n" % str(e)) supernodes= [ "kaah","supernode","euer","pa_sharepoint","oxberg" ] """ TODO: Refactoring needed to pull the edges out of the node structures again, @@ -49,7 +51,7 @@ def write_stat_node(nodes): num_conns = 0 num_nodes = len(nodes) try: - msg = '%s.num_nodes %d %d\n' %(g_path,num_nodes,begin) + msg = '%s.num_nodes %d %d\r\n' %(g_path,num_nodes,begin) s.send(msg) #print >>sys.stderr, msg except Exception as e: print sys.stderr,e @@ -204,8 +206,8 @@ write_digraph(nodes) try: end = time() - msg = '%s.graph.detail_build_time %d %d\n' % (g_path,((end-begin)*1000),end) + msg = '%s.graph.detail_build_time %d %d\r\n' % (g_path,((end-begin)*1000),end) s.send(msg) - print >>sys.stderr,msg + sys.stderr.write(msg) s.close() -except Exception as e: print >>sys.stderr, e +except Exception as e: sys.stderr.write( str(e) + "\n") |