Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Sam Heinz
2024-09-04 14:08:25 +10:00
12 changed files with 156 additions and 26 deletions
+4 -3
View File
@@ -25,12 +25,13 @@ msg_info "Installing Prometheus"
RELEASE=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
mkdir -p /etc/prometheus
mkdir -p /var/lib/prometheus
$STD wget https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-arm64.tar.gz
$STD tar -xvf prometheus-${RELEASE}.linux-arm64.tar.gz
wget -q https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-arm64.tar.gz
tar -xf prometheus-${RELEASE}.linux-arm64.tar.gz
cd prometheus-${RELEASE}.linux-arm64
mv prometheus promtool /usr/local/bin/
mv consoles/ console_libraries/ /etc/prometheus/
mv prometheus.yml /etc/prometheus/prometheus.yml
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Prometheus"
msg_info "Creating Service"
@@ -53,7 +54,7 @@ ExecStart=/usr/local/bin/prometheus \
[Install]
WantedBy=multi-user.target" >$service_path
$STD sudo systemctl enable --now prometheus
systemctl enable -q --now prometheus
msg_ok "Created Service"
motd_ssh