diff --git a/lib/core/perfcounter/New-IcingaPerformanceCounterObject.psm1 b/lib/core/perfcounter/New-IcingaPerformanceCounterObject.psm1 index 135ee9e..5f355ac 100644 --- a/lib/core/perfcounter/New-IcingaPerformanceCounterObject.psm1 +++ b/lib/core/perfcounter/New-IcingaPerformanceCounterObject.psm1 @@ -76,7 +76,7 @@ function New-IcingaPerformanceCounterObject() try { [string]$CounterType = $this.PerfCounter.CounterType; - $CounterData.Add('value', $this.PerfCounter.NextValue()); + $CounterData.Add('value', ([math]::Round($this.PerfCounter.NextValue(), 6))); $CounterData.Add('sample', $this.PerfCounter.NextSample()); $CounterData.Add('help', $this.PerfCounter.CounterHelp); $CounterData.Add('type', $CounterType); diff --git a/lib/core/tools/Format-IcingaPerfDataValue.psm1 b/lib/core/tools/Format-IcingaPerfDataValue.psm1 index b91966a..bd8ec41 100644 --- a/lib/core/tools/Format-IcingaPerfDataValue.psm1 +++ b/lib/core/tools/Format-IcingaPerfDataValue.psm1 @@ -9,6 +9,6 @@ function Format-IcingaPerfDataValue() } # Convert our value to a string and replace ',' with a '.' to allow Icinga to parse the output - # In addition, round every output to 2 digits - return (([string]([math]::round($PerfValue, 2))).Replace(',', '.')); + # In addition, round every output to 6 digits + return (([string]([math]::round($PerfValue, 6))).Replace(',', '.')); }