Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,971 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When i created the transformation manually via Azure portal all worked but when I created it via Terraform i had this error
resource "azurerm_log_analytics_workspace" "logworkspace" {
name = "${var.resource_group_prefix}-${var.application_environment_name}${var.instance_name}-logs"
location = var.location
resource_group_name = data.azurerm_resource_group.apprg.name
sku = "PerGB2018"
retention_in_days = 30
data_collection_rule_id = "/subscriptions/000000-00000--0000-0000/resourceGroups/test/providers/Microsoft.Insights/dataCollectionRules/test-dcr"
}
resource "azurerm_monitor_data_collection_rule" "backendlogs-dcr" {
name = "${var.resource_group_prefix}-${var.application_environment_name}-dcr"
resource_group_name = data.azurerm_resource_group.apprg.name
location = var.location
#kind = "WorkspaceTransforms"
#kind = "Linux"
destinations {
log_analytics {
name = "${azurerm_log_analytics_workspace.logworkspace.name}"
workspace_resource_id = azurerm_log_analytics_workspace.logworkspace.id
}
}
data_flow {
streams = ["Microsoft-Table-AppServiceConsoleLogs"]
#destinations = ["example-destination-log"]
destinations = ["${azurerm_log_analytics_workspace.logworkspace.name}"]
output_stream = "Microsoft-AppServiceConsoleLogs"
transform_kql = "source\n| extend Context = parse_json(ResultDescription)\n| extend Thread_CF = tostring(Context.thread)\n| extend Level_CF = tostring(Context.level)\n| extend Logger_CF = tostring(Context.logger)\n| extend Message_CF = tostring(Context.message)\n| project-away Context,ResultDescription"
#"source\n| extend LL_CF = substring(ResultDescription, 12, 34)"
}