<div dir="auto">I've plugged this into our monitoring.<div dir="auto"><br></div><div dir="auto">When the UPS' are at 50%, it puts the general cluster into global maintenance & then triggers a shutdown action on all of the VMs in the cluster's service group via the monitoring agent (you could use an SNMP trap if you use agentless monitoring). Once all of the VMs are down, it then continues with the hosts.</div><div dir="auto"><br></div><div dir="auto">At 20%, it does the same with our "core" cluster.</div><div dir="auto"><br></div><div dir="auto">This method means that the HE can be shutdown, and it works whether the HE is up or not.</div><div dir="auto"><br></div><div dir="auto">For emergencies when the monitoring is offline, I've also hacked up a bash script which parses the output of vdsClient & uses a loop to send a shutdown signal to all of the VMs on each host.</div><div dir="auto"><br></div><div dir="auto">Doug</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 23 Apr 2018, 14:14 Simon Vincent, <<a href="mailto:sv@srvincent.co.uk">sv@srvincent.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Does anyone have a way of shutting down oVirt automatically in the case of a power outage?<div><br></div><div>Ideally I would like a script that can be automatically run when the UPS reaches a certain level. I had a look at the python SDK but I could only find functions for shutting down VMs and not hosts. Also I suspect this wont let me shutdown the hosted engine VM.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Regards</div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank" rel="noreferrer">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
</blockquote></div>