mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-02-01 17:31:49 +00:00
63e3619b68
* New Script: Prometheus Proxmox VE Exporter See https://github.com/prometheus-pve/prometheus-pve-exporter * Fix formatting of config file output after installation * Prometheus Proxmox VE Exporter: Set category 1 for Website * Removed blank lines * Remove `python3-dev`, as it was commented out * Prometheus Proxmox VE Exporter: Move configuration under /opt * Prometheus Proxmox VE Exporter: Add logo * Change `msg_info "Updating Python3"` to `msg_info "Setup Python3"` * Removed empty line * Add note about Proxmox credentials into the website * Temp: Replace GitHub URLs to test my fork * Set correct `APP="Prometheus-PVE-Exporter"` * Add `--root-user-action=ignore` to pip call (as root) * Revert "Temp: Replace GitHub URLs to test my fork" This reverts commit 2308d483763add499c49d874f8f35e3240f1c0f7.
57 lines
1.5 KiB
Bash
57 lines
1.5 KiB
Bash
#!/usr/bin/env bash
|
|
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
# Copyright (c) 2021-2025 community-scripts ORG
|
|
# Author: Andy Grunwald (andygrunwald)
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://github.com/prometheus-pve/prometheus-pve-exporter
|
|
|
|
# App Default Values
|
|
APP="Prometheus-PVE-Exporter"
|
|
var_tags="monitoring"
|
|
var_cpu="1"
|
|
var_ram="1024"
|
|
var_disk="2"
|
|
var_os="debian"
|
|
var_version="12"
|
|
var_unprivileged="1"
|
|
|
|
# App Output & Base Settings
|
|
header_info "$APP"
|
|
base_settings
|
|
|
|
# Core
|
|
variables
|
|
color
|
|
catch_errors
|
|
|
|
function update_script() {
|
|
header_info
|
|
check_container_storage
|
|
check_container_resources
|
|
if [[ ! -f /etc/systemd/system/prometheus-pve-exporter.service ]]; then
|
|
msg_error "No ${APP} Installation Found!"
|
|
exit
|
|
fi
|
|
msg_info "Stopping ${APP}"
|
|
systemctl stop prometheus-pve-exporter
|
|
msg_ok "Stopped ${APP}"
|
|
|
|
msg_info "Updating ${APP}"
|
|
pip install prometheus-pve-exporter --upgrade --root-user-action=ignore &>/dev/null
|
|
msg_ok "Updated ${APP}"
|
|
|
|
msg_info "Starting ${APP}"
|
|
systemctl start prometheus-pve-exporter
|
|
msg_ok "Started ${APP}"
|
|
msg_ok "Updated Successfully"
|
|
exit
|
|
}
|
|
|
|
start
|
|
build_container
|
|
description
|
|
|
|
msg_ok "Completed Successfully!\n"
|
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9221${CL}" |