If an azure VM is idle for 30 minutes I need to shut it down. By idle I mean CPU percent is less than 30%. How can I achieve this?
I have tried with run books default functions but it has shutdown and start but not with idle time.
If an azure VM is idle for 30 minutes I need to shut it down. By idle I mean CPU percent is less than 30%. How can I achieve this?
I have tried with run books default functions but it has shutdown and start but not with idle time.
Copyright © 2021 Jogjafile Inc.
Try this by Powershell , you can run this command as a scheduled job based on your requirement :
Sometimes you cannot get last 2 or 3 mins cpu Metrics data as there will be some latency.