Skip to content

Commit

Permalink
[OperationalInsights] Add stable version for query packs (#17923)
Browse files Browse the repository at this point in the history
* Add blockchain to latest profile

* Add additional types

* added QueryPack and QueryPackQueries stable version

* update default swagger version to package-2022-02

* fixed issue in x-ms-examples for QueryPacksList

* added type: object to some definitions in order to fix build validations

* removed Operations_List from QueryPacks resource

* rename QueryPacks files to suit the file naming convention

* rename files in readme.md

* build errors

* rename default package

* update referenced package in readme to package-2022-02

* update error details with common-type

* build error

* Update specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json

Co-authored-by: JianyeXi <59603451+jianyexi@users.noreply.github.com>

* Update specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPackQueries.json

Co-authored-by: JianyeXi <59603451+jianyexi@users.noreply.github.com>

* Update readme.python.md

Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
Co-authored-by: JianyeXi <59603451+jianyexi@users.noreply.github.com>
Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com>
  • Loading branch information
4 people authored Mar 15, 2022
1 parent 2e83e74 commit 3c162c8
Show file tree
Hide file tree
Showing 17 changed files with 1,712 additions and 3 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"api-version": "2019-09-01",
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
"resourceGroupName": "my-resource-group",
"queryPackName": "my-querypack",
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"api-version": "2019-09-01",
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
"resourceGroupName": "my-resource-group",
"queryPackName": "my-querypack",
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
"name": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
"type": "microsoft.operationalinsights/queryPacks/queries",
"systemData": {
"createdBy": "string",
"createdByType": "application",
"createdAt": "2020-02-03T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "application",
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
},
"properties": {
"displayName": "Exceptions - New in the last 24 hours",
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
"body": "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n",
"timeModified": "2018-02-14T13:13:19.3381394Z",
"timeCreated": "2018-02-12T11:44:39.2980634Z",
"description": "Thie query fetcges the recent exceptions from the last 24 hours"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"parameters": {
"api-version": "2019-09-01",
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
"resourceGroupName": "my-resource-group",
"queryPackName": "my-querypack",
"includeBody": true
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/4337bb16-d6fe-4ff7-97cf-59df25941476",
"name": "4337bb16-d6fe-4ff7-97cf-59df25941476",
"type": "microsoft.operationalinsights/queryPacks/queries",
"systemData": {
"createdBy": "string",
"createdByType": "application",
"createdAt": "2020-02-03T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "application",
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
},
"properties": {
"id": "4337bb16-d6fe-4ff7-97cf-59df25941476",
"timeCreated": "2019-08-15T10:29:56.1030254Z",
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
"timeModified": "2019-08-15T10:29:56.1030254Z",
"displayName": "Heartbeat_1",
"description": "Thie query takes 10 entries of heartbeat",
"body": "heartbeat | take 10"
}
},
{
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/bf015bf7-be70-49c2-8d52-4cce85c42ef1",
"name": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
"type": "microsoft.operationalinsights/queryPacks/queries",
"systemData": {
"createdBy": "string",
"createdByType": "application",
"createdAt": "2020-02-03T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "application",
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
},
"properties": {
"id": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
"timeCreated": "2019-08-15T10:30:26.7943629Z",
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
"timeModified": "2019-08-15T10:30:26.7943629Z",
"displayName": "Heartbeat_2",
"description": "Thie query takes 10 entries of heartbeat",
"body": "heartbeat | take 10"
}
},
{
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/8d91c6ca-9c56-49c6-b3ae-112a68871acd",
"name": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
"type": "microsoft.operationalinsights/queryPacks/queries",
"systemData": {
"createdBy": "string",
"createdByType": "application",
"createdAt": "2020-02-03T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "application",
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
},
"properties": {
"id": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
"timeCreated": "2019-08-15T10:30:29.4505584Z",
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
"timeModified": "2019-08-15T10:30:29.4505584Z",
"displayName": "Heartbeat_3",
"description": "Thie query takes 10 entries of heartbeat",
"body": "heartbeat | take 10"
}
},
{
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a5a9010e-e4b7-45ad-8b14-09d7e6082819",
"name": "a5a9010e-e4b7-45ad-8b14-09d7e6082819",
"type": "microsoft.operationalinsights/queryPacks/queries",
"systemData": {
"createdBy": "string",
"createdByType": "application",
"createdAt": "2020-02-03T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "application",
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
},
"properties": {
"id": "a5a9010e-e4b7-45ad-8b14-09d7e6082819",
"timeCreated": "2019-08-15T10:30:32.5742324Z",
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
"timeModified": "2019-08-15T10:30:32.5742324Z",
"displayName": "Heartbeat_4",
"description": "Thie query takes 10 entries of heartbeat",
"body": "heartbeat | take 10"
}
}
],
"nextLink": null
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"parameters": {
"api-version": "2019-09-01",
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
"resourceGroupName": "my-resource-group",
"queryPackName": "my-querypack",
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
"QueryPayload": {
"properties": {
"displayName": "Exceptions - New in the last 24 hours",
"description": "my description",
"body": "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n",
"related": {
"categories": [
"analytics"
]
},
"tags": {
"my-label": [
"label1"
],
"my-other-label": [
"label2"
]
}
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
"name": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
"type": "microsoft.operationalinsights/queryPacks/queries",
"systemData": {
"createdBy": "string",
"createdByType": "application",
"createdAt": "2020-02-03T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "application",
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
},
"properties": {
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
"timeCreated": "2019-08-15T10:30:32.5742324Z",
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
"timeModified": "2019-08-15T10:30:32.5742324Z",
"displayName": "Exceptions - New in the last 24 hours",
"description": "my description",
"body": "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n",
"related": {
"categories": [
"analytics"
]
},
"tags": {
"my-label": [
"label1"
],
"my-other-label": [
"label2"
]
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"parameters": {
"api-version": "2019-09-01",
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
"resourceGroupName": "my-resource-group",
"queryPackName": "my-querypack",
"includeBody": true,
"$top": 3,
"QuerySearchProperties": {
"related": {
"categories": [
"other",
"analytics"
]
},
"tags": {
"my-label": [
"label1"
]
}
}
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/4337bb16-d6fe-4ff7-97cf-59df25941476",
"name": "4337bb16-d6fe-4ff7-97cf-59df25941476",
"type": "microsoft.operationalinsights/queryPacks/queries",
"systemData": {
"createdBy": "string",
"createdByType": "application",
"createdAt": "2020-02-03T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "application",
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
},
"properties": {
"id": "4337bb16-d6fe-4ff7-97cf-59df25941476",
"timeCreated": "2019-08-15T10:29:56.1030254Z",
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
"timeModified": "2019-08-15T10:29:56.1030254Z",
"displayName": "Heartbeat_1",
"description": "Thie query takes 10 entries of heartbeat 0",
"body": "Heartbeat | take 1",
"related": {
"categories": [
"other"
]
},
"tags": {
"my-label": [
"label1"
],
"my-other-label": [
"label2"
]
}
}
},
{
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/bf015bf7-be70-49c2-8d52-4cce85c42ef1",
"name": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
"type": "microsoft.operationalinsights/queryPacks/queries",
"systemData": {
"createdBy": "string",
"createdByType": "application",
"createdAt": "2020-02-03T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "application",
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
},
"properties": {
"id": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
"timeCreated": "2019-08-15T10:30:26.7943629Z",
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
"timeModified": "2019-08-15T10:30:26.7943629Z",
"displayName": "Heartbeat_2",
"description": "Thie query takes 10 entries of heartbeat 1",
"body": "Heartbeat | take 1",
"related": {
"categories": [
"analytics"
]
},
"tags": {
"my-label": [
"label1"
],
"my-other-label": [
"label2"
]
}
}
},
{
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/8d91c6ca-9c56-49c6-b3ae-112a68871acd",
"name": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
"type": "microsoft.operationalinsights/queryPacks/queries",
"systemData": {
"createdBy": "string",
"createdByType": "application",
"createdAt": "2020-02-03T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "application",
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
},
"properties": {
"id": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
"timeCreated": "2019-08-15T10:30:29.4505584Z",
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
"timeModified": "2019-08-15T10:30:29.4505584Z",
"displayName": "Heartbeat_3",
"description": "Thie query takes 10 entries of heartbeat 2",
"body": "Heartbeat | take 1",
"related": {
"categories": [
"other",
"analytics"
]
},
"tags": {
"my-label": [
"label1"
],
"my-other-label": [
"label2"
]
}
}
}
],
"nextLink": null
}
}
}
}
Loading

0 comments on commit 3c162c8

Please sign in to comment.