Added support for poller groups in discovery

This commit is contained in:
laf 2015-03-19 22:14:08 +00:00
parent a1c99a2ff4
commit e1e7f36c81

View File

@ -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);
}