Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
ix(monitoring): issue with command line for meta service (#9634)
Browse files Browse the repository at this point in the history
* fix(monitoring): issue with command line for meta service

* Update src/Centreon/Domain/Monitoring/MonitoringService.php

Co-authored-by: Kevin Duret <[email protected]>

Co-authored-by: Kevin Duret <[email protected]>
  • Loading branch information
adr-mo and kduret committed Apr 1, 2021
1 parent f337c91 commit de80ea1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Centreon/Domain/Monitoring/MonitoringService.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,8 @@ public function hidePasswordInCommandLine(Service $monitoringService, string $re

$configurationCommand = $this->serviceConfiguration->findCommandLine($monitoringService->getId());
if (empty($configurationCommand)) {
// If there is no command line defined in the configuration, it's useless to continue.
$service = $this->serviceConfiguration->findService($monitoringService->getId());
if ($service->getServiceType() === \Centreon\Domain\ServiceConfiguration\Service::TYPE_META_SERVICE) {
// Meta Service case
if (preg_match('/^meta_[0-9]+$/', $monitoringService->getDescription())) {
// For META SERVICE we can define the configuration command line with the monitoring command line
$monitoringService->setCommandLine($monitoringCommand);
} else {
Expand Down

0 comments on commit de80ea1

Please sign in to comment.