Get-AutoscaleHistory

Applies To: Azure PowerShell 1.0

Get-AutoscaleHistory

Gets the Autoscale history.

Syntax

Parameter Set: Default
Get-AutoscaleHistory [-Caller <String> ] [-DetailedOutput] [-EndTime <DateTime]> ] [-ResourceId <String> ] [-StartTime <DateTime]> ] [-Status <String> ] [ <CommonParameters>]

Detailed Description

The Get-AutoscaleHistory cmdlet gets a list of events related to an Autoscale setting.

Parameters

-Caller<String>

Specifies a filter by caller. The default value is an empty string, which indicates no filter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-DetailedOutput

Indicates that the output is detailed. The default value is $False, which indicates summarized output.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-EndTime<DateTime]>

Specifies the end time, as a DateTime object, of the query in local time. The default value is the current time.

You can use the Get-Date cmdlet to get a DateTime object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-ResourceId<String>

Specifies the resource ID with which the Autoscale setting is associated.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-StartTime<DateTime]>

Specifies the start time, as a DateTime object, of the query in local time. The default value is the current local time minus one hour.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Status<String>

Specifies a filter by status. The default value is an empty string, which specifies no filter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Get all Autoscale events associated with the current subscription

This command gets all of the Autoscale-related events associated with the current subscription.

PS C:\> Get-AutoscaleHistory -StartTime 2015-02-09T18:35:00 -EndTime 2015-02-09T18:40:00 -DetailedOutput

Example 2: Get the history of Autoscale events for a resource

This command gets the list of Autoscale-related events associated with a particular resource identified by a resource ID or URI.

PS C:\> Get-AutoscaleHistory -StartTime 2015-02-09T18:35:00 -EndTime 2015-02-09T18:40:00 -ResourceGroup "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/ResourceGroups/Contoso-Web-EastUS/providers/microsoft.insights/AutoscaleSettings/ContosoServerFarm-Contoso-Web-EastUS" -DetailedOutput

OUTPUT:
Authorization        :
Caller               : Microsoft.Insights/AutoscaleSettings
Claims               :
                       https://schemas.xmlsoap.org/ws/2005/05/identity/claims/spn: Microsoft.Insights/AutoscaleSettings
CorrelationId        : ac5b03ca-05d4-4811-9c27-0314a145f785
Description          : The autoscale engine attempting to scale resource '/subscriptions/a93fb07c-6c93-40be-bf3b-4f0deba10f4b/ResourceGroups/Contoso-Web-EastUS/providers/microsoft.web/ServerFarms/ContosoServerFarm'
                       from 1 instance to 2 instances.
EventChannels        : Admin, Operation
EventDataId          : c554f7ed-514c-449c-9338-13e15b4b56a3
EventName            : AutoscaleAction
EventSource          : microsoft.insights/AutoscaleSettings
EventTimestamp       : 2/10/2015 2:38:19 AM
HttpRequest          :
Id                   : /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/ResourceGroups/Contoso-Web-EastUS/providers/microsoft.insights/AutoscaleSettings/ContosoServerFarm-Contoso-Web-EastUS/events/c554f7ed-514c-4
                       49c-9338-13e15b4b56a3/ticks/635591326997519815
Level                : Informational
OperationId          : ac5b03ca-05d4-4811-9c27-0314a145f785
OperationName        : ScaleUp
Properties           :
                       Description    : The autoscale engine attempting to scale resource '/subscriptions/a93fb07c-6c93
                       -40be-bf3b-4f0deba10f4b/ResourceGroups/Contoso-Web-EastUS/providers/microsoft.web/ServerFarms/De
                       faultServerFarm' from 1 instance to 2 instances.
                       ResourceName   : /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/ResourceGroups/Contoso-Web-EastUS/providers/microsoft.web/ServerFarms/ContosoServerFarm
                       OldInstancesCount: 1
                       NewInstancesCount: 2
                       ActiveAutoscaleProfile: {
                         "Name": "No scheduled times",
                         "Capacity": {
                           "Minimum": "1",
                           "Maximum": "3",
                           "Default": "1"
                         },
                         "Rules": [
                           {
                             "MetricTrigger": {
                               "Name": "CpuPercentage",
                               "Namespace": "",
                               "Resource": "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/ResourceGroups/Contoso-
                       Web-EastUS/providers/microsoft.web/ServerFarms/ContosoServerFarm",
                               "ResourceLocation": "East US",
                               "TimeGrain": "PT1M",
                               "Statistic": "Average",
                               "TimeWindow": "PT45M",
                               "TimeAggregation": "Average",
                               "Operator": "GreaterThanOrEqual",
                               "Threshold": 14.0,
                               "Source": "WebsiteDedicated:EastUSWebSpace:ContosoServerFarm"
                             },
                             "ScaleAction": {
                               "Direction": "Increase",
                               "Type": "ChangeCount",
                               "Value": "1",
                               "Cooldown": "PT5M"
                             }
                           },
                           {
                             "MetricTrigger": {
                               "Name": "CpuPercentage",
                               "Namespace": "",
                               "Resource": "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/ResourceGroups/Contoso-
                       Web-EastUS/providers/microsoft.web/ServerFarms/ContosoServerFarm",
                               "ResourceLocation": "East US",
                               "TimeGrain": "PT1M",
                               "Statistic": "Average",
                               "TimeWindow": "PT45M",
                               "TimeAggregation": "Average",
                               "Operator": "LessThanOrEqual",
                               "Threshold": 4.0,
                               "Source": "WebsiteDedicated:EastUSWebSpace:ContosoServerFarm"
                             },
                             "ScaleAction": {
                               "Direction": "Decrease",
                               "Type": "ChangeCount",
                               "Value": "1",
                               "Cooldown": "PT2H"
                             }
                           },
                           {
                             "MetricTrigger": {
                               "Name": "BytesReceived",
                               "Namespace": "",
                               "Resource": "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/ResourceGroups/Contoso-
                       Web-EastUS/providers/microsoft.web/ServerFarms/ContosoServerFarm",
                               "ResourceLocation": "East US",
                               "TimeGrain": "PT1M",
                               "Statistic": "Average",
                               "TimeWindow": "PT10M",
                               "TimeAggregation": "Average",
                               "Operator": "LessThanOrEqual",
                               "Threshold": 50.0,
                               "Source": "WebsiteDedicated:EastUSWebSpace:ContosoServerFarm"
                             },
                             "ScaleAction": {
                               "Direction": "Decrease",
                               "Type": "ChangeCount",
                               "Value": "1",
                               "Cooldown": "PT10M"
                             }
                           },
                           {
                             "MetricTrigger": {
                               "Name": "BytesReceived",
                               "Namespace": "",
                               "Resource": "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/ResourceGroups/Contoso-
                       Web-EastUS/providers/microsoft.web/ServerFarms/ContosoServerFarm",
                               "ResourceLocation": "East US",
                               "TimeGrain": "PT1M",
                               "Statistic": "Average",
                               "TimeWindow": "PT5M",
                               "TimeAggregation": "Average",
                               "Operator": "GreaterThanOrEqual",
                               "Threshold": 100.0,
                               "Source": "WebsiteDedicated:EastUSWebSpace:ContosoServerFarm"
                             },
                             "ScaleAction": {
                               "Direction": "Increase",
                               "Type": "ChangeCount",
                               "Value": "1",
                               "Cooldown": "PT10M"
                             }
                           }
                         ]
                       }
ResourceGroupName    : Default-Web-EastUS
ResourceProviderName : microsoft.insights
ResourceId           : /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/ResourceGroups/Contoso-Web-EastUS/providers/microsoft.insights/AutoscaleSettings/ContosoServerFarm-Contoso-Web-EastUS
Status               : Succeeded
SubmissionTimestamp  : 2/10/2015 2:38:19 AM
SubscriptionId       : b93fb07a-6f93-30be-bf3e-4f0deca15f4f
SubStatus            : 

Add-AutoscaleSetting

Get-AutoscaleSetting

Remove-AutoscaleSetting