mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-11 10:19:16 +00:00
Compare commits
13 Commits
4f85604b12
...
7b2f07172a
Author | SHA1 | Date | |
---|---|---|---|
|
7b2f07172a | ||
|
645972077e | ||
|
24dfa9590e | ||
|
94d465cf92 | ||
|
eac423cea9 | ||
|
88846c6df1 | ||
|
8fb1fe5db0 | ||
|
0fd95c67d1 | ||
|
fdc09aca1f | ||
|
4c894d24c0 | ||
|
90ea9cc0ab | ||
|
a6f450ceae | ||
|
8645c8e788 |
@ -9,7 +9,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m
|
|||||||
APP="Homarr"
|
APP="Homarr"
|
||||||
var_tags="arr;dashboard"
|
var_tags="arr;dashboard"
|
||||||
var_cpu="2"
|
var_cpu="2"
|
||||||
var_ram="2048"
|
var_ram="4096"
|
||||||
var_disk="8"
|
var_disk="8"
|
||||||
var_os="debian"
|
var_os="debian"
|
||||||
var_version="12"
|
var_version="12"
|
||||||
|
57
ct/prometheus-pve-exporter.sh
Normal file
57
ct/prometheus-pve-exporter.sh
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#!/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-Proxmox-VE-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 &>/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}"
|
70
install/prometheus-pve-exporter-install.sh
Normal file
70
install/prometheus-pve-exporter-install.sh
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
mc
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setup Python3"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
python3 \
|
||||||
|
python3-pip
|
||||||
|
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||||
|
msg_ok "Setup Python3"
|
||||||
|
|
||||||
|
msg_info "Installing Prometheus Proxmox VE Exporter"
|
||||||
|
python3 -m pip install --quiet prometheus-pve-exporter
|
||||||
|
mkdir -p /opt/prometheus-pve-exporter
|
||||||
|
cat <<EOF > /opt/prometheus-pve-exporter/pve.yml
|
||||||
|
default:
|
||||||
|
user: prometheus@pve
|
||||||
|
password: sEcr3T!
|
||||||
|
verify_ssl: false
|
||||||
|
EOF
|
||||||
|
msg_ok "Installed Prometheus Proxmox VE Exporter"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/prometheus-pve-exporter.service
|
||||||
|
[Unit]
|
||||||
|
Description=Prometheus Proxmox VE Exporter
|
||||||
|
Documentation=https://github.com/znerol/prometheus-pve-exporter
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
Restart=always
|
||||||
|
Type=simple
|
||||||
|
ExecStart=pve_exporter \
|
||||||
|
--config.file=/opt/prometheus-pve-exporter/pve.yml \
|
||||||
|
--web.listen-address=0.0.0.0:9221
|
||||||
|
ExecReload=/bin/kill -HUP \$MAINPID
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl enable -q --now prometheus-pve-exporter
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
@ -19,7 +19,7 @@
|
|||||||
"script": "ct/homarr.sh",
|
"script": "ct/homarr.sh",
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": 2,
|
"cpu": 2,
|
||||||
"ram": 2048,
|
"ram": 4096,
|
||||||
"hdd": 8,
|
"hdd": 8,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "12"
|
"version": "12"
|
||||||
|
40
json/prometheus-pve-exporter.json
Normal file
40
json/prometheus-pve-exporter.json
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"name": "Prometheus Proxmox VE Exporter",
|
||||||
|
"slug": "prometheus-proxmox-ve-exporter",
|
||||||
|
"categories": [
|
||||||
|
1,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
"date_created": "2025-01-28",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 9221,
|
||||||
|
"documentation": "https://github.com/prometheus-pve/prometheus-pve-exporter",
|
||||||
|
"website": "https://github.com/prometheus-pve/prometheus-pve-exporter",
|
||||||
|
"logo": "https://raw.githubusercontent.com/home-assistant/brands/master/core_integrations/proxmoxve/icon.png",
|
||||||
|
"description": "An exporter that exposes information gathered from Proxmox VE node for use by the Prometheus monitoring system.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/prometheus-pve-exporter.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 1,
|
||||||
|
"ram": 1024,
|
||||||
|
"hdd": 2,
|
||||||
|
"os": "debian",
|
||||||
|
"version": "12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "Please adjust the Proxmox credentials in the configuration file: /opt/prometheus-pve-exporter/pve.yml",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user