Skip to content

Commit 66fee8b

Browse files
committed
Fix Set-LMDevice issue with logs
1 parent bb36d78 commit 66fee8b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Public/Get-LMAlert.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Function Get-LMAlert {
7676
[ValidateRange(1, 1000)]
7777
[Int]$BatchSize = 1000,
7878

79-
[String]$Sort = "resourceId"
79+
[String]$Sort = "+resourceId"
8080
)
8181
#Check if we are logged in and have valid api creds
8282
If ($Script:LMAuth.Valid) {
@@ -130,7 +130,7 @@ Function Get-LMAlert {
130130
}
131131
}
132132
}
133-
"Range" { $QueryParams = "?filter=startEpoch>:`"$StartDate`",startEpoch<:`"$EndDate`",rule:`"$Severity`",type:`"$Type`",cleared:`"$ClearedAlerts`"&size=$BatchSize&offset=$Count&sort=+resourceId" }
133+
"Range" { $QueryParams = "?filter=startEpoch>:`"$StartDate`",startEpoch<:`"$EndDate`",rule:`"$Severity`",type:`"$Type`",cleared:`"$ClearedAlerts`"&size=$BatchSize&offset=$Count&sort=$Sort" }
134134
"All" { $QueryParams = "?filter=rule:`"$Severity`",type:`"$Type`",cleared:`"$ClearedAlerts`"&size=$BatchSize&offset=$Count&sort=$Sort" }
135135
"Filter" {
136136
#List of allowed filter props

Public/Set-LMDevice.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Function Set-LMDevice {
3737

3838
[Nullable[Int]]$NetflowCollectorId,
3939

40+
[Nullable[boolean]]$EnableLogCollector,
41+
4042
[Nullable[Int]]$LogCollectorGroupId,
4143

4244
[Nullable[Int]]$LogCollectorId
@@ -90,6 +92,7 @@ Function Set-LMDevice {
9092
link = $Link
9193
netflowCollectorGroupId = $NetflowCollectorGroupId
9294
netflowCollectorId = $NetflowCollectorId
95+
isPreferredLogCollectorConfigured = $EnableLogCollector
9396
logCollectorGroupId = $LogCollectorGroupId
9497
logCollectorId = $LogCollectorId
9598
hostGroupIds = $HostGroupIds -join ","

0 commit comments

Comments
 (0)