From 071dd060a37ccd7e1f756ad79c00dff95fc0c587 Mon Sep 17 00:00:00 2001 From: laf Date: Sun, 24 May 2015 20:48:54 +0100 Subject: [PATCH] Added fallback for poller_group if empty --- includes/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index e72250d66..0b6b8bad1 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -526,8 +526,12 @@ function utime() function createHost($host, $community = NULL, $snmpver, $port = 161, $transport = 'udp', $v3 = array(), $poller_group='0') { + global $config; $host = trim(strtolower($host)); + if (is_numeric($poller_group) === FALSE) { + $poller_group = $config['distributed_poller_group']; + } $device = array('hostname' => $host, 'sysName' => $host, 'community' => $community,