-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resource centric query for logs (#18141)
* Resource centric query * update * more params * lint * prettier * add Get * lint * comments * lint * Update specification/operationalinsights/data-plane/Microsoft.OperationalInsights/preview/2021-05-19_Preview/OperationalInsights.json Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com> * Apply suggestions from code review * Update specification/operationalinsights/data-plane/Microsoft.OperationalInsights/preview/2021-05-19_Preview/examples/oms-get-resource-centric-example.json * comments * Update specification/operationalinsights/data-plane/Microsoft.OperationalInsights/preview/2021-05-19_Preview/OperationalInsights.json * revert / * fix resourceId * x-ms-paths * lint * avocado * fix * lint * remove path * remove x-ms-path * lint * Update specification/operationalinsights/data-plane/Microsoft.OperationalInsights/preview/2022-10-27_Preview/OperationalInsights.json * remove bc * avocado * remove breakinc changes * add format * missing type object Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com>
- Loading branch information
1 parent
10c39b3
commit fc3c409
Showing
11 changed files
with
3,312 additions
and
0 deletions.
There are no files selected for viewing
1,601 changes: 1,601 additions & 0 deletions
1,601
...a-plane/Microsoft.OperationalInsights/preview/2022-10-27_Preview/OperationalInsights.json
Large diffs are not rendered by default.
Oops, something went wrong.
609 changes: 609 additions & 0 deletions
609
...icrosoft.OperationalInsights/preview/2022-10-27_Preview/examples/batch-query-example.json
Large diffs are not rendered by default.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
...erationalInsights/preview/2022-10-27_Preview/examples/la-get-cross-workspace-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"title": "Cross Workspace Query", | ||
"description": "A cross workspace query that the type and count of each row per workspace.", | ||
"parameters": { | ||
"workspaceId": "63613592-b6f7-4c3d-a390-22ba13102111", | ||
"query": "union * | where TimeGenerated > ago(1h) | summarize count() by Type, TenantId", | ||
"workspaces": "draft-test,draft-test-2" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"tables": [ | ||
{ | ||
"name": "PrimaryResult", | ||
"columns": [ | ||
{ | ||
"name": "Type", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "TenantId", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "count_", | ||
"type": "long" | ||
} | ||
], | ||
"rows": [ | ||
[ | ||
"Usage", | ||
"63613592-b6f7-4c3d-a390-22ba13102111", | ||
"1" | ||
], | ||
[ | ||
"Usage", | ||
"d436f322-a9f4-4aad-9a7d-271fbf66001c", | ||
"1" | ||
], | ||
[ | ||
"BillingFact", | ||
"63613592-b6f7-4c3d-a390-22ba13102111", | ||
"1" | ||
], | ||
[ | ||
"BillingFact", | ||
"d436f322-a9f4-4aad-9a7d-271fbf66001c", | ||
"1" | ||
], | ||
[ | ||
"Operation", | ||
"63613592-b6f7-4c3d-a390-22ba13102111", | ||
"7" | ||
], | ||
[ | ||
"Operation", | ||
"d436f322-a9f4-4aad-9a7d-271fbf66001c", | ||
"5" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
158 changes: 158 additions & 0 deletions
158
...ane/Microsoft.OperationalInsights/preview/2022-10-27_Preview/examples/la-get-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
{ | ||
"title": "Simple Query", | ||
"description": "A simple query that returns query results.", | ||
"parameters": { | ||
"workspaceId": "63613592-b6f7-4c3d-a390-22ba13102111", | ||
"query": "Usage | take 10", | ||
"timespan": "PT12H" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"x-ms-request-id": "58a37988-2c05-427a-891f-5e0e1266fcc5", | ||
"x-ms-correlation-request-id": "58a37988-2c05-427a-891f-5e0e1266fcc5" | ||
}, | ||
"body": { | ||
"tables": [ | ||
{ | ||
"name": "PrimaryResult", | ||
"columns": [ | ||
{ | ||
"name": "TenantId", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "Computer", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "TimeGenerated", | ||
"type": "datetime" | ||
}, | ||
{ | ||
"name": "SourceSystem", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "StartTime", | ||
"type": "datetime" | ||
}, | ||
{ | ||
"name": "EndTime", | ||
"type": "datetime" | ||
}, | ||
{ | ||
"name": "ResourceUri", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "LinkedResourceUri", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "DataType", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "Solution", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "BatchesWithinSla", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "BatchesOutsideSla", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "BatchesCapped", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "TotalBatches", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "AvgLatencyInSeconds", | ||
"type": "real" | ||
}, | ||
{ | ||
"name": "Quantity", | ||
"type": "real" | ||
}, | ||
{ | ||
"name": "QuantityUnit", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "IsBillable", | ||
"type": "bool" | ||
}, | ||
{ | ||
"name": "MeterId", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "LinkedMeterId", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "Type", | ||
"type": "string" | ||
} | ||
], | ||
"rows": [ | ||
[ | ||
"b438b4f6-912a-46d5-9cb1-b44069212abc", | ||
"ContosoSQLSrv1", | ||
"2017-08-24T06:59:59Z", | ||
"OMS", | ||
"2017-08-24T06:00:00Z", | ||
"2017-08-24T06:59:59Z", | ||
"/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it", | ||
null, | ||
"Perf", | ||
"LogManagement", | ||
"1", | ||
"0", | ||
"0", | ||
"1", | ||
"1.286", | ||
"0.076408", | ||
"MBytes", | ||
"true", | ||
"a4e29a95-5b4c-408b-80e3-113f9410566e", | ||
"00000000-0000-0000-0000-000000000000", | ||
"Usage" | ||
], | ||
[ | ||
"b438b4f6-912a-46d5-9cb1-b44069212abc", | ||
"Store010Web3", | ||
"2017-08-24T06:59:59Z", | ||
"OMS", | ||
"2017-08-24T06:00:00Z", | ||
"2017-08-24T06:59:59Z", | ||
"/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it", | ||
null, | ||
"Perf", | ||
"LogManagement", | ||
"1", | ||
"0", | ||
"0", | ||
"1", | ||
"1.7", | ||
"0.106767", | ||
"MBytes", | ||
"true", | ||
"a4e29a95-5b4c-408b-80e3-113f9410566e", | ||
"00000000-0000-0000-0000-000000000000", | ||
"Usage" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...rationalInsights/preview/2022-10-27_Preview/examples/la-get-resource-centric-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"title": "Simple GET Query across resource", | ||
"description": "A simple query that returns query results.", | ||
"parameters": { | ||
"resourceId": "/subscriptions/fffa080af-c2d8-40ad-9cce-e1a450bawb57/resourceGroups/test-resourcegroup/providers/Microsoft.Storage/storageAccounts/storageaccountname", | ||
"query": "StorageBlobLogs | summarize count() by OperationName | top 10 by count_ desc", | ||
"timespan": "PT24H" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"x-ms-request-id": "58a37988-2c05-427a-891f-5e0e1266fcc5", | ||
"x-ms-correlation-request-id": "58a37988-2c05-427a-891f-5e0e1266fcc5" | ||
}, | ||
"body": { | ||
"tables": [ | ||
{ | ||
"name": "PrimaryResult", | ||
"columns": [ | ||
{ | ||
"name": "OperationName", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "count_", | ||
"type": "long" | ||
} | ||
], | ||
"rows": [ | ||
[ | ||
"operation1", | ||
"10" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
...rationalInsights/preview/2022-10-27_Preview/examples/la-post-cross-workspace-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"title": "Cross Workspace Query", | ||
"description": "A cross workspace query that the type and count of each row per workspace.", | ||
"parameters": { | ||
"workspaceId": "63613592-b6f7-4c3d-a390-22ba13102111", | ||
"body": { | ||
"query": "union * | where TimeGenerated > ago(1h) | summarize count() by Type, TenantId", | ||
"workspaces": [ | ||
"draft-test", | ||
"draft-test-2" | ||
] | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"tables": [ | ||
{ | ||
"name": "PrimaryResult", | ||
"columns": [ | ||
{ | ||
"name": "Type", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "TenantId", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "count_", | ||
"type": "long" | ||
} | ||
], | ||
"rows": [ | ||
[ | ||
"Usage", | ||
"63613592-b6f7-4c3d-a390-22ba13102111", | ||
"1" | ||
], | ||
[ | ||
"Usage", | ||
"d436f322-a9f4-4aad-9a7d-271fbf66001c", | ||
"1" | ||
], | ||
[ | ||
"BillingFact", | ||
"63613592-b6f7-4c3d-a390-22ba13102111", | ||
"1" | ||
], | ||
[ | ||
"BillingFact", | ||
"d436f322-a9f4-4aad-9a7d-271fbf66001c", | ||
"1" | ||
], | ||
[ | ||
"Operation", | ||
"63613592-b6f7-4c3d-a390-22ba13102111", | ||
"7" | ||
], | ||
[ | ||
"Operation", | ||
"d436f322-a9f4-4aad-9a7d-271fbf66001c", | ||
"5" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.