diff options
author | makefu <github@syntax-fehler.de> | 2013-01-07 09:17:14 +0700 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-01-07 09:17:14 +0700 |
commit | d907a7aa781caac2a3086535f5ce997131170ca2 (patch) | |
tree | 3738bf31cd567dada4665bc46010de3e26fdc24e /retiolum/scripts/adv_graphgen/parse_tinc_stats.py | |
parent | 9a5edaac48e2461aa247204fbcea37d805bf38f0 (diff) | |
parent | 29d8a4e5061d66d0dfeda28a9012992c12a83ccd (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'retiolum/scripts/adv_graphgen/parse_tinc_stats.py')
-rwxr-xr-x | retiolum/scripts/adv_graphgen/parse_tinc_stats.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py index 8371ad3d..03a20214 100755 --- a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py +++ b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py @@ -18,12 +18,12 @@ except Exception as e: sys.stderr.write("Cannot connect to graphite: %s\n" % str(e)) supernodes= [ ] -#supernodes= [ "kaah","supernode","euer","pa_sharepoint","oxberg" ] for supernode,addr in check_super(): supernodes.append(supernode) """ TODO: Refactoring needed to pull the edges out of the node structures again, it should be easier to handle both structures""" DUMP_FILE = "/krebs/db/availability" + def write_digraph(nodes): """ writes the complete digraph in dot format @@ -173,6 +173,9 @@ def write_node(k,v): node +="\"" if k in supernodes: node += ",fillcolor=steelblue1" + # warning if node only has one connection + elif v['num_conns'] == 1: + node += ",fillcolor=red" #node +=",group=\""+v['external-ip'].replace(".","")+"\"" node += "]" print node |