icinga-powershell-framework/lib/core/tools/Format-IcingaPerfDataLabel.psm1
Lord Hepipud 88c12ad240 Fixed and improved Perf Data handling
* Added proper sorting for checks, packages and check results by name
* Fixed perf data formating to be supported by Icinga 2
* Fixed label naming by removing all invalid characters
* Fixed displaying of values by rounding to 2 digits on floats
2019-09-13 20:44:15 +02:00

9 lines
207 B
PowerShell

function Format-IcingaPerfDataLabel()
{
param(
$PerfData
);
# Remove all special characters and spaces on label names
return ((($PerfData) -Replace ' ', '_') -Replace '[\W]', '');
}