diff --git a/src/Centreon/Domain/Monitoring/CommandLineTrait.php b/src/Centreon/Domain/Monitoring/CommandLineTrait.php index 7de470a386a..0e076abb00a 100644 --- a/src/Centreon/Domain/Monitoring/CommandLineTrait.php +++ b/src/Centreon/Domain/Monitoring/CommandLineTrait.php @@ -43,6 +43,9 @@ private function buildCommandLineFromConfiguration( array $macros, string $replacementValue ): string { + // if the command line contains $$ after a macro (so $$$), delete one of them to match with + // the command executed by centreon-engine + $configurationCommand = str_replace('$$$', '$$', $configurationCommand); $macroPasswordNames = []; foreach ($macros as $macro) { if ($macro->isPassword()) {