共用方式為


Get-AzOperationalInsightsDataSource

在 Azure Log Analytics 工作區底下取得數據源。

語法

Get-AzOperationalInsightsDataSource
   [[-ResourceGroupName] <String>]
   [[-WorkspaceName] <String>]
   [-Kind] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzOperationalInsightsDataSource
   [-Workspace] <PSWorkspace>
   [[-Name] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzOperationalInsightsDataSource
   [[-Workspace] <PSWorkspace>]
   [[-Kind] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzOperationalInsightsDataSource
   [-ResourceGroupName] <String>
   [-WorkspaceName] <String>
   [-Name] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Get-AzOperationalInsightsDataSource Cmdlet 會取得數據源。 您可以指定要取得的數據來源。 您可以根據數據源的種類來篩選結果。

範例

範例 1

Get-AzOperationalInsightsDataSource -Kind CustomLog -ResourceGroupName testrg -WorkspaceName LogAnalyticsWorkspace

Name              : DataSource_CustomLog_Customlog_CL
ResourceGroupName : testrg
WorkspaceName     : LogAnalyticsWorkspace
ResourceId        : /subscriptions/xxxx-xxxx-xxxx-xxxx-xxxx/resourceGroups/testrg/providers/Microsoft.Ope
                    rationalInsights/workspaces/LogAnalyticsWorkspace/datasources/DataSource_CustomLog_Customlog_
                    CL
Kind              : CustomLog
Properties        : {"customLogName":"Customlog_CL","description":"","extractions":[{"extractionName":"TimeGenerated","
                    extractionProperties":{"dateTimeExtraction":{"joinStringRegex":null,"regex":null,"formatString":nul
                    l}},"extractionType":"DateTime"}],"inputs":[{"location":{"fileSystemLocations":{"linuxFileTypeLogPa
                    ths":null,"windowsFileTypeLogPaths":["D:\\logs.txt"]}},"recordDelimiter":{"regexDelimiter":{"matchI
                    ndex":0,"numberdGroup":null,"pattern":"\\n"}}}]}

取得數據源。

參數

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Kind

指定要取得的數據源種類。 此參數可接受的值為:

  • AzureActivityLog
  • CustomLog
  • LinuxPerformanceObject
  • LinuxSyslog
  • WindowsEvent
  • WindowsPerformanceCounter
類型:String
接受的值:AzureAuditLog, AzureActivityLog, CustomLog, LinuxPerformanceObject, LinuxSyslog, WindowsEvent, WindowsPerformanceCounter, ApplicationInsights, AzureAuditLog, AzureActivityLog, CustomLog, LinuxPerformanceObject, LinuxSyslog, WindowsEvent, WindowsPerformanceCounter, ApplicationInsights
Position:4
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

指定要取得的數據來源名稱。

類型:String
Position:3
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

指定要取得之數據來源的資源群組名稱。

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Workspace

指定此 Cmdlet 運作所在的工作區。

類型:PSWorkspace
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WorkspaceName

指定此 Cmdlet 運作所在的工作區名稱。

類型:String
Position:2
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

輸入

PSWorkspace

String

輸出

PSDataSource

備註

  • 關鍵詞:azure、azurerm、arm、resource、management、manager、operational、insights