icinga2-diagnostics
icinga2-diagnostics copied to clipboard
Rebuild Hypervisor detection
Change to a more elegant way than lots of nested if's.
The problem is Xen's two line output, otherwise a simple case would be sufficient
As there is no Hyper-V in the Hypervisor detection yet, here is what the output looks like (tested on Ubuntu 14.04 and 16.04
sudo virt-what
hyperv
If I am not mistaken the script part would look like:
elif [ "$(echo ${VIRT} | awk '{print $1}')" = "hyperv" ]
then
VIRTUAL=true
HYPERVISOR="Hyper-V"