microsoft.insights guestDiagnosticSettings template reference

Template format

To create a microsoft.insights/guestDiagnosticSettings resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "microsoft.insights/guestDiagnosticSettings",
  "apiVersion": "2018-06-01-preview",
  "location": "string",
  "tags": {},
  "properties": {
    "osType": "string",
    "dataSources": [
      {
        "kind": "string",
        "configuration": {
          "providers": [
            {
              "id": "string",
              "events": [
                {
                  "name": "string",
                  "id": "integer",
                  "filter": "string"
                }
              ]
            }
          ],
          "perfCounters": [
            {
              "name": "string",
              "samplingPeriod": "string",
              "instance": "string"
            }
          ],
          "eventLogs": [
            {
              "logName": "string",
              "filter": "string"
            }
          ]
        },
        "sinks": [
          {
            "kind": "string"
          }
        ]
      }
    ],
    "proxySetting": "string"
  }
}

Property values

The following tables describe the values you need to set in the schema.

microsoft.insights/guestDiagnosticSettings object

Name Type Required Value
name string Yes The name of the diagnostic setting.
type enum Yes microsoft.insights/guestDiagnosticSettings
apiVersion enum Yes 2018-06-01-preview
location string Yes Resource location
tags object No Resource tags
properties object Yes The diagnostic settings to be applied to azure resources. - GuestDiagnosticSettings object

GuestDiagnosticSettings object

Name Type Required Value
osType enum No Operating system type for the configuration. - Windows or Linux
dataSources array No the array of data source object which are configured to collect and send data - DataSource object
proxySetting string No

DataSource object

Name Type Required Value
kind enum Yes Datasource kind. - PerformanceCounter, ETWProviders, WindowsEventLogs
configuration object Yes DataSourceConfiguration object
sinks array Yes SinkConfiguration object

DataSourceConfiguration object

Name Type Required Value
providers array No ETW providers configuration - EtwProviderConfiguration object
perfCounters array No Performance counter configuration - PerformanceCounterConfiguration object
eventLogs array No Windows event logs configuration. - EventLogConfiguration object

SinkConfiguration object

Name Type Required Value
kind enum Yes EventHub, ApplicationInsights, LogAnalytics

EtwProviderConfiguration object

Name Type Required Value
id string Yes
events array Yes EtwEventConfiguration object

PerformanceCounterConfiguration object

Name Type Required Value
name string Yes
samplingPeriod string Yes
instance string No

EventLogConfiguration object

Name Type Required Value
logName string Yes
filter string No

EtwEventConfiguration object

Name Type Required Value
name string Yes
id integer Yes
filter string No