We would like to identify idle time for our virtual machine / app services so that we can turn them off. Does PowerShell allows to identify idle time value for VMs/ app services on the azure environment? Thanks in advance
1
votes
1 Answers
0
votes
Default idle timeout is 4 minutes. You can set it manually to a value between 4-30 minutes with Powershell. Examples below.
Setting idle timeout for a service: Set-AzureLoadBalancedEndpoint -ServiceName "service" -LBSetName "lbset" -Protocol tcp -LocalPort 80 -ProbeProtocolTCP -ProbePort 8080 -IdleTimeoutInMinutes 30
Setting idle timeout for an endpoint on a VM: Get-AzureVM -ServiceName "service" -Name "VMname" | Add-AzureEndpoint -Name "HttpIn" -Protocol "tcp" -PublicPort 80 -LocalPort 8080 -IdleTimeoutInMinutes 30| Update-AzureVM
Getting idle timeout configuration: Get-AzureVM –ServiceName “service” –Name “VMname” | Get-AzureEndpoint