From f899c6f01097db14d37e72c86d12e7038857c10b Mon Sep 17 00:00:00 2001 From: Crited Date: Tue, 29 Oct 2019 15:40:35 +0100 Subject: [PATCH] Changes Performance Counter category output --- lib/core/perfcounter/Show-IcingaPerformanceCounters.psm1 | 2 +- lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/perfcounter/Show-IcingaPerformanceCounters.psm1 b/lib/core/perfcounter/Show-IcingaPerformanceCounters.psm1 index 5080aa6..2d2bb80 100644 --- a/lib/core/perfcounter/Show-IcingaPerformanceCounters.psm1 +++ b/lib/core/perfcounter/Show-IcingaPerformanceCounters.psm1 @@ -53,5 +53,5 @@ function Show-IcingaPerformanceCounters() $counters.Add('error', $_.Exception.Message); } - return $counters; + return $counters.Keys; } diff --git a/lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1 b/lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1 index 49e29e7..fdbf42b 100644 --- a/lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1 +++ b/lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1 @@ -1,6 +1,6 @@ function Get-IcingaMemoryPerformanceCounter() { - $MemoryStart = (Show-IcingaPerformanceCounters -CounterCategory 'Memory').Keys; + $MemoryStart = (Show-IcingaPerformanceCounters -CounterCategory 'Memory'); $MemoryCounter = New-IcingaPerformanceCounterArray -Counter $MemoryStart; [hashtable]$Result = @{};