Yardımcı tablo planı, Log Analytics çalışma alanınızdaki verileri düşük maliyetle almanızı ve saklamanızı sağlar.
Yardımcı tablo planının bazı kullanımlarını ve avantajlarını açıklayan bir video aşağıdadır:
Azure İzleyici Günlükleri, Azure İzleyici Agent veya Günlük alma API'si kullanarak topladığınız verileri gönderdiğiniz veri toplama kuralı (DCR) tabanlı özel tablolar için yardımcı tablo planını destekler.
Bu makalede, Log Analytics çalışma alanınızda Yardımcı planla yeni bir özel tablo oluşturma ve bu tabloya veri gönderen bir veri toplama kuralı ayarlama işlemleri açıklanmaktadır. Yardımcı plan kavramları hakkında daha fazla bilgi için bkz. Azure İzleyici Günlükleri tablo planları.
Önkoşullar
Özel tablo oluşturmak ve günlük verilerini toplamak için şunları yapmanız gerekir:
- En az katkıda bulunan haklarına sahip olduğunuz bir Log Analytics çalışma alanı.
- Veri toplama uç noktası (DCE).
- Yardımcı plan ile tablo ayarlamak yalnızca yeni tablolarda desteklenir. Yardımcı plan içeren bir tablo oluşturduktan sonra tablonun planını değiştiremezsiniz.
Uyarı
Yardımcı günlükler, Orta Katar dışındaki tüm genel bulut bölgelerinde genel kullanıma sunulur (GA) ve Azure Kamu veya Çin bulutlarında kullanılamaz.
Yardımcı plan ile özel tablo oluşturma
Azure portalında Yardımcı plan ile özel bir tablo oluşturmak için:
Log Analytics çalışma alanları menüsünde Tablolar'ı seçin.
Oluştur'i seçin.
Temel Bilgiler sekmesinde, tablo için bir ad ve isteğe bağlı olarak bir açıklama belirtin. Portal, tablo adına otomatik olarak _CL sonekini ekler.
Tablo planı'nın altında Yardımcı / Göl'e tıklayın.
İleri'yi seçin ve şemayı ve veri toplamayı yapılandırmak için kalan adımları tamamlayın. Kalan adımlarla ilgili ayrıntılı yönergeler için bkz. Azure İzleyici Günlüklerinde tablo ve sütun ekleme veya silme.
Bu işlem için ayrılmış bir Azure CLI komutu kullanılamaz. kullanarak az restREST API'yi doğrudan çağırın.
subscriptionId="aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
resourceGroupName="myResourceGroup"
workspaceName="myWorkspace"
tableName_CL="myTable_CL"
apiVersion="2025-07-01"
providers="Microsoft.OperationalInsights/workspaces/$workspaceName/tables/$tableName_CL"
resourceId="/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/$providers"
payloadFile="./my-table.json"
az account set --subscription $subscriptionId
az rest \
--method put \
--uri "$resourceId?api-version=$apiVersion" \
--body @"$payloadFile"
my-table.json dosyasını görüntülemek için genişletin.
{
"properties": {
"schema": {
"name": "myTable_CL",
"columns": [
{
"name": "TimeGenerated",
"type": "dateTime"
},
{
"name": "StringProperty",
"type": "string"
},
{
"name": "IntProperty",
"type": "int"
},
{
"name": "LongProperty",
"type": "long"
},
{
"name": "RealProperty",
"type": "real"
},
{
"name": "BooleanProperty",
"type": "boolean"
},
{
"name": "DateTimeProperty",
"type": "dateTime"
}
]
},
"totalRetentionInDays": 365,
"plan": "Auxiliary"
}
}
Bu işlem için ayrılmış Azure PowerShell cmdlet'i kullanılamaz. kullanarak Invoke-AzRestMethodREST API'yi doğrudan çağırın.
$subscriptionId = "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
$resourceGroupName = "myResourceGroup"
$workspaceName = "myWorkspace"
$tableName_CL = "myTable_CL"
$apiVersion = "2025-07-01"
$providers = "Microsoft.OperationalInsights/workspaces/$workspaceName/tables/$tableName_CL"
$resourceId = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/$providers"
$payloadFile = "./my-table.json"
Set-AzContext -Subscription $subscriptionId
$restParams = @{
Method = "PUT"
Path = "$resourceId?api-version=$apiVersion"
Payload = Get-Content -Raw -Path $payloadFile
}
Invoke-AzRestMethod @restParams
my-table.json dosyasını görüntülemek için genişletin.
{
"properties": {
"schema": {
"name": "myTable_CL",
"columns": [
{
"name": "TimeGenerated",
"type": "dateTime"
},
{
"name": "StringProperty",
"type": "string"
},
{
"name": "IntProperty",
"type": "int"
},
{
"name": "LongProperty",
"type": "long"
},
{
"name": "RealProperty",
"type": "real"
},
{
"name": "BooleanProperty",
"type": "boolean"
},
{
"name": "DateTimeProperty",
"type": "dateTime"
}
]
},
"totalRetentionInDays": 365,
"plan": "Auxiliary"
}
}
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName_CL}?api-version={apiVersion}
Authorization: Bearer {accessToken}
Content-Type: application/json
{
"properties": {
"schema": {
"name": "{tableName_CL}",
"columns": [
{"name": "TimeGenerated",
"type": "dateTime"},
{"name": "StringProperty",
"type": "string"},
{"name": "IntProperty",
"type": "int"},
{"name": "LongProperty",
"type": "long"},
{"name": "RealProperty",
"type": "real"},
{"name": "BooleanProperty",
"type": "boolean"},
{"name": "DateTimeProperty",
"type": "dateTime"}
]
},
"totalRetentionInDays": 365,
"plan": "Auxiliary"
}
}
Uyarı
- Sütun
TimeGenerated , duyarlık (mikrosaniye) için yalnızca 6 ondalık basamak içeren ISO 8601 biçimini destekler. Daha fazla bilgi için desteklenen ISO 8601 tarih saat biçimine bakın.
- Yardımcı planlı tablolar dinamik veri içeren sütunları desteklemez.
Aşağıdaki Bicep örneği, Microsoft.OperationalInsights workspaces/tables kaynak türünü kullanır.
param workspaceName string = 'myWorkspace'
param tableName_CL string = 'myTable_CL'
resource workspace 'Microsoft.OperationalInsights/workspaces@2025-07-01' existing = {
name: workspaceName
}
resource table 'Microsoft.OperationalInsights/workspaces/tables@2025-07-01' = {
parent: workspace
name: tableName_CL
properties: {
schema: {
name: tableName_CL
columns: [
{
name: 'TimeGenerated'
type: 'dateTime'
}
{
name: 'StringProperty'
type: 'string'
}
{
name: 'IntProperty'
type: 'int'
}
{
name: 'LongProperty'
type: 'long'
}
{
name: 'RealProperty'
type: 'real'
}
{
name: 'BooleanProperty'
type: 'boolean'
}
{
name: 'DateTimeProperty'
type: 'dateTime'
}
]
}
totalRetentionInDays: 365
plan: 'Auxiliary'
}
}
Aşağıdaki ARM (JSON) örneği, Microsoft.OperationalInsights workspaces/tables kaynak türünü kullanır.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspaceName": {
"type": "string",
"defaultValue": "myWorkspace"
},
"tableName_CL": {
"type": "string",
"defaultValue": "myTable_CL"
}
},
"resources": [
{
"type": "Microsoft.OperationalInsights/workspaces/tables",
"apiVersion": "2025-07-01",
"name": "[format('{0}/{1}', parameters('workspaceName'), parameters('tableName_CL'))]",
"properties": {
"schema": {
"name": "[parameters('tableName_CL')]",
"columns": [
{
"name": "TimeGenerated",
"type": "dateTime"
},
{
"name": "StringProperty",
"type": "string"
},
{
"name": "IntProperty",
"type": "int"
},
{
"name": "LongProperty",
"type": "long"
},
{
"name": "RealProperty",
"type": "real"
},
{
"name": "BooleanProperty",
"type": "boolean"
},
{
"name": "DateTimeProperty",
"type": "dateTime"
}
]
},
"totalRetentionInDays": 365,
"plan": "Auxiliary"
}
}
]
}
| Variable |
Örnek değer |
Purpose |
| host |
management.azure.com |
Örtülü ARM uç noktası |
| subscriptionId |
aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e |
Kullanıcı girişi |
| resourceGroupName |
myResourceGroup |
Kullanıcı girişi |
| workspaceName (çalışma alanı) |
myWorkspace |
Kullanıcı girişi |
| tableName_CL |
myTable_CL |
Kullanıcı girişi |
| apiVersion |
2025-07-01 |
Referans |
Yardımcı plan ile tabloya veri gönderme
Yardımcı plan ile özel bir tabloya veri almanın birden çok yolu vardır:
- Azure İzleyici Aracısı (AMA)
- Kayıtlar Alımı API'si
- Çalışma alanı dönüştürme
AMA kullan
Bu yöntemi kullanırsanız, özel tablonuzda yalnızca iki sütun olmalıdır: TimeGenerated (tür datetime) ve RawData (türünde string). Veri toplama kuralı, topladığınız her bir günlük kaydının tamamını RawData sütununa gönderir ve Azure İzleyici Günlükleri TimeGenerated sütununu, günlüğün alınma zamanı ile otomatik olarak doldurur.
AMA'yı kullanma hakkında daha fazla bilgi için aşağıdaki makalelere bakın:
Kayıt alma API'sini kullanma
Bu yöntem, Eğitici: Günlük alımı API'sini kullanarak Azure İzleyici'ye veri gönderme başlığındaki adımları yakından izler.
Bu makalede açıklandığı gibi Yardımcı plan ile özel bir tablo oluşturun.
Bir Microsoft Entra uygulaması oluşturun.
Veri koleksiyonu kuralı oluşturun. İşte kind için örnek bir ARM şablonu verilmiştir: Direct. Bu DCR türü, bir uç nokta içerdiğinden logsIngestion DCE gerektirmez.
-
myWorkspace , Log Analytics çalışma alanınızın adıdır.
-
myTable_CL tablonuzun adıdır.
-
columns , tablonun oluşturulmasında ayarladığınız sütunları içerir.
Aşağıdaki Azure CLI örnekte az monitor data-collection rule create komutu kullanılır.
subscriptionId="aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
resourceGroupName="myResourceGroup"
dataCollectionRuleName="myDataCollectionRule"
ruleFile="./my-dcr.json"
az account set --subscription "$subscriptionId"
az extension add --name monitor-control-service
az monitor data-collection rule create \
--resource-group "$resourceGroupName" \
--name "$dataCollectionRuleName" \
--rule-file "$ruleFile"
Uyarı
Azure CLI komutlar geçerli CLI bağlamından Azure Resource Manager uç noktasını kullandığından, komut söz diziminde management.azure.com belirtilmesi gerekmez.
my-dcr.json dosyasını görüntülemek için genişletin.
{
"location": "eastus",
"kind": "Direct",
"properties": {
"streamDeclarations": {
"Custom-myTable": {
"columns": [
{
"name": "TimeGenerated",
"type": "dateTime"
},
{
"name": "StringProperty",
"type": "string"
},
{
"name": "IntProperty",
"type": "int"
},
{
"name": "LongProperty",
"type": "long"
},
{
"name": "RealProperty",
"type": "real"
},
{
"name": "BooleanProperty",
"type": "boolean"
},
{
"name": "DateTimeProperty",
"type": "dateTime"
}
]
}
},
"destinations": {
"logAnalytics": [
{
"workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace",
"name": "myWorkspace"
}
]
},
"dataFlows": [
{
"streams": [
"Custom-myTable"
],
"transformKql": "source",
"destinations": [
"myWorkspace"
],
"outputStream": "Custom-myTable_CL"
}
]
}
}
Aşağıdaki PowerShell örneği New-AzDataCollectionRule cmdlet'ini kullanır.
$subscriptionId = "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
$resourceGroupName = "myResourceGroup"
$dataCollectionRuleName = "myDataCollectionRule"
$jsonFilePath = ".\my-dcr.json"
Select-AzSubscription -SubscriptionId $subscriptionId
$dataCollectionRuleParams = @{
Name = $dataCollectionRuleName
ResourceGroupName = $resourceGroupName
JsonFilePath = $jsonFilePath
}
New-AzDataCollectionRule @dataCollectionRuleParams
Uyarı
Azure PowerShell cmdlet'leri geçerli Az bağlamındaki Azure Resource Manager uç noktasını kullandığından, cmdlet söz diziminde management.azure.com belirtilmesi gerekmez.
my-dcr.json dosyasını görüntülemek için genişletin.
{
"location": "eastus",
"kind": "Direct",
"properties": {
"streamDeclarations": {
"Custom-myTable": {
"columns": [
{
"name": "TimeGenerated",
"type": "dateTime"
},
{
"name": "StringProperty",
"type": "string"
},
{
"name": "IntProperty",
"type": "int"
},
{
"name": "LongProperty",
"type": "long"
},
{
"name": "RealProperty",
"type": "real"
},
{
"name": "BooleanProperty",
"type": "boolean"
},
{
"name": "DateTimeProperty",
"type": "dateTime"
}
]
}
},
"destinations": {
"logAnalytics": [
{
"workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace",
"name": "myWorkspace"
}
]
},
"dataFlows": [
{
"streams": [
"Custom-myTable"
],
"transformKql": "source",
"destinations": [
"myWorkspace"
],
"outputStream": "Custom-myTable_CL"
}
]
}
}
Uyarı
Aşağıdaki REST çağrısı örnek değerleri kullanır.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}?api-version={apiVersion}
Authorization: Bearer {accessToken}
Content-Type: application/json
{
"location": "<location>",
"kind": "Direct",
"properties": {
"streamDeclarations": {
"<Custom-tableName>": {
"columns": [
{
"name": "TimeGenerated",
"type": "dateTime"
},
{
"name": "StringProperty",
"type": "string"
},
{
"name": "IntProperty",
"type": "int"
},
{
"name": "LongProperty",
"type": "long"
},
{
"name": "RealProperty",
"type": "real"
},
{
"name": "BooleanProperty",
"type": "boolean"
},
{
"name": "DateTimeProperty",
"type": "dateTime"
}
]
}
},
"destinations": {
"logAnalytics": [
{
"workspaceResourceId": "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.OperationalInsights/workspaces/<workspaceName>",
"name": "<workspaceName>"
}
]
},
"dataFlows": [
{
"streams": [
"<Custom-tableName>"
],
"transformKql": "source",
"destinations": [
"myWorkspace"
],
"outputStream": "<Custom-tableName_CL>"
}
]
}
}
Aşağıdaki Bicep örneği, Microsoft.Insights dataCollectionRules kaynak türünü kullanır.
@description('Specifies the name of the data collection rule to create.')
param dataCollectionRuleName string = 'myDataCollectionRule'
@description('Specifies the region in which to create the data collection rule. The must be the same region as the destination Log Analytics workspace.')
param location string = 'eastus'
@description('The Azure resource ID of the Log Analytics workspace in which you created a custom table with the Auxiliary plan.')
param workspaceResourceId string = '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace'
resource dataCollectionRule 'Microsoft.Insights/dataCollectionRules@2025-07-01' = {
name: dataCollectionRuleName
location: location
kind: 'Direct'
properties: {
streamDeclarations: {
'Custom-myTable': {
columns: [
{
name: 'TimeGenerated'
type: 'dateTime'
}
{
name: 'StringProperty'
type: 'string'
}
{
name: 'IntProperty'
type: 'int'
}
{
name: 'LongProperty'
type: 'long'
}
{
name: 'RealProperty'
type: 'real'
}
{
name: 'BooleanProperty'
type: 'boolean'
}
{
name: 'DateTimeProperty'
type: 'dateTime'
}
]
}
}
destinations: {
logAnalytics: [
{
workspaceResourceId: workspaceResourceId
name: 'myWorkspace'
}
]
}
dataFlows: [
{
streams: [
'Custom-myTable'
]
transformKql: 'source'
destinations: [
'myWorkspace'
]
outputStream: 'Custom-myTable_CL'
}
]
}
}
output dataCollectionRuleId string = dataCollectionRule.id
Aşağıdaki ARM (JSON) örneğinde Microsoft.Insights dataCollectionRules kaynak türü kullanılır.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"dataCollectionRuleName": {
"type": "string",
"defaultValue": "myDataCollectionRule",
"metadata": {
"description": "Specifies the name of the data collection rule to create."
}
},
"location": {
"type": "string",
"defaultValue": "eastus",
"metadata": {
"description": "Specifies the region in which to create the data collection rule. The must be the same region as the destination Log Analytics workspace."
}
},
"workspaceResourceId": {
"type": "string",
"defaultValue": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace",
"metadata": {
"description": "The Azure resource ID of the Log Analytics workspace in which you created a custom table with the Auxiliary plan."
}
}
},
"resources": [
{
"type": "Microsoft.Insights/dataCollectionRules",
"name": "[parameters('dataCollectionRuleName')]",
"location": "[parameters('location')]",
"apiVersion": "2025-07-01",
"kind": "Direct",
"properties": {
"streamDeclarations": {
"Custom-myTable": {
"columns": [
{
"name": "TimeGenerated",
"type": "dateTime"
},
{
"name": "StringProperty",
"type": "string"
},
{
"name": "IntProperty",
"type": "int"
},
{
"name": "LongProperty",
"type": "long"
},
{
"name": "RealProperty",
"type": "real"
},
{
"name": "BooleanProperty",
"type": "boolean"
},
{
"name": "DateTimeProperty",
"type": "dateTime"
}
]
}
},
"destinations": {
"logAnalytics": [
{
"workspaceResourceId": "[parameters('workspaceResourceId')]",
"name": "myWorkspace"
}
]
},
"dataFlows": [
{
"streams": [
"Custom-myTable"
],
"transformKql": "source",
"destinations": [
"myWorkspace"
],
"outputStream": "Custom-myTable_CL"
}
]
}
}
],
"outputs": {
"dataCollectionRuleId": {
"type": "string",
"value": "[resourceId('Microsoft.Insights/dataCollectionRules', parameters('dataCollectionRuleName'))]"
}
}
}
| Variable |
Örnek değer |
Purpose |
| host |
management.azure.com |
Örtülü ARM uç noktası |
| subscriptionId |
aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e |
Kullanıcı girişi |
| resourceGroupName |
myResourceGroup |
Kullanıcı girişi |
| dataCollectionRuleName |
myDataCollectionRule |
Kullanıcı girişi |
| location |
eastus |
Kullanıcı girişi |
| Custom-tableName |
Custom-myTable |
Kullanıcı girişi |
| Özel tableName_CL |
Özel myTable_CL |
Kullanıcı girişi |
| apiVersion |
2025-07-01 |
Referans |
Uygulamanıza DCR'nizi kullanma izni verin.
Örnek kodu kullanarak veri gönderme.
Uyarı
Azure İzleyici'un Yardımcı katmanına kayıtları alırken, 30 dakikadan uzun süreye yayılan TimeGenerated zaman damgaları içeren tek bir veri yükünü tek bir API çağrısında göndermekten kaçının. Bu API çağrısı aşağıdaki alma hata koduna RecordsTimeRangeIsMoreThan30Minutesyol açabilir. Bu, kaldırılmakta olan bilinen bir sınırlamadır.
Bu kısıtlama, dönüştürmeleri kullanan Yardımcı günlükler için geçerli değildir.
Daha fazla bilgi için aşağıdaki makalelere bakın:
İlgili içerik