summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts
diff options
context:
space:
mode:
authormakefu <root@pigstarter.de>2013-04-03 10:11:16 -0400
committermakefu <root@pigstarter.de>2013-04-03 10:11:23 -0400
commit5a6a263564129d4c441938ef35e9c6c6da60b20e (patch)
treebddee32a9dbc0b754eef92f458cd958e6bc42e78 /retiolum/scripts
parent2ac79fe340b28b10d37bb2f9c0c846fc82653a81 (diff)
add graphite stats support
Diffstat (limited to 'retiolum/scripts')
-rw-r--r--retiolum/scripts/github_listener/github_listener.conf1
-rwxr-xr-xretiolum/scripts/github_listener/handle_request7
2 files changed, 7 insertions, 1 deletions
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)