e7e3233361b05e6b13338c7b42817d79f7e9e396
3 # I initially was using these
4 # https://github.com/cloudalchemy/ansible-prometheus
5 # https://github.com/cloudalchemy/ansible-alertmanager
6 # https://github.com/cloudalchemy/ansible-node-exporter
7 # https://github.com/cloudalchemy/ansible-grafana
9 # As of trisquel 11, get upstream prom because it has the react ui,
10 # which has localtime, and general better usability. alertmanager,
11 # changelog seems to show good changes and surely things will just work
12 # better with a matching prometheus.
14 if [[ -s ~
/.bashrc
]];then . ~
/.bashrc
;fi
16 #rsync --delete consoles console_libraries /etc/prometheus
19 while read -r prog tool
; do
21 url
=$
(curl
-s https
://api.github.com
/repos
/prometheus
/$prog/releases
/latest | jq
-r '.assets[].browser_download_url | match(".*linux-amd64.tar.gz$").string')
24 timestamp
=$
(stat
-c %Y
$f)
29 new_timestamp
=$
(stat
-c %Y
$f)
30 if [[ $timestamp != $new_timestamp ||
! -e /usr
/local
/bin
/$prog ]]; then
34 if (( ${#to_rm[@]} )); then
39 m sudo
install $dir/$prog $dir/$tool /usr
/local
/bin
40 m sudo systemctl restart
$prog