summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--retiolum/hosts/machine11
-rwxr-xr-xretiolum/scripts/adv_graphgen/anonytize.sh3
-rwxr-xr-xretiolum/scripts/adv_graphgen/parse_tinc_anon.py2
-rwxr-xr-xretiolum/scripts/adv_graphgen/parse_tinc_stats.py6
-rwxr-xr-xretiolum/scripts/adv_graphgen/sanitize.sh2
-rw-r--r--retiolum/scripts/github_listener/github_listener.conf1
-rwxr-xr-xretiolum/scripts/github_listener/handle_request7
7 files changed, 26 insertions, 6 deletions
diff --git a/retiolum/hosts/machine b/retiolum/hosts/machine
new file mode 100644
index 00000000..4927fc84
--- /dev/null
+++ b/retiolum/hosts/machine
@@ -0,0 +1,11 @@
+Subnet = 10.243.60.31
+Subnet = 42:698d:4e02:4d70:b080:acdd:513d:70aa
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAvkLboZ6wRALd++ntUXfyzCT9G1pWSJNJhrdut8dPfz/+IIbx4thz
+tbq5apWQRaHj6IILMiQqpfUkhbfz3WS2YP62f8nAzKLKB0zzRAJ1lQjoZOXQseQJ
+Ydyf9dEDhRtnSnOwsmSDEch/2KhgCj+fdMcnbcoAg3PYJGzsz2ykEtoh80Rv1IQa
+tW285CP2GooRp1gwy3WKL6at/uW6D4/tTIimHML5JbLKj7mH+3nOyrhRGyZP1b9s
+XtdkePuaQKrIjmv4rEIYx2taFmmQp7XpC2m4Vdoy7WdIzR3WTgWo546IOygY1KIW
+fDOH+3UoG5oI6y4hNNa7+NH8DpmdtzXYnQIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/retiolum/scripts/adv_graphgen/anonytize.sh b/retiolum/scripts/adv_graphgen/anonytize.sh
index 2e2045e4..4aad6993 100755
--- a/retiolum/scripts/adv_graphgen/anonytize.sh
+++ b/retiolum/scripts/adv_graphgen/anonytize.sh
@@ -10,7 +10,7 @@ TYPE=svg
TYPE2=png
OPENER=/bin/true
DOTFILE=`mktemp --suffix=anon`
-trap 'rm $DOTFILE' INT TERM KILL
+trap 'rm $DOTFILE' INT TERM KILL EXIT
sudo -E python tinc_stats2json |\
python parse_tinc_anon.py> $DOTFILE
@@ -28,4 +28,3 @@ convert $1/retiolum_1.$TYPE $1/retiolum_1.$TYPE2
#convert -resize 20% $1/retiolum_2.$TYPE $1/retiolum_2.$TYPE2
#convert -resize 20% $1/retiolum_3.$TYPE $1/retiolum_3.$TYPE2
#convert -resize 20% $1/retiolum_4.$TYPE $1/retiolum_4.$TYPE2
-rm $DOTFILE
diff --git a/retiolum/scripts/adv_graphgen/parse_tinc_anon.py b/retiolum/scripts/adv_graphgen/parse_tinc_anon.py
index 21c36e0f..82ee2f2e 100755
--- a/retiolum/scripts/adv_graphgen/parse_tinc_anon.py
+++ b/retiolum/scripts/adv_graphgen/parse_tinc_anon.py
@@ -52,11 +52,13 @@ def write_stat_node(nodes):
''' Write a `stats` node in the corner
This node contains infos about the current number of active nodes and connections inside the network
'''
+ from time import localtime,strftime
num_conns = 0
num_nodes = len(nodes)
for k,v in nodes.iteritems():
num_conns+= len(v['to'])
node_text = " stats_node [shape=box,label=\"Statistics\\l"
+ node_text += "Build Date : %s\\l" % strftime("%Y-%m-%d %H:%M:%S",localtime())
node_text += "Active Nodes: %s\\l" % num_nodes
node_text += "Connections : %s\\l" % num_conns
node_text += "\""
diff --git a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py
index e5bd96a8..e6a67e2c 100755
--- a/retiolum/scripts/adv_graphgen/parse_tinc_stats.py
+++ b/retiolum/scripts/adv_graphgen/parse_tinc_stats.py
@@ -54,6 +54,7 @@ def write_stat_node(nodes):
''' Write a `stats` node in the corner
This node contains infos about the current number of active nodes and connections inside the network
'''
+ from time import localtime,strftime
num_conns = 0
num_nodes = len(nodes)
try:
@@ -64,6 +65,7 @@ def write_stat_node(nodes):
for k,v in nodes.iteritems():
num_conns+= len(v['to'])
node_text = " stats_node [label=\"Statistics\\l"
+ node_text += "Build Date : %s\\l" % strftime("%Y-%m-%d %H:%M:%S",localtime())
node_text += "Active Nodes: %s\\l" % num_nodes
node_text += "Connections : %s\\l" % num_conns
node_text += "\""
@@ -172,8 +174,8 @@ def write_node(k,v):
if v.has_key('num_conns'):
node += "Num Connects:"+str(v['num_conns'])+"\\l"
node += "external:"+v['external-ip']+":"+v['external-port']+"\\l"
- for addr in v.get('internal-ip',['¯\\\\(°_o)/¯']):
- node += "internal:"+addr+"\\l"
+ for addr in v.get('internal-ip',['dunno lol']): #['¯\\\\(°_o)/¯']):
+ node += "internal:%s\\l"%addr
node +="\""
# warning if node only has one connection
diff --git a/retiolum/scripts/adv_graphgen/sanitize.sh b/retiolum/scripts/adv_graphgen/sanitize.sh
index 846cc549..c8071dc3 100755
--- a/retiolum/scripts/adv_graphgen/sanitize.sh
+++ b/retiolum/scripts/adv_graphgen/sanitize.sh
@@ -10,7 +10,7 @@ TYPE=svg
TYPE2=png
OPENER=/bin/true
DOTFILE=`mktemp --suffix=san`
-trap 'rm $DOTFILE' INT TERM KILL
+trap 'rm $DOTFILE' INT TERM KILL EXIT
sudo -E python tinc_stats2json |\
python parse_tinc_stats.py > $DOTFILE
diff --git a/retiolum/scripts/github_listener/github_listener.conf b/retiolum/scripts/github_listener/github_listener.conf
index c4f0a8b6..3ab07a21 100644
--- a/retiolum/scripts/github_listener/github_listener.conf
+++ b/retiolum/scripts/github_listener/github_listener.conf
@@ -3,3 +3,4 @@ command=nc -lvv -p 5432 -c "./handle_request /opt/github_listener/retiolum/hosts
user=tinc
directory=/krebs/retiolum/scripts/github_listener/
autorestart=true
+environment=GRAPHITE_HOST=no_omo
diff --git a/retiolum/scripts/github_listener/handle_request b/retiolum/scripts/github_listener/handle_request
index 5b42524a..211ca776 100755
--- a/retiolum/scripts/github_listener/handle_request
+++ b/retiolum/scripts/github_listener/handle_request
@@ -2,11 +2,15 @@
# Possible Shell Vars
# WEBDIR
# HOSTFOLDER
+
set -euf
+export GRAPHITE_HOST=${GRAPHITE_HOST:-no_omo}
+PATH=$PATH:../../../util/bin
if [ "x${2:-}" = x ];then
echo "usage: $0 HOSTDIRECTORY WEBDIRECTORY"
exit 1
fi
+NOW=$(timer)
export HOSTDIR=${1:-../../hosts}
WEBDIR=${2:-/var/www/euer.krebsco.de/retiolum/}
echo "sorry for keeping you waiting, please be patient"
@@ -20,4 +24,5 @@ cd - >&2
../../bin/create-supernode-tar $WEBDIR
echo "almost done..."
../../bin/create-host-tar $WEBDIR
-echo "Thank you for your patience!"
+echo "Thank you for your patience! I stole $(timer $NOW)ms of your time, sorry about that."
+graphitec 'retiolum.pack.build_time' $(timer $NOW)