共用方式為


Azure 監視器中的數據收集規則 (DCR) 範例

本文包含 Azure 監視器中常見數據收集案例的範例 數據收集規則 (DCR) 定義。 您可以視您的環境需要修改這些 DCR 定義,並使用建立或編輯資料收集規則中的指引來建立 DCR。 您也可以使用這些範例中的基本策略,為其他案例建立 DCR。

這些範例需要瞭解 DCR 結構,如 Azure 監視器中數據收集規則的結構中所述。 您可以藉由 Azure 入口網站設定幾項,無需具備任何 DCR 結構的詳細知識。 如果您想要使用 AZURE 入口網站外部的方法來管理 DCR,例如 ARM、CLI 和 PowerShell,請使用這些範例作為起點。 您可能需要使用這些方法來編輯現有的 DCR,以實現進階功能,例如轉換功能。

這些範例都著重於特定數據源,不過您可以在單一 DCR 中結合多個不同類型的數據源。 包含每項的資料流,以將資料傳送至適當的目的地。 在單一 DCR 中結合多個數據源,或為每個數據源建立個別 DCR 之間沒有功能差異。 選擇取決於您管理及監視數據收集的需求。

備註

本文所示的範例提供建立 DCR 所需的來源 JSON。 建立之後,DCR 會有額外的屬性,如 Azure 監視器中資料收集規則的結構所述

收集 VM 用戶端數據

下列範例顯示 DCR 定義,以使用 Azure 監視器代理程式從虛擬機收集不同類型的數據。 您可以使用 Azure 入口網站建立這些 DCR,如 使用 Azure 監視器從 VM 用戶端收集數據中所述。

Windows 事件

Windows 事件的 DCR 使用 windowsEventLogs 資料來源搭配 Microsoft-Event 傳入資料流。 此數據流的架構是已知的,因此不需要在 dataSources 區段中定義。 要收集的事件會在屬性中 xPathQueries 指定。 如需使用 XPath 來篩選您想要收集的特定數據,請參閱 使用 Azure 監視器代理程式 收集 Windows 事件。 若要開始使用,您可以使用該文章中的指引,使用 Azure 入口網站 建立 DCR,然後使用 DCR 定義中的指引來檢查 JSON。

您可以將轉換新增至 dataFlows 屬性以應用在計算資料行上並進一步篩選資料,但應該儘可能使用 XPath 來篩選代理程式上的資料,以提高效率並避免潛在的擷取費用。

下列範例 DCR 會執行下列動作:

  • 收集具有警告、錯誤或重大錯誤層級的 Windows 應用程式和系統事件。
  • 將數據傳送至工作區中的事件數據表。
  • 會使用 source 的簡單轉換,不會改變傳入資料。
{
    "location": "eastus",
    "properties": {
      "dataSources": {
        "windowsEventLogs": [
          {
            "name": "eventLogsDataSource",
            "streams": [
              "Microsoft-Event"
            ],
            "xPathQueries": [
              "System!*[System[(Level = 1 or Level = 2 or Level = 3)]]",
              "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"
            ]
          }
        ]
    },
      "destinations": {
        "logAnalytics": [
          {
            "workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace",
            "name": "centralWorkspace"
          }
        ]
      },
      "dataFlows": [
        {
          "streams": [
            "Microsoft-Event"
          ],
          "destinations": [
            "centralWorkspace"
          ],
            "transformKql": "source",
            "outputStream": "Microsoft-Event"
        }
      ]
    }
  }

Syslog 事件

Syslog 事件的 DCR 使用 syslog 資料來源搭配傳入的 Microsoft-Syslog 資料流。 此數據流的架構是已知的,因此不需要在 dataSources 區段中定義。 要收集的事件會在 facilityNameslogLevels 屬性中指定。 如需詳細資訊,請參閱 使用 Azure 監視器代理程式 收集 Syslog 事件。 若要開始使用,您可以使用該文章中的指引,使用 Azure 入口網站 建立 DCR,然後使用 DCR 定義中的指引來檢查 JSON。

您可以為 dataFlows 屬性新增轉換,以增加額外功能及進一步篩選數據,但應盡可能使用 facilityNameslogLevels 來提高篩選效率,以避免可能產生的擷取費用。

下列範例 DCR 會執行下列動作:

  • cron 設施收集所有事件。
  • Warningsyslog 設施收集 daemon 及更高事件。
  • 將數據傳送至工作區中的 Syslog 數據表。
  • 會使用 source 的簡單轉換,不會改變傳入資料。
{
    "location": "eastus",
    "properties": {
      "dataSources": {
        "syslog": [
          {
            "name": "cronSyslog",
            "streams": [
              "Microsoft-Syslog"
            ],
            "facilityNames": [
              "cron"
            ],
            "logLevels": [
              "Debug",
              "Info",
              "Notice",
              "Warning",
              "Error",
              "Critical",
              "Alert",
              "Emergency"
            ]
          },
          {
            "name": "syslogBase",
            "streams": [
              "Microsoft-Syslog"
            ],
            "facilityNames": [
              "daemon",
              "syslog"
            ],
            "logLevels": [
              "Warning",
              "Error",
              "Critical",
              "Alert",
              "Emergency"
            ]
          }
        ]
      },
      "destinations": {
        "logAnalytics": [
          {
            "workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace",
            "name": "centralWorkspace"
          }
        ]
      },
      "dataFlows": [
        {
          "streams": [
            "Microsoft-Syslog"
          ],
          "destinations": [
            "centralWorkspace"
          ],
            "transformKql": "source",
            "outputStream": "Microsoft-Syslog"
        }
      ]
    }
  }

效能計數器

效能資料的 DCR 使用 performanceCounters 資料來源,搭配傳入的 Microsoft-InsightsMetricsMicrosoft-Perf 資料流。 Microsoft-InsightsMetrics 用來將數據傳送至 Azure 監視器計量,而 Microsoft-Perf 用來將數據傳送至 Log Analytics 工作區。 如果您要將效能數據傳送至這兩個目的地,您可以將這兩個數據源包含在 DCR 中。 這些數據流的架構是已知的,因此不需要在 dataSources 區段中定義它們。

要收集的性能計數器會在屬性中 counterSpecifiers 指定。 如需詳細資訊,請參閱 使用 Azure 監視器代理程式 收集性能計數器。 若要開始使用,您可以使用該文章中的指引,使用 Azure 入口網站 建立 DCR,然後使用 DCR 定義中的指引來檢查 JSON。

您可以為 dataFlows 將轉換新增至 Microsoft-Perf 屬性以增強功能並進一步篩選資料,但您應該只選取 counterSpecifiers 中所需的計數器,以提高效率,並避免潛在的擷取費用。

下列範例 DCR 會執行下列動作:

  • 每隔 60 秒收集一組性能計數器,每 30 秒再收集一組性能計數器。
  • 將數據傳送至 Azure 監視器計量和 Log Analytics 工作區。
  • 會使用 source 的簡單轉換,不會改變傳入資料。
{
    "location": "eastus",
    "properties": {
      "dataSources": {
        "performanceCounters": [
          {
            "name": "perfCounterDataSource60",
            "streams": [
              "Microsoft-Perf",
              "Microsoft-InsightsMetrics"
            ],
            "samplingFrequencyInSeconds": 60,
            "counterSpecifiers": [
              "\\Processor(_Total)\\% Processor Time",
              "\\Memory\\Committed Bytes",
              "\\LogicalDisk(_Total)\\Free Megabytes",
              "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"
            ]
          },
          {
            "name": "perfCounterDataSource30",
            "streams": [
              "Microsoft-Perf"
            ],
            "samplingFrequencyInSeconds": 30,
            "counterSpecifiers": [
              "\\Process(_Total)\\Thread Count"
            ]
          }
        ]
      },
      "destinations": {
        "logAnalytics": [
          {
            "workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace",
            "name": "centralWorkspace"
          }
        ],
        "azureMonitorMetrics": 
        {
            "name": "azureMonitorMetrics-default"
        }
      },
      "dataFlows": [
        {
            "streams": [
                "Microsoft-Perf"
            ],
            "destinations": [
                "centralWorkspace"
            ],
            "transformKql": "source",
            "outputStream": "Microsoft-Perf"
        },
        {
            "streams": [
                "Microsoft-Perf"
            ],
            "destinations": [
                "azureMonitorMetrics-default"
            ],
            "outputStream": "Microsoft-InsightsMetrics"
        }
      ]
    }
}

文字記錄

文字記錄的 DCR 具有 logfiles 數據來源,其中包含代理程式應該收集之記錄檔的詳細數據。 這包括必須在 streamDeclarations 中使用傳入數據的列來定義的數據流名稱。 目前這是一個設定清單,如 [使用 Azure 監視器代理程式從文字檔收集記錄] 中所述。

將轉換新增至 dataFlows 屬性,以篩選出您不想收集的記錄,並格式化數據以符合目的地數據表的架構。 常見的案例是將分隔的記錄檔剖析成多個數據行,如分隔記錄檔中所述

下列範例 DCR 會執行下列動作:

  • 從代理程式電腦 .txt 資料夾中副檔名為 c:\logs 的所有檔案,收集專案。
  • 使用轉換,根據逗號(,)分隔符將數據分割成列。 此轉換專屬於記錄檔的格式,而且必須針對具有其他格式的記錄檔進行調整。
  • 將收集的記錄傳送至稱為的 MyTable_CL自訂數據表。 此數據表必須已經存在,且具有轉換過程中輸出的欄位。
  • 收集FilePathComputer作為文字記錄檔,詳情如傳入數據流中所述。 這些數據行也必須存在於目的地數據表中。
{
    "location": "eastus",
    "properties": {
        "dataCollectionEndpointId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/Microsoft.Insights/dataCollectionEndpoints/my-dce",
        "streamDeclarations": {
            "Custom-MyLogFileFormat": {
                "columns": [
                    {
                        "name": "TimeGenerated",
                        "type": "datetime"
                    },
                    {
                        "name": "RawData",
                        "type": "string"
                    },
                    {
                        "name": "FilePath",
                        "type": "string"
                    },
                    {
                        "name": "Computer",
                        "type": "string"
                    }
                ]
            }
        },
        "dataSources": {
            "logFiles": [
                {
                    "streams": [
                        "Custom-MyLogFileFormat"
                    ],
                    "filePatterns": [
                        "C:\\logs\\*.txt"
                    ],
                    "format": "text",
                    "settings": {
                        "text": {
                            "recordStartTimestampFormat": "ISO 8601"
                        }
                    },
                    "name": "myLogFileFormat-Windows"
                }
            ]
        },
        "destinations": {
            "logAnalytics": [
                {
                    "workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace",
                    "name": "MyDestination"
                }
            ]
        },
        "dataFlows": [
            {
                "streams": [
                    "Custom-MyLogFileFormat"
                ],
                "destinations": [
                    "MyDestination"
                ],
                "transformKql": "source | project d = split(RawData,\",\") | project TimeGenerated=todatetime(d[0]), Code=toint(d[1]), Severity=tostring(d[2]), Module=tostring(d[3]), Message=tostring(d[4])",
                "outputStream": "Custom-MyTable_CL"
            }
        ]
    }
}

JSON 記錄

Json 記錄的 DCR 具有 logfiles 數據來源,其中包含代理程式應該收集之記錄檔的詳細數據。 這包括必須在 streamDeclarations 中使用傳入數據的列來定義的數據流名稱。 如需詳細資訊,請參閱 使用 Azure 監視器代理程式 從 JSON 檔案收集記錄。

將轉換新增至 dataFlows 屬性,以篩選出您不想收集的記錄,並格式化數據以符合目的地數據表的架構。

下列範例 DCR 會執行下列動作:

  • 從代理程式電腦 .json 資料夾中副檔名為 c:\logs 的所有檔案,收集專案。 檔案必須以 json 格式化,並具有數據流宣告中列出的數據行。
  • 將收集的記錄傳送至稱為的 MyTable_CL自訂數據表。 此數據表必須已經存在,而且具有與傳入數據流相同的數據行。 如果資料行不相符,您需要修改 transformKql 屬性中的轉換,以便格式化目標資料表的資料。
{
    "location": "eastus",
    "properties": {
        "dataCollectionEndpointId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/Microsoft.Insights/dataCollectionEndpoints/my-dce",
        "streamDeclarations": {
            "Custom-Json-stream": {
                "columns": [
                    {
                        "name": "TimeGenerated",
                        "type": "datetime"
                    },
                    {
                        "name": "FilePath",
                        "type": "string"
                    },
                    {
                        "name": "Code",
                        "type": "int"
                    },
                    {
                        "name": "Module",
                        "type": "string"
                    },
                    {
                        "name": "Message",
                        "type": "string"
                    }
                ]
            }
        },
        "dataSources": {
            "logFiles": [
                {
                    "streams": [
                        "Custom-Json-stream"
                    ],
                    "filePatterns": [
                        "C:\\logs\\*.json"
                    ],
                    "format": "json",
                    "name": "MyJsonFile"
                }
            ]
        },
        "destinations": {
            "logAnalytics": [
                {
                    "workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace",
                    "name": "MyDestination"
                }
            ]
        },
        "dataFlows": [
            {
                "streams": [
                    "Custom-Json-stream"
                ],
                "destinations": [
                    "MyDestination"
                ],
                "transformKql": "source",
                "outputStream": "Custom-MyTable_CL"
            }
        ]
    }
}

將數據傳送至事件中樞或記憶體

將數據傳送至事件中樞或記憶體帳戶的 DCR 會使用與使用 Azure 監視器代理程式 (AMA) 收集數據的其他 DCR 使用相同的數據源,但具有下列一或多個目的地。 如需詳細資訊,請參閱將數據傳送至事件中樞和記憶體(預覽)。

  • eventHubsDirect
  • storageBlobsDirect
  • storageTablesDirect

備註

將數據傳送至事件中樞或記憶體帳戶的 DCR 必須具有 "kind": "AgentDirectToStore"

下列範例 DCR 會執行下列動作:

  • 從具有 Azure 監視器代理程式 (AMA) 的 Windows 電腦中收集效能計數器和 Windows 事件。
  • 將數據傳送至事件中樞、Blob 記憶體和數據表記憶體。
{
    "location": "eastus",
    "kind": "AgentDirectToStore",
    "properties": {
        "dataSources": {
            "performanceCounters": [
                {
                "streams": [
                    "Microsoft-Perf"
                ],
                "samplingFrequencyInSeconds": 10,
                "counterSpecifiers": [
                    "\\Process(_Total)\\Working Set - Private",
                    "\\Memory\\% Committed Bytes In Use",
                    "\\LogicalDisk(_Total)\\% Free Space",
                    "\\Network Interface(*)\\Bytes Total/sec"
                ],
                "name": "perfCounterDataSource"
                }
            ],
            "windowsEventLogs": [
                {
                "streams": [
                    "Microsoft-Event"
                ],
                "xPathQueries": [
                    "Application!*[System[(Level=2)]]",
                    "System!*[System[(Level=2)]]"
                ],
                "name": "eventLogsDataSource"
                }
            ]
        },
        "destinations": {
            "eventHubsDirect": [
                {
                "eventHubResourceId": "/subscriptions/71b36fb6-4fe4-4664-9a7b-245dc62f2930/resourceGroups/my-resource-group/providers/Microsoft.EventHub/namespaces/my-eventhub-namespace/eventhubs/my-eventhub",
                "name": "myEh"
                }
            ],
            "storageBlobsDirect": [
                {
                "storageAccountResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourcegroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
                "containerName": "myperfblob",
                "name": "PerfBlob"
                },
                {
                "storageAccountResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourcegroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
                "containerName": "myeventblob",
                "name": "EventBlob"
                }
            ],
            "storageTablesDirect": [
                {
                "storageAccountResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourcegroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
                "containerName": "myperftable",
                "name": "PerfTable"
                },
                {
                "storageAccountResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourcegroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
                "containerName": "mymyeventtable",
                "name": "EventTable"
                }
            ]
        },
        "dataFlows": [
            {
                "streams": [
                "Microsoft-Perf"
                ],
                "destinations": [
                "myEh",
                "PerfBlob",
                "PerfTable"
                ]
            },
            {
                "streams": [
                "Microsoft-Event"
                ],
                "destinations": [
                "myEh",
                "EventBlob",
                "EventTable"
                ]
            },
        ]
    }
}

記錄擷取 API

記錄擷取 API 的 DCR 必須在 DCR 定義的 streamDeclarations 區段中定義傳入資料流的結構描述。 傳入的數據必須使用 JSON 格式,且架構符合此定義中的數據行。 如果這個架構符合目標數據表的架構,則不需要轉換。 如果架構不相符,您必須將轉換新增至dataFlows屬性,以格式化數據。 如需詳細資訊,請參閱 Azure 監視器 中的記錄擷取 API。

下列範例 DCR 具有下列詳細資料:

  • 將數據傳送至工作區MyTable_CL中名為my-workspace的數據表。 安裝此 DCR 之前,您必須使用下列資料列建立資料表:
    • TimeGenerated
    • 計算機
    • AdditionalContext
    • ExtendedColumn (定義於轉換中)
  • 轉換 套用至傳入數據,以格式化目標數據表的數據。

這很重要

此範例不包含dataCollectionEndpointId屬性,因為在建立 DCR 時會自動生成該屬性。 您需要這個屬性的值,因為它是應用程式將傳送數據的URL。 DCR 必須有 kind:Direct,才能建立這個屬性。 如需詳細資訊,請參閱 屬性

{
    "location": "eastus",
    "kind": "Direct",
    "properties": {
        "streamDeclarations": {
            "Custom-MyTable": {
                "columns": [
                    {
                        "name": "Time",
                        "type": "datetime"
                    },
                    {
                        "name": "Computer",
                        "type": "string"
                    },
                    {
                        "name": "AdditionalContext",
                        "type": "string"
                    }
                ]
            }
        },
        "destinations": {
            "logAnalytics": [
                {
                    "workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace",
                    "name": "LogAnalyticsDest"
                }
            ]
        },
        "dataFlows": [
            {
                "streams": [
                    "Custom-MyTable"
                ],
                "destinations": [
                    "LogAnalyticsDest"
                ],
                "transformKql": "source | extend jsonContext = parse_json(AdditionalContext) | project TimeGenerated = Time, Computer, AdditionalContext = jsonContext, ExtendedColumn=tostring(jsonContext.CounterName)",
                "outputStream": "Custom-MyTable_CL"
            }
        ]
    }
}

工作區轉換 DCR

工作區轉換 DCR 的 datasources 區段為空白,因為轉換會套用至任何傳送至工作區中已支援表格的數據。 它必須只包含一個 workspaceResourceId 項目,且每個含有轉換的數據表必須在 dataFlows 中包含一個項目。 它也必須有 "kind": "WorkspaceTransforms"

下列範例 DCR 具有下列詳細資料:

  • LAQueryLogs 資料表的轉換,會篩選掉資料表本身的查詢,並新增具有工作區名稱的資料行。
  • Event 資料表的轉換,會篩選掉資訊事件並移除 ParameterXml資料行。 這僅適用於來自已被取代的 Log Analytics 代理程式的數據,不包括 Azure 監視器代理程式,如工作區轉換 DCR中所述。
{
    "kind": "WorkspaceTransforms",
    "location": "eastus",
    "properties": {
        "dataSources": {},
        "destinations": {
            "logAnalytics": [
                {
                    "workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace",
                    "name": "clv2ws1"
                }
            ]
        },
        "dataFlows": [
            {
                "streams": [
                    "Microsoft-Table-LAQueryLogs"
                ],
                "destinations": [
                    "clv2ws1"
                ],
                "transformKql": "source | where QueryText !contains 'LAQueryLogs' | extend Context = parse_json(RequestContext) | extend Workspace_CF = tostring(Context['workspaces'][0]) | project-away RequestContext, Context"
            },
            {
                "streams": [
                    "Microsoft-Table-Event"
                ],
                "destinations": [
                    "clv2ws1"
                ],
                "transformKql": "source | where EventLevelName in ('Error', 'Critical', 'Warning') | project-away ParameterXml"
            }
        ]
    }
}

將數據傳送至多個數據表

您可能想要將資料從單一數據源傳送至相同 Log Analytics 工作區中的多個數據表的原因有很多,包括:

  • 將偶爾用於疑難排解的記錄傳送至 基本記錄數據表,以節省導入成本。
  • 將具有敏感數據的記錄或數據行傳送至具有不同許可權或保留設定的數據表。

若要將數據從單一數據源傳送至多個數據表,請在 DCR 中建立多個數據流,並針對每個數據表建立唯一的轉換查詢和輸出數據表,如下圖所示。

這很重要

目前,DCR 中的資料表必須位於相同的Log Analytics工作區中。 若要從單一資料來源傳送至多個工作區,請使用多個 DCR,並設定您的應用程式將資料傳送至每個工作區。

顯示將資料傳送至多個資料表之轉換的圖表。

下列範例會篩選 Azure 監視器代理程式傳送至事件數據表的記錄。 只有警告和錯誤事件會傳送至事件數據表。 其他事件會傳送至名為 Event_CL 的事件數據表複本,而該複本已針對基本記錄進行設定。

備註

此範例需要在同一個名為 Event_CL 的工作區中建立的事件數據表複本。

{
    "location": "eastus",
    "properties": {
        "dataSources": {
            "windowsEventLogs": [
              {
                "name": "eventLogsDataSource",
                "streams": [
                  "Microsoft-Event"
                ],
                "xPathQueries": [
                  "System!*[System[(Level = 1 or Level = 2 or Level = 3)]]",
                  "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"
                ]
              }
            ]
        },
        "destinations": {
            "logAnalytics": [
                {
                    "workspaceResourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace",
                    "name": "MyDestination"
                }
            ]
        },
        "dataFlows": [
            {
                "streams": [
                    "Microsoft-Event"
                ],
                "destinations": [
                    "MyDestination"
                ],
                "transformKql": "source | where EventLevelName in ('Error', 'Warning')",
                "outputStream": "Microsoft-Event"
            },
            {
                "streams": [
                    "Microsoft-Event"
                ],
                "destinations": [
                    "MyDestination"
                ],
                "transformKql": "source | where EventLevelName !in ('Error', 'Warning')",
                "outputStream": "Custom-Event_CL"
            }
        ]
    }
}

後續步驟