< Back

Get-AzureRmAutoscaleHistory

Tue Jan 29, 2019 9:48 pm

NAME Get-AzureRmAutoscaleHistory



SYNOPSIS

Gets the Autoscale history.





SYNTAX

Get-AzureRmAutoscaleHistory [-Caller <String>] [-DefaultProfile <IAzureContextContainer>] [-DetailedOutput] [-EndTime <DateTime>] [-ResourceId

<String>] [-StartTime <DateTime>] [-Status <String>] [<CommonParameters>]





DESCRIPTION

The Get-AzureRmAutoscaleHistory cmdlet gets the history of events related to an Autoscale setting.





PARAMETERS

-Caller <String>

Specifies a caller.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DetailedOutput [<SwitchParameter>]

Indicates that this operation included detailed output. If you do not specify this parameter, the output is summarized.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-EndTime <DateTime>

Specifies the end time of the query in local time. The default is the current time.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceId <String>

Specifies the resource ID to which the autoscale setting is associated.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-StartTime <DateTime>

Specifies the start time of the query in local time. This parameter is optional. The default is the current local time minus one hour.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Status <String>

Specifies a filter by status. This parameter is optional. The fault is an empty string (i.e. no filter)



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

List<Microsoft.Azure.Commands.Insights.OutputClasses.PSEventData>







NOTES









Example 1: Get all events associated with a subscription



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



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





Example 2: GetAutoscaleHistory for a particular resource



PS C:\\>Get-AzureRmAutoscaleHistory -StartTime 2015-02-09T18:35:00 -EndTime 2015-02-09T18:40:00 -ResourceId "/subscriptions/b93fb07a-6f93-30be-bf3e-

4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.insights/autoscalesettings/DefaultServerFarm-Default-Web-EastUS" -DetailedOutput

Authorization :

Caller : Microsoft.Insights/autoscaleSettings

Claims : http://schemas.xmlsoap.org/ws/2005/05/i ... claims/spn: Microsoft.Insights/autoscaleSettings

CorrelationId : ac5b03ca-05d4-4811-9c27-0314a145f785

Description : The autoscale engine attempting to scale resource '/subscriptions/a93fb07c-6c93-40be-bf3b-4f0deb

a10f4b/resourceGroups/Default-Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm'

from 1 instances count to 2 instances count.

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/Default-Web-EastUS/providers/

microsoft.insights/autoscalesettings/DefaultServerFarm-Default-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/Default-Web-EastUS/providers/microsoft.web/serverFarms/De

faultServerFarm' from 1 instances count to 2 instances count.

ResourceName : /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-

EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm

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/Default-

Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm",

"ResourceLocation": "East US",

"TimeGrain": "PT1M",

"Statistic": "Average",

"TimeWindow": "PT45M",

"TimeAggregation": "Average",

"Operator": "GreaterThanOrEqual",

"Threshold": 14.0,

"Source": "WebsiteDedicated:eastuswebspace:DefaultServerFarm"

},

"ScaleAction": {

"Direction": "Increase",

"Type": "ChangeCount",

"Value": "1",

"Cooldown": "PT5M"

}

},

{

"MetricTrigger": {

"Name": "CpuPercentage",

"Namespace": "",

"Resource": "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-

Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm",

"ResourceLocation": "East US",

"TimeGrain": "PT1M",

"Statistic": "Average",

"TimeWindow": "PT45M",

"TimeAggregation": "Average",

"Operator": "LessThanOrEqual",

"Threshold": 4.0,

"Source": "WebsiteDedicated:eastuswebspace:DefaultServerFarm"

},

"ScaleAction": {

"Direction": "Decrease",

"Type": "ChangeCount",

"Value": "1",

"Cooldown": "PT2H"

}

},

{

"MetricTrigger": {

"Name": "BytesReceived",

"Namespace": "",

"Resource": "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-

Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm",

"ResourceLocation": "East US",

"TimeGrain": "PT1M",

"Statistic": "Average",

"TimeWindow": "PT10M",

"TimeAggregation": "Average",

"Operator": "LessThanOrEqual",

"Threshold": 50.0,

"Source": "WebsiteDedicated:eastuswebspace:DefaultServerFarm"

},

"ScaleAction": {

"Direction": "Decrease",

"Type": "ChangeCount",

"Value": "1",

"Cooldown": "PT10M"

}

},

{

"MetricTrigger": {

"Name": "BytesReceived",

"Namespace": "",

"Resource": "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-

Web-EastUS/providers/microsoft.web/serverFarms/DefaultServerFarm",

"ResourceLocation": "East US",

"TimeGrain": "PT1M",

"Statistic": "Average",

"TimeWindow": "PT5M",

"TimeAggregation": "Average",

"Operator": "GreaterThanOrEqual",

"Threshold": 100.0,

"Source": "WebsiteDedicated:eastuswebspace:DefaultServerFarm"

},

"ScaleAction": {

"Direction": "Increase",

"Type": "ChangeCount",

"Value": "1",

"Cooldown": "PT10M"

}

}

]

}

ResourceGroupName : Default-Web-EastUS

ResourceProviderName : microsoft.insights

ResourceId : /subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/

microsoft.insights/autoscalesettings/DefaultServerFarm-Default-Web-EastUS

Status : Succeeded

SubmissionTimestamp : 2/10/2015 2:38:19 AM

SubscriptionId : b93fb07a-6f93-30be-bf3e-4f0deca15f4f

SubStatus :



This command gets all Autoscale-related events associated with a particular resource identified by the resource's ID (essentially, the

ResourceUri).







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... alehistory

Add-AzureRmAutoscaleSetting

Get-AzureRmAutoscaleSetting

Remove-AzureRmAutoscaleSetting