mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Added fallback for poller_group if empty
This commit is contained in:
		@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user