Skip to content

Commit 3c162c8

Browse files
dabenhamMicmarkcowljianyexiBigCat20196
authored
[OperationalInsights] Add stable version for query packs (#17923)
* 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>
1 parent 2e83e74 commit 3c162c8

17 files changed

+1712
-3
lines changed

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

Lines changed: 615 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 416 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"api-version": "2019-09-01",
4+
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
5+
"resourceGroupName": "my-resource-group",
6+
"queryPackName": "my-querypack",
7+
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"
8+
},
9+
"responses": {
10+
"200": {},
11+
"204": {}
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parameters": {
3+
"api-version": "2019-09-01",
4+
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
5+
"resourceGroupName": "my-resource-group",
6+
"queryPackName": "my-querypack",
7+
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
13+
"name": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
14+
"type": "microsoft.operationalinsights/queryPacks/queries",
15+
"systemData": {
16+
"createdBy": "string",
17+
"createdByType": "application",
18+
"createdAt": "2020-02-03T01:01:01.1075056Z",
19+
"lastModifiedBy": "string",
20+
"lastModifiedByType": "application",
21+
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
22+
},
23+
"properties": {
24+
"displayName": "Exceptions - New in the last 24 hours",
25+
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
26+
"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",
27+
"timeModified": "2018-02-14T13:13:19.3381394Z",
28+
"timeCreated": "2018-02-12T11:44:39.2980634Z",
29+
"description": "Thie query fetcges the recent exceptions from the last 24 hours"
30+
}
31+
}
32+
}
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"parameters": {
3+
"api-version": "2019-09-01",
4+
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
5+
"resourceGroupName": "my-resource-group",
6+
"queryPackName": "my-querypack",
7+
"includeBody": true
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"value": [
13+
{
14+
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/4337bb16-d6fe-4ff7-97cf-59df25941476",
15+
"name": "4337bb16-d6fe-4ff7-97cf-59df25941476",
16+
"type": "microsoft.operationalinsights/queryPacks/queries",
17+
"systemData": {
18+
"createdBy": "string",
19+
"createdByType": "application",
20+
"createdAt": "2020-02-03T01:01:01.1075056Z",
21+
"lastModifiedBy": "string",
22+
"lastModifiedByType": "application",
23+
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
24+
},
25+
"properties": {
26+
"id": "4337bb16-d6fe-4ff7-97cf-59df25941476",
27+
"timeCreated": "2019-08-15T10:29:56.1030254Z",
28+
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
29+
"timeModified": "2019-08-15T10:29:56.1030254Z",
30+
"displayName": "Heartbeat_1",
31+
"description": "Thie query takes 10 entries of heartbeat",
32+
"body": "heartbeat | take 10"
33+
}
34+
},
35+
{
36+
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/bf015bf7-be70-49c2-8d52-4cce85c42ef1",
37+
"name": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
38+
"type": "microsoft.operationalinsights/queryPacks/queries",
39+
"systemData": {
40+
"createdBy": "string",
41+
"createdByType": "application",
42+
"createdAt": "2020-02-03T01:01:01.1075056Z",
43+
"lastModifiedBy": "string",
44+
"lastModifiedByType": "application",
45+
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
46+
},
47+
"properties": {
48+
"id": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
49+
"timeCreated": "2019-08-15T10:30:26.7943629Z",
50+
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
51+
"timeModified": "2019-08-15T10:30:26.7943629Z",
52+
"displayName": "Heartbeat_2",
53+
"description": "Thie query takes 10 entries of heartbeat",
54+
"body": "heartbeat | take 10"
55+
}
56+
},
57+
{
58+
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/8d91c6ca-9c56-49c6-b3ae-112a68871acd",
59+
"name": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
60+
"type": "microsoft.operationalinsights/queryPacks/queries",
61+
"systemData": {
62+
"createdBy": "string",
63+
"createdByType": "application",
64+
"createdAt": "2020-02-03T01:01:01.1075056Z",
65+
"lastModifiedBy": "string",
66+
"lastModifiedByType": "application",
67+
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
68+
},
69+
"properties": {
70+
"id": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
71+
"timeCreated": "2019-08-15T10:30:29.4505584Z",
72+
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
73+
"timeModified": "2019-08-15T10:30:29.4505584Z",
74+
"displayName": "Heartbeat_3",
75+
"description": "Thie query takes 10 entries of heartbeat",
76+
"body": "heartbeat | take 10"
77+
}
78+
},
79+
{
80+
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a5a9010e-e4b7-45ad-8b14-09d7e6082819",
81+
"name": "a5a9010e-e4b7-45ad-8b14-09d7e6082819",
82+
"type": "microsoft.operationalinsights/queryPacks/queries",
83+
"systemData": {
84+
"createdBy": "string",
85+
"createdByType": "application",
86+
"createdAt": "2020-02-03T01:01:01.1075056Z",
87+
"lastModifiedBy": "string",
88+
"lastModifiedByType": "application",
89+
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
90+
},
91+
"properties": {
92+
"id": "a5a9010e-e4b7-45ad-8b14-09d7e6082819",
93+
"timeCreated": "2019-08-15T10:30:32.5742324Z",
94+
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
95+
"timeModified": "2019-08-15T10:30:32.5742324Z",
96+
"displayName": "Heartbeat_4",
97+
"description": "Thie query takes 10 entries of heartbeat",
98+
"body": "heartbeat | take 10"
99+
}
100+
}
101+
],
102+
"nextLink": null
103+
}
104+
}
105+
}
106+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"parameters": {
3+
"api-version": "2019-09-01",
4+
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
5+
"resourceGroupName": "my-resource-group",
6+
"queryPackName": "my-querypack",
7+
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
8+
"QueryPayload": {
9+
"properties": {
10+
"displayName": "Exceptions - New in the last 24 hours",
11+
"description": "my description",
12+
"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",
13+
"related": {
14+
"categories": [
15+
"analytics"
16+
]
17+
},
18+
"tags": {
19+
"my-label": [
20+
"label1"
21+
],
22+
"my-other-label": [
23+
"label2"
24+
]
25+
}
26+
}
27+
}
28+
},
29+
"responses": {
30+
"200": {
31+
"body": {
32+
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
33+
"name": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
34+
"type": "microsoft.operationalinsights/queryPacks/queries",
35+
"systemData": {
36+
"createdBy": "string",
37+
"createdByType": "application",
38+
"createdAt": "2020-02-03T01:01:01.1075056Z",
39+
"lastModifiedBy": "string",
40+
"lastModifiedByType": "application",
41+
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
42+
},
43+
"properties": {
44+
"id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4",
45+
"timeCreated": "2019-08-15T10:30:32.5742324Z",
46+
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
47+
"timeModified": "2019-08-15T10:30:32.5742324Z",
48+
"displayName": "Exceptions - New in the last 24 hours",
49+
"description": "my description",
50+
"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",
51+
"related": {
52+
"categories": [
53+
"analytics"
54+
]
55+
},
56+
"tags": {
57+
"my-label": [
58+
"label1"
59+
],
60+
"my-other-label": [
61+
"label2"
62+
]
63+
}
64+
}
65+
}
66+
}
67+
}
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"parameters": {
3+
"api-version": "2019-09-01",
4+
"subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918",
5+
"resourceGroupName": "my-resource-group",
6+
"queryPackName": "my-querypack",
7+
"includeBody": true,
8+
"$top": 3,
9+
"QuerySearchProperties": {
10+
"related": {
11+
"categories": [
12+
"other",
13+
"analytics"
14+
]
15+
},
16+
"tags": {
17+
"my-label": [
18+
"label1"
19+
]
20+
}
21+
}
22+
},
23+
"responses": {
24+
"200": {
25+
"body": {
26+
"value": [
27+
{
28+
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/4337bb16-d6fe-4ff7-97cf-59df25941476",
29+
"name": "4337bb16-d6fe-4ff7-97cf-59df25941476",
30+
"type": "microsoft.operationalinsights/queryPacks/queries",
31+
"systemData": {
32+
"createdBy": "string",
33+
"createdByType": "application",
34+
"createdAt": "2020-02-03T01:01:01.1075056Z",
35+
"lastModifiedBy": "string",
36+
"lastModifiedByType": "application",
37+
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
38+
},
39+
"properties": {
40+
"id": "4337bb16-d6fe-4ff7-97cf-59df25941476",
41+
"timeCreated": "2019-08-15T10:29:56.1030254Z",
42+
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
43+
"timeModified": "2019-08-15T10:29:56.1030254Z",
44+
"displayName": "Heartbeat_1",
45+
"description": "Thie query takes 10 entries of heartbeat 0",
46+
"body": "Heartbeat | take 1",
47+
"related": {
48+
"categories": [
49+
"other"
50+
]
51+
},
52+
"tags": {
53+
"my-label": [
54+
"label1"
55+
],
56+
"my-other-label": [
57+
"label2"
58+
]
59+
}
60+
}
61+
},
62+
{
63+
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/bf015bf7-be70-49c2-8d52-4cce85c42ef1",
64+
"name": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
65+
"type": "microsoft.operationalinsights/queryPacks/queries",
66+
"systemData": {
67+
"createdBy": "string",
68+
"createdByType": "application",
69+
"createdAt": "2020-02-03T01:01:01.1075056Z",
70+
"lastModifiedBy": "string",
71+
"lastModifiedByType": "application",
72+
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
73+
},
74+
"properties": {
75+
"id": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
76+
"timeCreated": "2019-08-15T10:30:26.7943629Z",
77+
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
78+
"timeModified": "2019-08-15T10:30:26.7943629Z",
79+
"displayName": "Heartbeat_2",
80+
"description": "Thie query takes 10 entries of heartbeat 1",
81+
"body": "Heartbeat | take 1",
82+
"related": {
83+
"categories": [
84+
"analytics"
85+
]
86+
},
87+
"tags": {
88+
"my-label": [
89+
"label1"
90+
],
91+
"my-other-label": [
92+
"label2"
93+
]
94+
}
95+
}
96+
},
97+
{
98+
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/8d91c6ca-9c56-49c6-b3ae-112a68871acd",
99+
"name": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
100+
"type": "microsoft.operationalinsights/queryPacks/queries",
101+
"systemData": {
102+
"createdBy": "string",
103+
"createdByType": "application",
104+
"createdAt": "2020-02-03T01:01:01.1075056Z",
105+
"lastModifiedBy": "string",
106+
"lastModifiedByType": "application",
107+
"lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
108+
},
109+
"properties": {
110+
"id": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
111+
"timeCreated": "2019-08-15T10:30:29.4505584Z",
112+
"author": "1809f206-263a-46f7-942d-4572c156b7e7",
113+
"timeModified": "2019-08-15T10:30:29.4505584Z",
114+
"displayName": "Heartbeat_3",
115+
"description": "Thie query takes 10 entries of heartbeat 2",
116+
"body": "Heartbeat | take 1",
117+
"related": {
118+
"categories": [
119+
"other",
120+
"analytics"
121+
]
122+
},
123+
"tags": {
124+
"my-label": [
125+
"label1"
126+
],
127+
"my-other-label": [
128+
"label2"
129+
]
130+
}
131+
}
132+
}
133+
],
134+
"nextLink": null
135+
}
136+
}
137+
}
138+
}

0 commit comments

Comments
 (0)