--- vmPingMonitor 2016-01-21 07:42:38.390934660 +0100 +++ vmPingMonitor 2016-01-28 07:16:59.959778184 +0100 @@ -58,6 +58,12 @@ try: logging.debug('Getting VM \"%s\" Status.' % (LIST_VM_NAME)) VM_STATUS = VM.get_status().get_state() + if VM_STATUS == None or VM_STATUS == "": + sendAlertNotification("Error: Required variable \"VM_STATUS\" is empty!") + exit(1) + else: + if VM_STATUS != 'up': + StartVM(LIST_VM_NAME) except Exception as e: sendAlertNotification("Exception in getting VM \"%s\" Status:\n%s" % (LIST_VM_NAME,e)) exit(1)