Skip to content

Commit

Permalink
Update swagger for Azure Monitor logs query (Azure#14514)
Browse files Browse the repository at this point in the history
* Update swaggers for logs and metrics queries

* Update version

* add missing fields

* include statistics

* include statistics

* statistics in log query result

* Include metrics namespace param

* Update title and client name

* Include namespace param

* Add namespace and region

* Fix top and orderby query params

* Fix linting errors

* Update security to oauth2

* Revert metrics changes

* Update path

* add batch sample

* Update query body

* Address PR comments

* Add error info for single query response

* Include batch example

* update batch results

* rendering response as object

* Update row value type to object

* update security definition to oauth2
  • Loading branch information
srnagar authored and Andrew Sager committed Jun 24, 2021
1 parent 494700f commit 41306c2
Show file tree
Hide file tree
Showing 9 changed files with 3,073 additions and 0 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,284 @@
{
"title": "Get Metadata",
"description": "A metadata request that returns the workspace schema and other information",
"parameters": {
"workspaceId": "b438b4f6-912a-46d5-9cb1-b44069212abc",
"apiVersion": "2018-04-20"
},
"responses": {
"200": {
"body": {
"tables": [
{
"id": "ADAssessmentRecommendation",
"name": "ADAssessmentRecommendation",
"description": "Recommendations generated by AD assessments that are started through a scheduled task. When you schedule the assessment it runs by default every 7 days and upload the data into Azure Log Analytics",
"timespanColumn": "TimeGenerated",
"columns": [
{
"name": "SourceSystem",
"type": "string",
"isPreferredFacet": true
},
{
"name": "AssessmentId",
"type": "string",
"isPreferredFacet": true
},
{
"name": "RecommendationId",
"type": "string",
"isPreferredFacet": true
},
{
"name": "Recommendation",
"type": "string",
"isPreferredFacet": true
},
{
"name": "Description",
"type": "string"
},
{
"name": "RecommendationResult",
"type": "string",
"isPreferredFacet": true
},
{
"name": "TimeGenerated",
"type": "datetime"
},
{
"name": "FocusAreaId",
"type": "string",
"isPreferredFacet": true
},
{
"name": "FocusArea",
"type": "string",
"isPreferredFacet": true
},
{
"name": "ActionAreaId",
"type": "string",
"isPreferredFacet": true
},
{
"name": "ActionArea",
"type": "string",
"isPreferredFacet": true
},
{
"name": "RecommendationWeight",
"type": "real"
},
{
"name": "Computer",
"type": "string",
"isPreferredFacet": true
},
{
"name": "AffectedObjectType",
"type": "string",
"isPreferredFacet": true
},
{
"name": "AffectedObjectName",
"type": "string",
"isPreferredFacet": true
},
{
"name": "Forest",
"type": "string",
"isPreferredFacet": true
},
{
"name": "Domain",
"type": "string",
"isPreferredFacet": true
},
{
"name": "DomainController",
"type": "string",
"isPreferredFacet": true
},
{
"name": "Technology",
"type": "string"
},
{
"name": "CustomData",
"type": "string"
},
{
"name": "TargetCount",
"type": "int"
},
{
"name": "IsRollup",
"type": "bool",
"isPreferredFacet": true
},
{
"name": "IsCopied",
"type": "bool",
"isPreferredFacet": true
},
{
"name": "RecommendationPeriod",
"type": "string",
"isPreferredFacet": true
},
{
"name": "Type",
"type": "string"
},
{
"name": "_ResourceId",
"type": "string"
}
],
"related": {
"categories": [
"workloads"
],
"solutions": [
"ADAssessment"
],
"resourceTypes": [
"microsoft.compute/virtualmachines"
]
}
},
{
"id": "custom_CL",
"name": "custom_CL",
"timespanColumn": "TimeGenerated",
"columns": [
{
"name": "SourceSystem",
"type": "string",
"isPreferredFacet": true
},
{
"name": "ManagementGroupName",
"type": "string",
"isPreferredFacet": true
},
{
"name": "TimeGenerated",
"type": "datetime",
"isPreferredFacet": true
},
{
"name": "Computer",
"type": "string",
"isPreferredFacet": true
},
{
"name": "RawData",
"type": "string"
},
{
"name": "Type",
"type": "string"
},
{
"name": "_ResourceId",
"type": "string"
}
],
"related": {
"workspaces": [
"b438b4f6-912a-46d5-9cb1-b44069212abc"
]
}
}
],
"solutions": [
{
"id": "ADAssessment",
"name": "ADAssessment",
"displayName": "Active Directory Health Check",
"description": "Assess the risk and health of Active Directory environments.",
"related": {
"tables": [
"ADAssessmentRecommendation"
],
"functions": [
"dwad"
],
"workspaces": [
"b438b4f6-912a-46d5-9cb1-b44069212abc"
]
}
}
],
"functions": [
{
"id": "dwad",
"name": "dwad",
"displayName": "dasd",
"body": "Heartbeat\r\n| where ResourceGroup != \"rg-SAP-DEVQA-005\" and ResourceGroup != \"rg-SAP-DEVQA-006\" and Computer contains \"\"\r\n| limit 500000\r\n| sort by Computer asc\r\n| distinct Computer\r\n",
"related": {
"solutions": [
"ADAssessment"
],
"workspaces": [
"b438b4f6-912a-46d5-9cb1-b44069212abc"
]
}
}
],
"resourceTypes": [
{
"id": "microsoft.compute/virtualmachines",
"type": "Microsoft.Compute/VirtualMachines",
"displayName": "Virtual machines",
"related": {
"tables": [
"ADAssessmentRecommendation"
]
}
}
],
"workspaces": [
{
"id": "b438b4f6-912a-46d5-9cb1-b44069212abc",
"resourceId": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-IT",
"name": "contosoretail-IT",
"region": "eastus",
"related": {
"resourceTypes": [
"microsoft.compute/virtualmachines"
],
"tables": [
"custom_CL"
],
"solutions": [
"ADAssessment"
],
"functions": [
"dwad"
]
}
}
],
"categories": [
{
"id": "workloads",
"displayName": "Workloads",
"related": {
"tables": [
"ADAssessmentRecommendation",
"ADReplicationResult",
"SQLAssessmentRecommendation",
"WorkloadMonitoringPerf"
]
}
}
]
}
}
}
}
Loading

0 comments on commit 41306c2

Please sign in to comment.