From a79e3166c49191ebb601cfe8f6342e2350508718 Mon Sep 17 00:00:00 2001 From: zet Date: Wed, 4 Sep 2024 16:44:41 +0200 Subject: [PATCH] Implemented: The powerstate poweredOff of a single virtual host is now CRITICAL (#211) --- HISTORY | 5 ++++- modules/vm_runtime_info.pm | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 02a24e7..74ce8bd 100644 --- a/HISTORY +++ b/HISTORY @@ -1333,7 +1333,7 @@ was done - Remove output of guestToolsUnmanaged if --open_vm_tools_ok - Fully ignore unknown states for hardware -- 04 Auf 2022 M.Fuerstenau version 1.2.5 +- 04 Aug 2022 M.Fuerstenau version 1.2.5 - Renamed module host_list_vm_volumes_info to host_volumes_info because name was misleading - Minor corrections in help.pm @@ -1343,3 +1343,6 @@ was done and check is with lowercase (MYSERVER vs. myserver). So for example checking for snapshots may result in no old snapshots found while there are some. Fixed by adding option --ignore_casesensitive. + +- 04 Sep 2024 ccztux version 1.2.6 + - The powerstate poweredOff of a single virtual host is now CRITICAL diff --git a/modules/vm_runtime_info.pm b/modules/vm_runtime_info.pm index c818048..036eaf2 100644 --- a/modules/vm_runtime_info.pm +++ b/modules/vm_runtime_info.pm @@ -71,6 +71,10 @@ sub vm_runtime_info else { $output = "Power state: " . $runtime->powerState->val; + if ($runtime->powerState->val eq "poweredOff") + { + $state = 2; + } } $state = check_state($state, $actual_state); }