aboutsummaryrefslogtreecommitdiffstats
path: root/clients/fetch-cubemap-munin.sh
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-03-27 08:27:17 +0200
committerKristian Lyngstol <kristian@bohemians.org>2016-03-27 08:27:17 +0200
commit1d2470a411e5eaac7e5a1c5d5b6b81e92c92f4a8 (patch)
tree54b901757b088d54d33e70f28a6203383b4dc844 /clients/fetch-cubemap-munin.sh
parent0a230ac5481b9518abc64181dbbb4509d83c0b89 (diff)
parent96a9bb4c42f4b53020302fea2a46e734c61c0319 (diff)
Merge branch 'master' of github.com:tech-server/tgmanage
Diffstat (limited to 'clients/fetch-cubemap-munin.sh')
-rwxr-xr-xclients/fetch-cubemap-munin.sh17
1 files changed, 12 insertions, 5 deletions
diff --git a/clients/fetch-cubemap-munin.sh b/clients/fetch-cubemap-munin.sh
index 2beb8bc..0cc62e2 100755
--- a/clients/fetch-cubemap-munin.sh
+++ b/clients/fetch-cubemap-munin.sh
@@ -1,10 +1,17 @@
#!/bin/bash
-#cp -p "/var/cache/munin/www/tg15.gathering.org/seamus.tg15.gathering.org/cubemap-day.png" "/root/tgmanage/examples/tg15/streamstats/cubemap_seamus_-`date +%Y%m%d_%H%M`.png"
-#cp -p "/var/cache/munin/www/tg15.gathering.org/maggie.tg15.gathering.org/cubemap-day.png" "/root/tgmanage/examples/tg15/streamstats/cubemap_maggie_-`date +%Y%m%d_%H%M`.png"
+tgyear="tg16"
+reflector1="finn"
+reflector2="rey"
-epoch_to=`date +%s`
+if [ $# -eq 0 ]; then
+ epoch_to=`date +%s`
+ epoch_date="`date +%Y%m%d-%H%M`"
+else
+ epoch_to=`date --date "$1" +%s`
+ epoch_date="`date --date \"$1\" +%Y%m%d-%H%M`"
+fi
let "epoch_from = epoch_to - (60 * 60 * 24)"
-wget -qO"/root/tgmanage/examples/tg15/streamstats/cubemap_maggie_detailed-`date +%Y%m%d-%H%M`.png" "http://munin.tg15.gathering.org/munin-cgi/munin-cgi-graph/tg15.gathering.org/maggie.tg15.gathering.org/cubemap-pinpoint=$epoch_from,$epoch_to.png?&lower_limit=&upper_limit=&size_x=1280&size_y=720"
-wget -qO"/root/tgmanage/examples/tg15/streamstats/cubemap_seamus_detailed-`date +%Y%m%d-%H%M`.png" "http://munin.tg15.gathering.org/munin-cgi/munin-cgi-graph/tg15.gathering.org/seamus.tg15.gathering.org/cubemap-pinpoint=$epoch_from,$epoch_to.png?&lower_limit=&upper_limit=&size_x=1280&size_y=720"
+wget -qO"/root/tgmanage/examples/$tgyear/streams/streamstats/cubemap_${reflector1}_detailed-$epoch_date.png" "http://munin.$tgyear.gathering.org/munin-cgi/munin-cgi-graph/$tgyear.gathering.org/${reflector1}.$tgyear.gathering.org/cubemap-pinpoint=$epoch_from,$epoch_to.png?&lower_limit=&upper_limit=&size_x=1280&size_y=720"
+wget -qO"/root/tgmanage/examples/$tgyear/streams/streamstats/cubemap_${reflector2}_detailed-$epoch_date.png" "http://munin.$tgyear.gathering.org/munin-cgi/munin-cgi-graph/$tgyear.gathering.org/${reflector2}.$tgyear.gathering.org/cubemap-pinpoint=$epoch_from,$epoch_to.png?&lower_limit=&upper_limit=&size_x=1280&size_y=720"