Skip to content

Commit

Permalink
Swagger for diagnostic settings and association resource types (#3295)
Browse files Browse the repository at this point in the history
* Association resource and example

* Guest diagnostic setting

* Fixing Travis CI Failure

* Fixing travis build

* Travis failures

* Travis failures

* Travis failures

* Travis failures

* Travis failures

* Review comments

* Trying out to fix linter error

* Trying out to fix linter error

* PR Comments

* Adding more examples

* Build failures

* Build failures

* Documentation fixes

* Documentation fixes

* Fixes

* Fixes

* Fixes

* Comments resolution

* Comments resolution

* Model CI Failure
  • Loading branch information
sankalpsoni authored and annatisch committed Jul 9, 2018
1 parent 662a332 commit 49901c0
Show file tree
Hide file tree
Showing 9 changed files with 1,455 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"parameters": {
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"resourceGroupName": "Default-ResourceGroup",
"diagnosticSettingsName": "SampleDiagSetting",
"api-version": "2018-06-01-preview",
"diagnosticSettings": {
"location": "Global",
"tags": {},
"properties": {
"osType": "Windows",
"dataSources": [
{
"kind": "PerformanceCounter",
"configuration": {
"perfCounters": [
{
"name": "\\Process(_Total)\\%Processor Time",
"samplingPeriod": "PT1M"
},
{
"name": "\\Process(_Total)\\Working Set",
"samplingPeriod": "PT1M"
}
]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
},
{
"kind": "ETWProviders",
"configuration": {
"providers": [
{
"name": "AuditLog",
"id": 1,
"filter": "filter exp"
},
{
"name": "TraceLog",
"id": 2
}
]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
},
{
"kind": "WindowsEventLogs",
"configuration": {
"eventLogs": [
{
"logName": "Application",
"filter": "SourceName == Xyz AND EventId = \"100\" AND $Xpath/Column=\"DCName\" = \"CatWoman\""

},
{
"logName": "Application",
"filter": "SourceName == Xyz AND EventId = \"100\" AND $Xpath/Column=\"DCName\" = \"BatMan\""
}

]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
}

]
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ResourceGroup/providers/microsoft.insights/guestDiagnosticSettings/SampleDiagSetting",
"name": "productionMachineSetting",
"type": "Microsoft.Insights/guestDiagnosticSettings",
"location": "West US",
"tags": {},
"properties": {
"osType": "Windows",
"dataSources": [
{
"kind": "PerformanceCounter",
"configuration": {
"perfCounters": [
{
"name": "\\Process(_Total)\\%Processor Time",
"samplingPeriod": "PT1M"
},
{
"name": "\\Process(_Total)\\Working Set",
"samplingPeriod": "PT1M"
}
]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
}
]
}
}
},
"201": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ResourceGroup/providers/microsoft.insights/guestDiagnosticSettings/SampleDiagSetting",
"name": "SampleDiagSetting",
"type": "Microsoft.Insights/guestDiagnosticSettings",
"location": "West US",
"tags": {},
"properties": {
"osType": "Windows",
"dataSources": [
{
"kind": "PerformanceCounter",
"configuration": {
"perfCounters": [
{
"name": "\\Process(_Total)\\%Processor Time",
"samplingPeriod": "PT1M"
},
{
"name": "\\Process(_Total)\\Working Set",
"samplingPeriod": "PT1M"
}
]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parameters": {
"resourceUri":"subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai",
"associationName": "healthSystemMachineConfigAssociation",
"api-version": "2018-06-01-preview",
"diagnosticSettingsAssociation": {
"location": "Global",
"tags": {},
"properties": {
"guestDiagnosticSettingsName": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-Association-ResourceGroup/providers/providers/microsoft.insights/guestDiagnosticSettings/vmSettingForSecurity"
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai/providers/microsoft.insights/guestDiagnosticSettingsAssociation/healthSystemMachineConfigAssociation",
"type": "Microsoft.Insights/GuestDiagnosticSettingsAssociation",
"name": "healthSystemMachineConfigAssociation",
"location": "Global",
"tags": {},
"properties": {
"guestDiagnosticSettingsName": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-Association-ResourceGroup/providers/providers/microsoft.insights/guestDiagnosticSettings/vmSettingForSecurity"
}
}
},
"201": {
"headers": {},
"body": {
"id": "/subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai/providers/microsoft.insights/guestDiagnosticSettingsAssociation/healthSystemMachineConfigAssociation",
"type": "Microsoft.Insights/GuestDiagnosticSettingsAssociation",
"name": "healthSystemMachineConfigAssociation",
"location": "Global",
"tags": {},
"properties": {
"guestDiagnosticSettingsName": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-Association-ResourceGroup/providers/providers/microsoft.insights/guestDiagnosticSettings/vmSettingForSecurity"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"resourceUri":"subscriptions/8498f01b-8064-4e37-856e-318f3c6c685f/resourceGroups/healthsystem/providers/Microsoft.Compute/virtualMachines/eastussojai",
"associationName": "healthSystemMachineConfigAssociation",
"api-version": "2018-06-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": null
},
"204": {
"headers": {},
"body": null
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
{
"parameters": {
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"resourceGroupName": "Default-ResourceGroup",
"diagnosticSettingsName": "productionMachineSetting",
"api-version": "2018-06-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ResourceGroup/providers/microsoft.insights/guestDiagnosticSettings/productionMachineSetting",
"name": "productionMachineSetting",
"type": "Microsoft.Insights/guestDiagnosticSettings",
"location": "West US",
"tags": {},
"properties": {
"osType": "windows",
"dataSources": [
{
"kind": "PerformanceCounter",
"configuration": {
"perfCounters": [
{
"name": "\\Process(_Total)\\%Processor Time",
"samplingPeriod": "PT1M"
},
{
"name": "\\Process(_Total)\\Working Set",
"samplingPeriod": "PT1M"
}
]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
},
{
"kind": "ETWProviders",
"configuration": {
"providers": [
{
"name": "AuditLog",
"id": 1,
"filter": "filter exp"
},
{
"name": "TraceLog",
"id": 2
}
]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
},
{
"kind": "WindowsEventLogs",
"configuration": {
"eventLogs": [
{
"logName": "Application",
"filter": "SourceName == Xyz AND EventId = \"100\" AND $Xpath/Column=\"DCName\" = \"CatWoman\""

},
{
"logName": "Application",
"filter": "SourceName == Xyz AND EventId = \"100\" AND $Xpath/Column=\"DCName\" = \"BatMan\""
}

]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
}

]
}
}
},
"202": {
"headers": {},
"body": {
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ResourceGroup/providers/microsoft.insights/guestDiagnosticSettings/productionMachineSetting",
"name": "productionMachineSetting",
"type": "Microsoft.Insights/guestDiagnosticSettings",
"location": "West US",
"tags": {},
"properties": {
"osType": "windows",
"dataSources": [
{
"kind": "PerformanceCounter",
"configuration": {
"perfCounters": [
{
"name": "\\Process(_Total)\\%Processor Time",
"samplingPeriod": "PT1M"
},
{
"name": "\\Process(_Total)\\Working Set",
"samplingPeriod": "PT1M"
}
]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
},
{
"kind": "ETWProviders",
"configuration": {
"providers": [
{
"name": "AuditLog",
"id": 1,
"filter": "filter exp"
},
{
"name": "TraceLog",
"id": 2
}
]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
},
{
"kind": "WindowsEventLogs",
"configuration": {
"eventLogs": [
{
"logName": "Application",
"filter": "SourceName == Xyz AND EventId = \"100\" AND $Xpath/Column=\"DCName\" = \"CatWoman\""

},
{
"logName": "Application",
"filter": "SourceName == Xyz AND EventId = \"100\" AND $Xpath/Column=\"DCName\" = \"BatMan\""
}

]
},
"sinks": [
{
"kind": "LogAnalytics"
}
]
}

]
}
}
}
}
}
Loading

0 comments on commit 49901c0

Please sign in to comment.