Fixes CPU and other performance data metrics to report proper values

This commit is contained in:
Lord Hepipud 2024-09-19 11:12:25 +02:00
parent 935e5ddf6f
commit 7ed60463a0
2 changed files with 6 additions and 3 deletions

View file

@ -14,6 +14,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
### Bugfixes
* [#752](https://github.com/Icinga/icinga-powershell-framework/pull/752) Fixes an exception for the windowseventlog feature of the Icinga Agent, in case it is not installed.
* [#755](https://github.com/Icinga/icinga-powershell-framework/pull/755) Fixes CPU and other performance data metrics to report proper values
### Enhancements

View file

@ -42,9 +42,11 @@ function New-IcingaPerformanceCounterArray()
# pre-caching / configuration handler
$CachedCounter = Get-IcingaPerformanceCounterCacheItem -Counter $Counter;
if ($null -ne $CachedCounter) {
$RequireSleep = $FALSE;
}
# Remove this for now to ensure our CPU metrics will not be cached
# and represent correct values, not exceeding 200% and beyond
#if ($null -ne $CachedCounter) {
# $RequireSleep = $FALSE;
#}
$obj = New-IcingaPerformanceCounter -Counter $counter -SkipWait $TRUE;
if ($CounterResult.ContainsKey($obj.Name()) -eq $FALSE) {