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

Commit

Permalink
fix(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 <kduret@centreon.com>

Co-authored-by: Kevin Duret <kduret@centreon.com>
  • Loading branch information
adr-mo and kduret committed Mar 31, 2021
1 parent 6b3076f commit d9b2e70
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Centreon/Domain/Monitoring/MonitoringService.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,8 @@ public function hidePasswordInServiceCommandLine(Service $monitoringService, str

$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 !== null
&& $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);
return;
Expand Down

0 comments on commit d9b2e70

Please sign in to comment.