Düzenle

Aracılığıyla paylaş


Get-AzOperationalInsightsDataSource

Get datasources under Azure Log Analytics workspace.

Syntax

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

The Get-AzOperationalInsightsDataSource cmdlet gets data sources. You can specify a data source to get. You can filter the results based on the kind of data source.

Examples

Example 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"}}}]}

Get data sources.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Kind

Specifies the kind of data sources to get. The acceptable values for this parameter are:

  • AzureActivityLog
  • CustomLog
  • LinuxPerformanceObject
  • LinuxSyslog
  • WindowsEvent
  • WindowsPerformanceCounter
Type:String
Accepted values:AzureAuditLog, AzureActivityLog, CustomLog, LinuxPerformanceObject, LinuxSyslog, WindowsEvent, WindowsPerformanceCounter, ApplicationInsights, AzureAuditLog, AzureActivityLog, CustomLog, LinuxPerformanceObject, LinuxSyslog, WindowsEvent, WindowsPerformanceCounter, ApplicationInsights
Position:4
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of a data source to get.

Type:String
Position:3
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Specifies the name of a resource group that contains data sources to get.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Workspace

Specifies a workspace in which this cmdlet operates.

Type:PSWorkspace
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WorkspaceName

Specifies the name of a workspace in which this cmdlet operates.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSWorkspace

String

Outputs

PSDataSource

Notes

  • Keywords: azure, azurerm, arm, resource, management, manager, operational, insights