microsoft.insights guestDiagnosticSettings

The guestDiagnosticSettings resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a microsoft.insights/guestDiagnosticSettings resource, add the following Bicep or JSON to your template.

resource symbolicname 'microsoft.insights/guestDiagnosticSettings@2018-06-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    dataSources: [
      {
        configuration: {
          eventLogs: [
            {
              filter: 'string'
              logName: 'string'
            }
          ]
          perfCounters: [
            {
              instance: 'string'
              name: 'string'
              samplingPeriod: 'string'
            }
          ]
          providers: [
            {
              events: [
                {
                  filter: 'string'
                  id: int
                  name: 'string'
                }
              ]
              id: 'string'
            }
          ]
        }
        kind: 'string'
        sinks: [
          {
            kind: 'string'
          }
        ]
      }
    ]
    osType: 'string'
    proxySetting: 'string'
  }
}

Property values

guestDiagnosticSettings

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'microsoft.insights/guestDiagnosticSettings'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2018-06-01-preview'
name The resource name string (required)
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
properties Virtual machine diagnostic settings GuestDiagnosticSettings (required)

GuestDiagnosticSettings

Name Description Value
dataSources the array of data source object which are configured to collect and send data DataSource[]
osType Operating system type for the configuration 'Linux'
'Windows'
proxySetting string

DataSource

Name Description Value
configuration DataSourceConfiguration (required)
kind Datasource kind 'ETWProviders'
'PerformanceCounter'
'WindowsEventLogs'
sinks Array of SinkConfiguration SinkConfiguration[] (required)

DataSourceConfiguration

Name Description Value
eventLogs Windows event logs configuration. EventLogConfiguration[]
perfCounters Performance counter configuration PerformanceCounterConfiguration[]
providers ETW providers configuration EtwProviderConfiguration[]

EventLogConfiguration

Name Description Value
filter string
logName string (required)

PerformanceCounterConfiguration

Name Description Value
instance string
name string (required)
samplingPeriod string (required)

EtwProviderConfiguration

Name Description Value
events Array of EtwEventConfiguration EtwEventConfiguration[] (required)
id string (required)

EtwEventConfiguration

Name Description Value
filter string
id int (required)
name string (required)

SinkConfiguration

Name Description Value
kind 'ApplicationInsights'
'EventHub'
'LogAnalytics'