diff --git a/LibreNMS/Poller.php b/LibreNMS/Poller.php index 869275241d25..c1ae1413ea15 100644 --- a/LibreNMS/Poller.php +++ b/LibreNMS/Poller.php @@ -226,7 +226,18 @@ private function saveModulePerformance(string $module, float $start_time, int $s private function isModuleManuallyEnabled(string $module): ?bool { - return empty($this->module_override) ? null : in_array($module, $this->module_override); + if (empty($this->module_override)) { + return null; + } + + foreach ($this->module_override as $override) { + [$override_module] = explode('/', $override); + if ($module == $override_module) { + return true; + } + } + + return false; } private function buildDeviceQuery(): Builder diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 7c7f5a3c9614..eefdbd96b0f3 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -128,13 +128,13 @@ function discover_device(&$device, $force_module = false) return false; } - $discovery_devices = Config::get('discovery_modules', []); + $discovery_modules = ['core' => true] + Config::get('discovery_modules', []); /** @var \App\Polling\Measure\MeasurementManager $measurements */ $measurements = app(\App\Polling\Measure\MeasurementManager::class); $measurements->checkpoint(); // don't count previous stats - foreach ($discovery_devices as $module => $module_status) { + foreach ($discovery_modules as $module => $module_status) { $os_module_status = Config::getOsSetting($device['os'], "discovery_modules.$module"); d_echo('Modules status: Global' . (isset($module_status) ? ($module_status ? '+ ' : '- ') : ' ')); d_echo('OS' . (isset($os_module_status) ? ($os_module_status ? '+ ' : '- ') : ' '));