mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-28 07:43:55 +01:00
Zabbix: leave out the NVIDIA agent2 plugin that breaks the all-plugins install (#18262)
This commit is contained in:
committed by
GitHub
parent
55dec1b1b8
commit
4b22056eb9
@@ -83,23 +83,20 @@ msg_ok "Selected $AGENT_PKG"
|
|||||||
if [ "$AGENT_PKG" = "zabbix-agent2" ]; then
|
if [ "$AGENT_PKG" = "zabbix-agent2" ]; then
|
||||||
echo "Choose plugins for Zabbix Agent2:"
|
echo "Choose plugins for Zabbix Agent2:"
|
||||||
echo "1) PostgreSQL only (default, recommended)"
|
echo "1) PostgreSQL only (default, recommended)"
|
||||||
echo "2) All plugins (may cause issues)"
|
echo "2) All plugins except NVIDIA GPU (may cause issues)"
|
||||||
PLUGIN_CHOICE="${var_zabbix_plugins:-}"
|
PLUGIN_CHOICE="${var_zabbix_plugins:-}"
|
||||||
[[ -n "$PLUGIN_CHOICE" ]] || read -rp "Choose option [1-2]: " PLUGIN_CHOICE || true
|
[[ -n "$PLUGIN_CHOICE" ]] || read -rp "Choose option [1-2]: " PLUGIN_CHOICE || true
|
||||||
|
|
||||||
case "$PLUGIN_CHOICE" in
|
case "$PLUGIN_CHOICE" in
|
||||||
2)
|
2)
|
||||||
$STD apt install -y zabbix-agent2 zabbix-agent2-plugin-*
|
# The NVIDIA plugin fails the agent's config test without NVML, which aborts the package install
|
||||||
|
mapfile -t AGENT2_PLUGINS < <(apt-cache search --names-only '^zabbix-agent2-plugin-' | awk '{print $1}' | grep -v nvidia)
|
||||||
|
$STD apt install -y zabbix-agent2 "${AGENT2_PLUGINS[@]}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
$STD apt install -y zabbix-agent2 zabbix-agent2-plugin-postgresql
|
$STD apt install -y zabbix-agent2 zabbix-agent2-plugin-postgresql
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -f /etc/zabbix/zabbix_agent2.d/plugins.d/nvidia.conf ]; then
|
|
||||||
sed -i 's|^Plugins.NVIDIA.System.Path=.*|# Plugins.NVIDIA.System.Path=/usr/libexec/zabbix/zabbix-agent2-plugin-nvidia-gpu|' \
|
|
||||||
/etc/zabbix/zabbix_agent2.d/plugins.d/nvidia.conf
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
$STD apt install -y zabbix-agent
|
$STD apt install -y zabbix-agent
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user