diff --git a/doc/100-General/10-Changelog.md b/doc/100-General/10-Changelog.md index 7222b08..b5aab16 100644 --- a/doc/100-General/10-Changelog.md +++ b/doc/100-General/10-Changelog.md @@ -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 diff --git a/lib/core/perfcounter/New-IcingaPerformanceCounterArray.psm1 b/lib/core/perfcounter/New-IcingaPerformanceCounterArray.psm1 index cca4374..4ff70b8 100644 --- a/lib/core/perfcounter/New-IcingaPerformanceCounterArray.psm1 +++ b/lib/core/perfcounter/New-IcingaPerformanceCounterArray.psm1 @@ -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) {