icinga-powershell-framework/lib/core/tools/Format-IcingaPerfDataLabel.psm1
2019-10-07 16:30:55 +02:00

14 lines
320 B
PowerShell

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