X-Git-Url: https://iankelling.org/git/?p=buildscripts;a=blobdiff_plain;f=prometheus;fp=prometheus;h=0000000000000000000000000000000000000000;hp=e7e3233361b05e6b13338c7b42817d79f7e9e396;hb=f898fa23c5a5f455bf300fb48e57641e290334fb;hpb=6aee7dbe350924175b21afe367ca37ddbc23c2f2 diff --git a/prometheus b/prometheus deleted file mode 100755 index e7e3233..0000000 --- a/prometheus +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -# I initially was using these -# https://github.com/cloudalchemy/ansible-prometheus -# https://github.com/cloudalchemy/ansible-alertmanager -# https://github.com/cloudalchemy/ansible-node-exporter -# https://github.com/cloudalchemy/ansible-grafana - -# As of trisquel 11, get upstream prom because it has the react ui, -# which has localtime, and general better usability. alertmanager, -# changelog seems to show good changes and surely things will just work -# better with a matching prometheus. - -if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi - -#rsync --delete consoles console_libraries /etc/prometheus - - -while read -r prog tool; do - cd /a/opt/${prog}dl - url=$(curl -s https://api.github.com/repos/prometheus/$prog/releases/latest | jq -r '.assets[].browser_download_url | match(".*linux-amd64.tar.gz$").string') - f=${url##*/} - if [[ -e $f ]]; then - timestamp=$(stat -c %Y $f) - else - timestamp=0 - fi - m wget -nv -N $url - new_timestamp=$(stat -c %Y $f) - if [[ $timestamp != $new_timestamp || ! -e /usr/local/bin/$prog ]]; then - ngset - to_rm=( !($f) ) - ngreset - if (( ${#to_rm[@]} )); then - rm -rf ${to_rm[@]} - fi - m ex $f - dir=${f%.tar.gz} - m sudo install $dir/$prog $dir/$tool /usr/local/bin - m sudo systemctl restart $prog - fi -done <<'EOF' -prometheus promtool -alertmanager amtool -EOF