ProxmoxVED/install/prometheus-blackbox-exporter-install.sh
Marfnl b66a057065
Add Prometheus-Blackbox-Exporter script (#956)
* prometheus-blackbox-exporter

container maker for prometheus-blackbox-exporter

* Update prometheus-blackbox-exporter.sh builder source

Modifyed the builder to:
https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main

* prometheus-blackbox-exporter header

prometheus-blackbox-exporter header artwork

* add prometheus-blackbox-exporter-install

adding the prometheus blackbox exporter installer

* Adding prometheus-blackbox-exporter.json

adding the front end page for prometheus blackbox exporter

* Update ct/prometheus-blackbox-exporter.sh

Simplify the code using apt update.

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>

* Update install/prometheus-blackbox-exporter-install.sh

Format the code.

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>

* Update prometheus-blackbox-exporter.json

Updated the logo resource to use selfh

* Update prometheus-blackbox-exporter-install.sh

Optimized the code:
*double enable has been reduced
*systemctl daemon-reload removed not needed.

* Update prometheus-blackbox-exporter.sh

Removed all comments

* Update prometheus-blackbox-exporter-install.sh

Removed all comments

* Delete ct/headers/prometheus-blackbox-exporter.txt

Removed the header file.

* Update prometheus-blackbox-exporter-install.sh

* Update prometheus-blackbox-exporter.json

* Update prometheus-blackbox-exporter.sh

* Update prometheus-blackbox-exporter.sh

---------

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
2025-10-03 11:02:21 +02:00

43 lines
1019 B
Bash

#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Marfnl
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/prometheus/blackbox_exporter
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "blackbox-exporter" "prometheus/blackbox_exporter" "prebuild" "latest" "/opt/blackbox-exporter" "blackbox_exporter-*.linux-amd64.tar.gz"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/blackbox-exporter.service
[Unit]
Description=Blackbox Exporter Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/blackbox-exporter
ExecStart=/opt/blackbox-exporter/blackbox_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now blackbox-exporter
msg_ok "Service Created"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"