Skip to content

Commit 9bbd32d

Browse files
committed
Fixes eventlog throwing unknown in valid arguments
1 parent 9ae3bfa commit 9bbd32d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/31-Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ If you are going to install this plugin release, please have a look on the [upgr
4242
* [#86](https://github.com/Icinga/icinga-powershell-plugins/pull/86) Fixes `Get-IcingaCPUCount` returns wrong count on empty arguments
4343
* [#97](https://github.com/Icinga/icinga-powershell-plugins/issues/97), [#98](https://github.com/Icinga/icinga-powershell-plugins/pull/98) Fixes invalid performance data output for `Invoke-IcingaCheckScheduledTask`
4444
* [#102](https://github.com/Icinga/icinga-powershell-plugins/pull/102), [#103](https://github.com/Icinga/icinga-powershell-plugins/pull/103) Fixes `Invoke-IcingaCheckNetworkInterface` plugins arguments being too long for Icinga Director
45+
* [#110](https://github.com/Icinga/icinga-powershell-plugins/pull/110) Fixes `Invoke-IcingaCheckEventLog` plugin throwing an unknown for valid arguments
4546

4647
## 1.2.0 (2020-08-28)
4748

provider/eventlog/Get-IcingaEventLog.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ function Get-IcingaEventLog()
4444
$After = [datetime]::Now.Subtract([TimeSpan]::FromHours(2));
4545
}
4646

47-
if ($null -ne $IncludeUsername) {
47+
if ($null -ne $IncludeUsername -And $IncludeUsername.Count -ne 0) {
4848
$EventLogArguments.Add('UserName', $IncludeUsername);
4949
}
50-
if ($null -ne $IncludeEntryType) {
50+
if ($null -ne $IncludeEntryType -And $IncludeEntryType.Count -ne 0) {
5151
$EventLogArguments.Add('EntryType', $IncludeEntryType);
5252
}
5353
if ($null -ne $After) {

0 commit comments

Comments
 (0)