mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
Fixed duplicate '__' in Perf Data output
This commit is contained in:
parent
ec65058f76
commit
409d532ae0
1 changed files with 6 additions and 1 deletions
|
|
@ -4,6 +4,11 @@ function Format-IcingaPerfDataLabel()
|
|||
$PerfData
|
||||
);
|
||||
|
||||
$Output = ((($PerfData) -Replace ' ', '_') -Replace '[\W]', '');
|
||||
|
||||
while ($Output.Contains('__')) {
|
||||
$Output = $Output.Replace('__', '_');
|
||||
}
|
||||
# Remove all special characters and spaces on label names
|
||||
return ((($PerfData) -Replace ' ', '_') -Replace '[\W]', '');
|
||||
return $Output;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue