Commit d9b2e702 authored by Adrien Morais's avatar Adrien Morais Committed by Adrien Morais
Browse files

fix(monitoring): issue with command line for meta service (#9634)



* fix(monitoring): issue with command line for meta service

* Update src/Centreon/Domain/Monitoring/MonitoringService.php
Co-authored-by: default avatarKevin Duret <kduret@centreon.com>
Co-authored-by: default avatarKevin Duret <kduret@centreon.com>
parent 6b3076f1
......@@ -387,12 +387,8 @@ class MonitoringService extends AbstractCentreonService implements MonitoringSer
$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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment