Scheduled Query Rules - List By Resource Group
리소스 그룹에서 예약된 쿼리 규칙 정의를 검색합니다.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules?api-version=2021-08-01
URI 매개 변수
| Name | In(다음 안에) | 필수 | 형식 | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
리소스 그룹의 이름입니다. 이름은 대/소문자를 구분하지 않습니다. |
|
subscription
|
path | True |
string minLength: 1 |
대상 구독의 ID입니다. |
|
api-version
|
query | True |
string minLength: 1 |
이 작업에 사용할 API 버전입니다. |
응답
| Name | 형식 | Description |
|---|---|---|
| 200 OK |
예약된 쿼리 규칙 목록에 대한 성공적인 요청 |
|
| Other Status Codes |
잘못된 요청 |
보안
azure_auth
Azure Active Directory OAuth2 흐름
형식:
oauth2
Flow:
implicit
권한 부여 URL:
https://login.microsoftonline.com/common/oauth2/authorize
범위
| Name | Description |
|---|---|
| user_impersonation | 사용자 계정 가장 |
예제
List scheduled query rules by resource group
샘플 요청
GET https://management.azure.com/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourceGroups/QueryResourceGroupName/providers/Microsoft.Insights/scheduledQueryRules?api-version=2021-08-01
샘플 응답
{
"value": [
{
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/perf",
"name": "perf",
"type": "microsoft.insights/scheduledqueryrules",
"location": "eastus",
"tags": {},
"properties": {
"description": "Performance rule",
"severity": 4,
"enabled": true,
"evaluationFrequency": "PT5M",
"scopes": [
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"
],
"targetResourceTypes": [
"Microsoft.Compute/virtualMachines"
],
"windowSize": "PT10M",
"criteria": {
"allOf": [
{
"query": "Perf | where ObjectName == \"Processor\"",
"timeAggregation": "Average",
"metricMeasureColumn": "% Processor Time",
"resourceIdColumn": "resourceId",
"dimensions": [
{
"name": "ComputerIp",
"operator": "Exclude",
"values": [
"192.168.1.1"
]
},
{
"name": "OSType",
"operator": "Include",
"values": [
"*"
]
}
],
"operator": "GreaterThan",
"threshold": 70,
"failingPeriods": {
"numberOfEvaluationPeriods": 1,
"minFailingPeriodsToAlert": 1
}
}
]
},
"muteActionsDuration": "PT30M",
"actions": {
"actionGroups": [
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"
],
"customProperties": {
"key11": "value11",
"key12": "value12"
}
},
"autoMitigate": true,
"isWorkspaceAlertsStorageConfigured": true,
"checkWorkspaceAlertsStorageConfigured": true,
"skipQueryValidation": true
}
},
{
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/heartbeat",
"name": "heartbeat",
"type": "microsoft.insights/scheduledqueryrules",
"location": "eastus",
"tags": {},
"properties": {
"description": "Health check rule",
"severity": 4,
"enabled": true,
"evaluationFrequency": "PT5M",
"scopes": [
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"
],
"targetResourceTypes": [
"Microsoft.Compute/virtualMachines"
],
"windowSize": "PT10M",
"criteria": {
"allOf": [
{
"query": "Heartbeat",
"timeAggregation": "Count",
"dimensions": [],
"operator": "GreaterThan",
"threshold": 360,
"failingPeriods": {
"numberOfEvaluationPeriods": 1,
"minFailingPeriodsToAlert": 1
}
}
]
},
"muteActionsDuration": "PT30M",
"actions": {
"actionGroups": [
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"
],
"customProperties": {
"key11": "value11",
"key12": "value12"
}
},
"autoMitigate": true,
"isWorkspaceAlertsStorageConfigured": true,
"checkWorkspaceAlertsStorageConfigured": true,
"skipQueryValidation": true
}
}
]
}
정의
| Name | Description |
|---|---|
| Actions |
경고가 발생할 때 호출할 작업입니다. |
|
Alert |
경고의 심각도입니다. [0-4] 사이의 정수여야 합니다. 값 0이 가장 심각합니다. LogAlert 종류의 규칙에만 관련되고 필요합니다. |
| Condition |
예약된 쿼리 규칙의 조건입니다. |
|
condition |
조건 연산자입니다. LogAlert 종류의 규칙에만 관련되고 필요합니다. |
|
created |
리소스를 만든 ID의 형식입니다. |
| Dimension |
차원 분할 및 필터링 정의 |
|
dimension |
차원 값에 대한 연산자 |
|
Error |
리소스 관리 오류 추가 정보입니다. |
|
Error |
오류 응답의 형식을 설명합니다. |
|
Error |
오류 응답 |
|
Failing |
경고를 발생 하는 데 필요한 선택한 조회 시간 범위 내에서 필요한 위반의 최소 수입니다. LogAlert 종류의 규칙에만 관련됩니다. |
| Kind |
예약된 쿼리 규칙의 유형을 나타냅니다. 기본값은 LogAlert입니다. |
|
Scheduled |
예약된 쿼리 규칙의 조건을 정의하는 규칙 조건입니다. |
|
Scheduled |
예약된 쿼리 규칙 리소스입니다. |
|
Scheduled |
예약된 쿼리 규칙 리소스의 컬렉션을 나타냅니다. |
|
system |
리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다. |
|
time |
집계 유형입니다. LogAlert 종류의 규칙에만 관련되고 필요합니다. |
Actions
경고가 발생할 때 호출할 작업입니다.
| Name | 형식 | Description |
|---|---|---|
| actionGroups |
string[] |
경고가 발생할 때 호출할 작업 그룹 리소스 ID입니다. |
| customProperties |
object |
경고 페이로드의 속성입니다. |
AlertSeverity
경고의 심각도입니다. [0-4] 사이의 정수여야 합니다. 값 0이 가장 심각합니다. LogAlert 종류의 규칙에만 관련되고 필요합니다.
| 값 | Description |
|---|---|
| 0 | |
| 1 | |
| 2 | |
| 3 | |
| 4 |
Condition
예약된 쿼리 규칙의 조건입니다.
| Name | 형식 | Description |
|---|---|---|
| dimensions |
차원 조건 목록 |
|
| failingPeriods |
경고를 발생 하는 데 필요한 선택한 조회 시간 범위 내에서 필요한 위반의 최소 수입니다. LogAlert 종류의 규칙에만 관련됩니다. |
|
| metricMeasureColumn |
string |
메트릭 측정값 번호를 포함하는 열입니다. LogAlert 종류의 규칙에만 관련됩니다. |
| metricName |
string |
보낼 메트릭의 이름입니다. LogToMetric 종류의 규칙에만 관련되고 필요합니다. |
| operator |
조건 연산자입니다. LogAlert 종류의 규칙에만 관련되고 필요합니다. |
|
| query |
string |
로그 쿼리 경고 |
| resourceIdColumn |
string |
리소스 ID를 포함하는 열입니다. 열의 콘텐츠는 리소스 ID로 형식이 지정된 URI여야 합니다. LogAlert 종류의 규칙에만 관련됩니다. |
| threshold |
number (double) |
경고를 활성화하는 조건 임계값입니다. LogAlert 종류의 규칙에만 관련되고 필요합니다. |
| timeAggregation |
집계 유형입니다. LogAlert 종류의 규칙에만 관련되고 필요합니다. |
conditionOperator
조건 연산자입니다. LogAlert 종류의 규칙에만 관련되고 필요합니다.
| 값 | Description |
|---|---|
| Equals | |
| GreaterThan | |
| GreaterThanOrEqual | |
| LessThan | |
| LessThanOrEqual |
createdByType
리소스를 만든 ID의 형식입니다.
| 값 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
Dimension
차원 분할 및 필터링 정의
| Name | 형식 | Description |
|---|---|---|
| name |
string |
차원의 이름 |
| operator |
차원 값에 대한 연산자 |
|
| values |
string[] |
차원 값 목록 |
dimensionOperator
차원 값에 대한 연산자
| 값 | Description |
|---|---|
| Include | |
| Exclude |
ErrorAdditionalInfo
리소스 관리 오류 추가 정보입니다.
| Name | 형식 | Description |
|---|---|---|
| info |
object |
추가 정보입니다. |
| type |
string |
추가 정보 유형입니다. |
ErrorContract
오류 응답의 형식을 설명합니다.
| Name | 형식 | Description |
|---|---|---|
| error |
오류 응답 |
ErrorResponse
오류 응답
| Name | 형식 | Description |
|---|---|---|
| additionalInfo |
오류 추가 정보입니다. |
|
| code |
string |
오류 코드입니다. |
| details |
오류 세부 정보입니다. |
|
| message |
string |
오류 메시지입니다. |
| target |
string |
오류 대상입니다. |
FailingPeriods
경고를 발생 하는 데 필요한 선택한 조회 시간 범위 내에서 필요한 위반의 최소 수입니다. LogAlert 종류의 규칙에만 관련됩니다.
| Name | 형식 | Default value | Description |
|---|---|---|---|
| minFailingPeriodsToAlert |
integer (int64) |
1 |
경고를 트리거하는 위반 횟수입니다. numberOfEvaluationPeriods와 작거나 같아야 합니다. 기본값은 1입니다. |
| numberOfEvaluationPeriods |
integer (int64) |
1 |
집계된 조회 지점의 수입니다. 조회 기간은 집계 세분성(windowSize) 및 선택한 집계 지점 수를 기준으로 계산됩니다. 기본값은 1입니다. |
Kind
예약된 쿼리 규칙의 유형을 나타냅니다. 기본값은 LogAlert입니다.
| 값 | Description |
|---|---|
| LogAlert | |
| LogToMetric |
ScheduledQueryRuleCriteria
예약된 쿼리 규칙의 조건을 정의하는 규칙 조건입니다.
| Name | 형식 | Description |
|---|---|---|
| allOf |
지정된 범위에 대해 평가할 조건 목록입니다. |
ScheduledQueryRuleResource
예약된 쿼리 규칙 리소스입니다.
| Name | 형식 | Description |
|---|---|---|
| etag |
string |
etag 필드가 필요하지 . 응답 본문에 제공된 경우 일반적인 etag 규칙에 따라 헤더로도 제공해야 합니다. 엔터티 태그는 동일한 요청된 리소스에서 둘 이상의 엔터티를 비교하는 데 사용됩니다. HTTP/1.1은 etag(섹션 14.19), If-Match(섹션 14.24), If-None-Match(섹션 14.26) 및 If-Range(섹션 14.27) 헤더 필드에 엔터티 태그를 사용합니다. |
| id |
string |
리소스에 대한 정규화된 리소스 ID입니다. 예 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| kind |
예약된 쿼리 규칙의 유형을 나타냅니다. 기본값은 LogAlert입니다. |
|
| location |
string |
리소스가 있는 지리적 위치 |
| name |
string |
리소스의 이름 |
| properties.actions |
경고가 발생할 때 호출할 작업입니다. |
|
| properties.autoMitigate |
boolean |
경고를 자동으로 해결해야 하는지 여부를 나타내는 플래그입니다. 기본값은 true입니다. LogAlert 종류의 규칙에만 관련됩니다. |
| properties.checkWorkspaceAlertsStorageConfigured |
boolean |
이 예약된 쿼리 규칙을 고객의 스토리지에 저장해야 하는지 여부를 나타내는 플래그입니다. 기본값은 false입니다. LogAlert 종류의 규칙에만 관련됩니다. |
| properties.createdWithApiVersion |
string |
이 경고 규칙을 만들 때 사용되는 api-version |
| properties.criteria |
예약된 쿼리 규칙의 조건을 정의하는 규칙 조건입니다. |
|
| properties.description |
string |
예약된 쿼리 규칙에 대한 설명입니다. |
| properties.displayName |
string |
경고 규칙의 표시 이름 |
| properties.enabled |
boolean |
이 예약된 쿼리 규칙을 사용할 수 있는지 여부를 나타내는 플래그입니다. 값은 true 또는 false여야 합니다. |
| properties.evaluationFrequency |
string (duration) |
예약된 쿼리 규칙이 ISO 8601 기간 형식으로 표시되는 빈도입니다. LogAlert 종류의 규칙에만 관련되고 필요합니다. |
| properties.isLegacyLogAnalyticsRule |
boolean |
경고 규칙이 레거시 Log Analytic 규칙인 경우 True입니다. |
| properties.isWorkspaceAlertsStorageConfigured |
boolean |
이 예약된 쿼리 규칙이 고객의 스토리지에 저장되도록 구성되었는지 여부를 나타내는 플래그입니다. 기본값은 false입니다. |
| properties.muteActionsDuration |
string (duration) |
경고가 발생한 후 선택한 기간(ISO 8601 기간 형식)에 대한 작업을 음소거합니다. LogAlert 종류의 규칙에만 관련됩니다. |
| properties.overrideQueryTimeRange |
string (duration) |
지정된 경우 쿼리 시간 범위를 재정의합니다(기본값은 WindowSize*NumberOfEvaluationPeriods). LogAlert 종류의 규칙에만 관련됩니다. |
| properties.scopes |
string[] |
이 예약된 쿼리 규칙의 범위가 지정된 리소스 ID 목록입니다. |
| properties.severity |
Alert |
경고의 심각도입니다. [0-4] 사이의 정수여야 합니다. 값 0이 가장 심각합니다. LogAlert 종류의 규칙에만 관련되고 필요합니다. |
| properties.skipQueryValidation |
boolean |
제공된 쿼리의 유효성을 검사해야 하는지 여부를 나타내는 플래그입니다. 기본값은 false입니다. LogAlert 종류의 규칙에만 관련됩니다. |
| properties.targetResourceTypes |
string[] |
경고가 생성/업데이트되는 대상 리소스의 리소스 종류 목록입니다. 예를 들어 범위가 리소스 그룹이고 targetResourceTypes가 Microsoft.Compute/virtualMachines인 경우 경고 조건을 충족하는 리소스 그룹의 각 가상 머신에 대해 다른 경고가 발생합니다. LogAlert 종류의 규칙에만 관련 |
| properties.windowSize |
string (duration) |
경고 쿼리가 실행될 기간(ISO 8601 기간 형식)(bin 크기)입니다. LogAlert 종류의 규칙에만 관련되고 필요합니다. |
| systemData |
ScheduledQueryRule의 SystemData입니다. |
|
| tags |
object |
리소스 태그. |
| type |
string |
리소스의 형식입니다. 예: "Microsoft.Compute/virtualMachines" 또는 "Microsoft.Storage/storageAccounts" |
ScheduledQueryRuleResourceCollection
예약된 쿼리 규칙 리소스의 컬렉션을 나타냅니다.
| Name | 형식 | Description |
|---|---|---|
| nextLink |
string |
다음 요소 집합을 검색하는 링크를 제공합니다. |
| value |
예약된 쿼리 규칙 리소스의 값입니다. |
systemData
리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다.
| Name | 형식 | Description |
|---|---|---|
| createdAt |
string (date-time) |
리소스 만들기의 타임스탬프(UTC)입니다. |
| createdBy |
string |
리소스를 만든 ID입니다. |
| createdByType |
리소스를 만든 ID의 형식입니다. |
|
| lastModifiedAt |
string (date-time) |
리소스 마지막 수정의 타임스탬프(UTC) |
| lastModifiedBy |
string |
리소스를 마지막으로 수정한 ID입니다. |
| lastModifiedByType |
리소스를 마지막으로 수정한 ID의 형식입니다. |
timeAggregation
집계 유형입니다. LogAlert 종류의 규칙에만 관련되고 필요합니다.
| 값 | Description |
|---|---|
| Count | |
| Average | |
| Minimum | |
| Maximum | |
| Total |