diff --git a/check_pve.py b/check_pve.py index 209cf6f..c9ed1a4 100755 --- a/check_pve.py +++ b/check_pve.py @@ -261,7 +261,7 @@ def check_vm_status(self, idx: Union[str, int], **kwargs: str) -> None: found = False for vm in data: - if idx == vm.get("name", vm.get("vmid", None)): + if idx in (vm.get("name", None), vm.get("vmid", None)): # Check if VM (default) or LXC vm_type = "VM" if vm["type"] == "lxc":