New-AzOperationalInsightsLinuxSyslogDataSource
Adds a data source to Linux computers.
Syntax
ByWorkspaceName (Default)
New-AzOperationalInsightsLinuxSyslogDataSource
[-ResourceGroupName] <String>
[-WorkspaceName] <String>
[-Name] <String>
[-Facility] <String>
[-CollectEmergency]
[-CollectAlert]
[-CollectCritical]
[-CollectError]
[-CollectWarning]
[-CollectNotice]
[-CollectDebug]
[-CollectInformational]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByWorkspaceObject
New-AzOperationalInsightsLinuxSyslogDataSource
[-Workspace] <PSWorkspace>
[-Name] <String>
[-Facility] <String>
[-CollectEmergency]
[-CollectAlert]
[-CollectCritical]
[-CollectError]
[-CollectWarning]
[-CollectNotice]
[-CollectDebug]
[-CollectInformational]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzOperationalInsightsLinuxSyslogDataSource cmdlet adds a syslog data source to connected Linux computers in a workspace.
Azure Operational Insights can collect syslog data.
Examples
Example 1: Create syslog data sources
$FacilityNames = @()
$FacilityNames += 'auth'
$FacilityNames += 'authpriv'
$FacilityNames += 'cron'
$FacilityNames += 'daemon'
$FacilityNames += 'ftp'
$FacilityNames += 'kern'
$FacilityNames += 'mail'
$FacilityNames += 'syslog'
$FacilityNames += 'user'
$FacilityNames += 'uucp'
$ResourceGroupName = 'MyResourceGroup'
$WorkspaceName = 'MyWorkspaceName'
$Count = 0
foreach ($FacilityName in $FacilityNames) {
$Count++
$null = New-AzOperationalInsightsLinuxSyslogDataSource `
-ResourceGroupName $ResourceGroupName `
-WorkspaceName $WorkspaceName `
-Name "Linux-syslog-$($Count)" `
-Facility $FacilityName `
-CollectEmergency `
-CollectAlert `
-CollectCritical `
-CollectError `
-CollectWarning `
-CollectNotice `
-CollectDebug `
-CollectInformational
}
Get-AzOperationalInsightsDataSource `
-ResourceGroupName $ResourceGroupName `
-WorkspaceName $WorkspaceName `
-Kind 'LinuxSyslog'
Adds a syslog data source to connected Linux computers in a workspace.
Azure Operational Insights can collect syslog data.
Parameters
-CollectAlert
Indicates that Operational Insights collects alert messages.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CollectCritical
Indicates that Operational Insights collects critical messages.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CollectDebug
Indicates that Operational Insights collects debug messages.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CollectEmergency
Indicates that Operational Insights collects emergency messages.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CollectError
Indicates that Operational Insights collects error messages.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Indicates that Operational Insights collects informational messages.
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CollectNotice
Indicates that Operational Insights collects notice messages.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CollectWarning
Indicates that the syslog includes warning messages.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
-Facility
Specifies a facility code.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 4
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Specifies a name for the data source. The name is not exposed in the Azure Portal and any string can be used as long as it is unique.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
Specifies the name of a resource group that contains Linux computers.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByWorkspaceName
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
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
ByWorkspaceObject
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
ByWorkspaceName
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
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