Data Source: azurermMonitorDataCollectionRule
Use this data source to access information about an existing Data Collection Rule.
Example Usage
import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermMonitorDataCollectionRuleExample =
new azurerm.dataAzurermMonitorDataCollectionRule.DataAzurermMonitorDataCollectionRule(
this,
"example",
{
name: "example-rule",
resource_group_name: "${azurerm_resource_group.example.name}",
}
);
new cdktf.TerraformOutput(this, "rule_id", {
value: dataAzurermMonitorDataCollectionRuleExample.id,
});
Argument Reference
-
name
- Specifies the name of the Data Collection Rule. -
resourceGroupName
- Specifies the name of the resource group the Data Collection Rule is located in.
Attributes Reference
-
id
- The ID of the Resource. -
dataFlow
- One or moredataFlow
blocks as defined below. -
destinations
- Adestinations
block as defined below. -
location
- The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. -
dataSources
- AdataSources
block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. -
description
- The description of the Data Collection Rule. -
kind
- The kind of the Data Collection Rule. Possible values arelinux
andwindows
. A rule of kindlinux
does not allow forwindowsEventLog
data sources. And a rule of kindwindows
does not allow forsyslog
data sources. If kind is not specified, all kinds of data sources are allowed. -
tags
- A mapping of tags which should be assigned to the Data Collection Rule.
A azureMonitorMetrics
block supports the following:
name
- The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.
A dataFlow
block supports the following:
-
destinations
- Specifies a list of destination names. AazureMonitorMetrics
data source only allows for stream of kindmicrosoftInsightsMetrics
. -
streams
- Specifies a list of streams. Possible values aremicrosoftEvent
,microsoftInsightsMetrics
,microsoftPerf
,microsoftSyslog
,andmicrosoftWindowsEvent
.
A dataSources
block supports the following:
-
extension
- One or moreextension
blocks as defined below. -
performanceCounter
- One or moreperformanceCounter
blocks as defined below. -
syslog
- One or moresyslog
blocks as defined below. -
windowsEventLog
- One or morewindowsEventLog
blocks as defined below.
A destinations
block supports the following:
-
azureMonitorMetrics
- AazureMonitorMetrics
block as defined above. -
logAnalytics
- One or morelogAnalytics
blocks as defined below.
A extension
block supports the following:
-
extensionName
- The name of the VM extension. -
name
- The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. -
streams
- Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values aremicrosoftEvent
,microsoftInsightsMetrics
,microsoftPerf
,microsoftSyslog
,andmicrosoftWindowsEvent
. -
extensionJson
- A JSON String which specifies the extension setting. -
inputDataSources
- Specifies a list of data sources this extension needs data from. An item should be a name of a supported data source which produces only one stream. Supported data sources type:performanceCounter
,windowsEventLog
,andsyslog
.
A logAnalytics
block supports the following:
-
name
- The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. -
workspaceResourceId
- The ID of a Log Analytic Workspace resource.
A performanceCounter
block supports the following:
-
counterSpecifiers
- Specifies a list of specifier names of the performance counters you want to collect. Use a wildcard*
to collect counters for all instances. To get a list of performance counters on Windows, run the commandtypeperf
. -
name
- The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. -
samplingFrequencyInSeconds
- The number of seconds between consecutive counter measurements (samples). The value should be integer between1
and300
inclusive. -
streams
- Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values aremicrosoftInsightsMetrics
,andmicrosoftPerf
.
A syslog
block supports the following:
-
facilityNames
- Specifies a list of facility names. Use a wildcard*
to collect logs for all facility names. Possible values areauth
,authpriv
,cron
,daemon
,kern
,lpr
,mail
,mark
,news
,syslog
,user
,uucp
,local0
,local1
,local2
,local3
,local4
,local5
,local6
,local7
,and*
. -
logLevels
- Specifies a list of log levels. Use a wildcard*
to collect logs for all log levels. Possible values aredebug
,info
,notice
,warning
,error
,critical
,alert
,emergency
,and*
. -
name
- The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.
-> Note: Syslog data source has only one possible streams value which is microsoftSyslog
.
A windowsEventLog
block supports the following:
-
name
- The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. -
streams
- Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values aremicrosoftEvent
,andmicrosoftWindowsEvent
. -
xPathQueries
- Specifies a list of Windows Event Log queries in XPath expression.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Data Collection Rule.