I have a trigger on my 2 UPS devices that monitors if power is lost for 30 seconds.
I have an item called 'VM's active' on my 2 Hyper-V hosts that reflects if it is running VM's. (only 1 at a time is)
Action: if power is lost for 30s on both UPS devices, send Pushover message and execute 'shutdown non-critical servers'.
Now what i want is to conditionally execute a shutdown script based on the 'VM's active' item value. If VS1 is not running VM's shut it down, if VS2 is not running VM's shut it down.
But it can't use an item value in a Trigger action condition. How can i achieve what i want?
I have an item called 'VM's active' on my 2 Hyper-V hosts that reflects if it is running VM's. (only 1 at a time is)
Action: if power is lost for 30s on both UPS devices, send Pushover message and execute 'shutdown non-critical servers'.
Now what i want is to conditionally execute a shutdown script based on the 'VM's active' item value. If VS1 is not running VM's shut it down, if VS2 is not running VM's shut it down.
But it can't use an item value in a Trigger action condition. How can i achieve what i want?
)which is triggered when there are no running VM's and then you could use that trigger in your action.
Comment