Skip to content

Commit 7781589

Browse files
authored
Merge pull request #130 from Icinga:fix/crash_on_background_service_checks
Bugfix: Fix crash on background service execution caused by missing Perf Data cache Fix crash while running services as background task to collect metrics over time by missing Performance Counter cache initialisation.
2 parents 8a99b17 + 744e21b commit 7781589

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/31-Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
1515

1616
* [#127](https://github.com/Icinga/icinga-powershell-framework/issues/127) Fixes wrong error message on failed MSSQL connection due to database not reachable by using `-IntegratedSecurity`
1717
* [#128](https://github.com/Icinga/icinga-powershell-framework/issues/128) Fixes unhandled output from loading `System.Reflection.Assembly` which can cause weird side effects for plugin outputs
18+
* [#130](https://github.com/Icinga/icinga-powershell-framework/issues/130) Fix crash while running services as background task to collect metrics over time by missing Performance Counter cache initialisation
1819

1920
## 1.2.0 (2020-08-28)
2021

icinga-powershell-framework.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ function Use-Icinga()
4343
'DebugMode' = $DebugMode;
4444
}
4545
);
46-
New-IcingaPerformanceCounterCache;
4746
} else {
4847
# This will fix the debug mode in case we are only using Libs
4948
# without any other variable content and daemon handling
@@ -57,6 +56,7 @@ function Use-Icinga()
5756
$global:IcingaDaemonData.FrameworkRunningAsDaemon = $Daemon;
5857
}
5958
}
59+
New-IcingaPerformanceCounterCache;
6060

6161
# Enable DebugMode in case it is enabled in our config
6262
if (Get-IcingaFrameworkDebugMode) {

0 commit comments

Comments
 (0)