Get-AzOperationalInsightsDataSource
Get datasources under Azure Log Analytics workspace.
Syntax
ByWorkspaceNameByKind (Default)
Get-AzOperationalInsightsDataSource
[[-ResourceGroupName] <String>]
[[-WorkspaceName] <String>]
[-Kind] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByWorkspaceObjectByName
Get-AzOperationalInsightsDataSource
[-Workspace] <PSWorkspace>
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByWorkspaceObjectByKind
Get-AzOperationalInsightsDataSource
[[-Workspace] <PSWorkspace>]
[[-Kind] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByWorkspaceNameByName
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
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Kind
Specifies the kind of data sources to get.
The acceptable values for this parameter are:
AzureActivityLog
CustomLog
LinuxPerformanceObject
LinuxSyslog
WindowsEvent
WindowsPerformanceCounter
Parameter properties
Type: String
Default value: None
Accepted values: AzureAuditLog, AzureActivityLog, CustomLog, LinuxPerformanceObject, LinuxSyslog, WindowsEvent, WindowsPerformanceCounter, ApplicationInsights
Supports wildcards: False
DontShow: False
Parameter sets
ByWorkspaceNameByKind
Position: 4
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Name
Specifies the name of a data source to get.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByWorkspaceObjectByName
Position: 3
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Specifies the name of a resource group that contains data sources to get.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByWorkspaceNameByKind
Position: 1
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Workspace
Specifies a workspace in which this cmdlet operates.
Parameter properties
Type: PSWorkspace
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByWorkspaceObjectByName
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-WorkspaceName
Specifies the name of a workspace in which this cmdlet operates.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByWorkspaceNameByKind
Position: 2
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs
Notes
Keywords: azure, azurerm, arm, resource, management, manager, operational, insights