Commit de80ea1e authored by Adrien Morais's avatar Adrien Morais Committed by Kevin Duret
Browse files

ix(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 f337c913
......@@ -351,9 +351,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->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 {
......
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