From e1e7f36c81d7a5a52ab47757ce45aceec8e957fe Mon Sep 17 00:00:00 2001 From: laf Date: Thu, 19 Mar 2015 22:14:08 +0000 Subject: [PATCH] Added support for poller groups in discovery --- discovery.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/discovery.php b/discovery.php index db532afe3..e0e0a3b88 100755 --- a/discovery.php +++ b/discovery.php @@ -98,7 +98,11 @@ include("includes/sql-schema/update.php"); $discovered_devices = 0; -foreach (dbFetch("SELECT * FROM `devices` WHERE status = 1 AND disabled = 0 $where ORDER BY device_id DESC") as $device) +if ($config['distributed_poller'] === TRUE) { + $where .= " AND poller_group=?"; + $params = array($config['distributed_poller_group']); +} +foreach (dbFetch("SELECT * FROM `devices` WHERE status = 1 AND disabled = 0 $where ORDER BY device_id DESC",$params) as $device) { discover_device($device, $options); }