Skip to content

Commit df33a44

Browse files
authored
Merge pull request Azure#9852 from theheatDK/patch-7
Update New-AzOperationalInsightsLinuxSyslogDataSource.md
2 parents d588f6d + da230a8 commit df33a44

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

src/OperationalInsights/OperationalInsights/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
-->
2020
## Upcoming Release
2121
* Fixed miscellaneous typos across module
22+
* Updated documentation for `New-AzOperationalInsightsLinuxSyslogDataSource`
23+
- Added example
24+
- Updated description for `-Name` parameter
2225
* Added an example for New-AzOperationalInsightsWindowsEventDataSource
2326
* Changed the description of the -Name parameter for New-AzOperationalInsightsWindowsEventDataSource
2427

src/OperationalInsights/OperationalInsights/help/New-AzOperationalInsightsLinuxSyslogDataSource.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,46 @@ Azure Operational Insights can collect syslog data.
3535

3636
## EXAMPLES
3737

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+
3878
## PARAMETERS
3979

4080
### -CollectAlert
@@ -203,7 +243,7 @@ Accept wildcard characters: False
203243
```
204244
205245
### -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.
207247
208248
```yaml
209249
Type: System.String

0 commit comments

Comments
 (0)