@@ -35,6 +35,46 @@ Azure Operational Insights can collect syslog data.
35
35
36
36
## EXAMPLES
37
37
38
+ ### Example 1: Create syslog data sources
39
+ ```
40
+ $FacilityNames = @()
41
+ $FacilityNames += 'auth'
42
+ $FacilityNames += 'authpriv'
43
+ $FacilityNames += 'cron'
44
+ $FacilityNames += 'daemon'
45
+ $FacilityNames += 'ftp'
46
+ $FacilityNames += 'kern'
47
+ $FacilityNames += 'mail'
48
+ $FacilityNames += 'syslog'
49
+ $FacilityNames += 'user'
50
+ $FacilityNames += 'uucp'
51
+ $ResourceGroupName = 'MyResourceGroup'
52
+ $WorkspaceName = 'MyWorkspaceName'
53
+
54
+ $Count = 0
55
+ foreach ($FacilityName in $FacilityNames) {
56
+ $Count++
57
+ $null = New-AzOperationalInsightsLinuxSyslogDataSource `
58
+ -ResourceGroupName $ResourceGroupName `
59
+ -WorkspaceName $WorkspaceName `
60
+ -Name "Linux-syslog-$($Count)" `
61
+ -Facility $FacilityName `
62
+ -CollectEmergency `
63
+ -CollectAlert `
64
+ -CollectCritical `
65
+ -CollectError `
66
+ -CollectWarning `
67
+ -CollectNotice `
68
+ -CollectDebug `
69
+ -CollectInformational
70
+ }
71
+
72
+ Get-AzOperationalInsightsDataSource `
73
+ -ResourceGroupName $ResourceGroupName `
74
+ -WorkspaceName $WorkspaceName `
75
+ -Kind 'LinuxSyslog'
76
+ ```
77
+
38
78
## PARAMETERS
39
79
40
80
### -CollectAlert
@@ -203,7 +243,7 @@ Accept wildcard characters: False
203
243
` ` `
204
244
205
245
### -Name
206
- Specifies a name for the data source.
246
+ 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.
207
247
208
248
` ` ` yaml
209
249
Type : System.String
0 commit comments