mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Don't run poller validations when there are no devices (#16088)
* Don't run poller validations when there are no devices * Missing import
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
namespace LibreNMS\Validations\Poller;
|
||||
|
||||
use App\Models\Device;
|
||||
use App\Models\Poller;
|
||||
use App\Models\PollerCluster;
|
||||
use LibreNMS\ValidationResult;
|
||||
@@ -54,6 +55,6 @@ class CheckActivePoller implements \LibreNMS\Interfaces\Validation
|
||||
*/
|
||||
public function enabled(): bool
|
||||
{
|
||||
return true;
|
||||
return Device::exists();
|
||||
}
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
namespace LibreNMS\Validations\Poller;
|
||||
|
||||
use App\Models\Device;
|
||||
use App\Models\Poller;
|
||||
use App\Models\PollerCluster;
|
||||
use LibreNMS\ValidationResult;
|
||||
@@ -48,7 +49,7 @@ class CheckDispatcherService implements \LibreNMS\Interfaces\Validation
|
||||
*/
|
||||
public function enabled(): bool
|
||||
{
|
||||
return true;
|
||||
return Device::exists();
|
||||
}
|
||||
|
||||
private function checkDispatchService(): ValidationResult
|
||||
|
Reference in New Issue
Block a user