usr/lib/observium_agent/scripts-available/proxmox-qemu hinzugefügt
Ursprüngliche Version des Skriptes
This commit is contained in:
18
usr/lib/observium_agent/scripts-available/proxmox-qemu
Normal file
18
usr/lib/observium_agent/scripts-available/proxmox-qemu
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Proxmox VE virtual machine listing
|
||||||
|
# (c) 2015-2019, Tom Laermans for Observium
|
||||||
|
|
||||||
|
PVESH=`which pvesh`
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "<<<proxmox-qemu>>>"
|
||||||
|
|
||||||
|
VERSION=$(pveversion | awk -F/ '{print $2}' | sed 's/\..*//')
|
||||||
|
if [[ ${VERSION} -ge 5 ]]
|
||||||
|
then
|
||||||
|
pvesh get /nodes/$(hostname)/qemu --output-format=json-pretty 2>/dev/null
|
||||||
|
else
|
||||||
|
pvesh get /nodes/$(hostname)/qemu 2>/dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user