mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-24 16:49:52 -05:00
parent
f496aa7184
commit
c2ad2b6564
2 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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(',', '.'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue