fixed unix-agent polling bug where the called method can't be found (#11102)

This commit is contained in:
Alexander Holzapfel
2020-02-11 19:14:11 +01:00
committed by GitHub
parent c8fab3a13f
commit 286b3dc338

View File

@@ -12,8 +12,8 @@ if ($device['os_group'] == 'unix') {
}
$agent_start = microtime(true);
$polling_target = Device::pollingTarget($device['hostname']);
$agent = fsockopen($polling_target, $agent_port, $errno, $errstr, \LibreNMS\Config::get('unix-agent.connection-timeout'));
$poller_target = Device::pollerTarget($device['hostname']);
$agent = fsockopen($poller_target, $agent_port, $errno, $errstr, \LibreNMS\Config::get('unix-agent.connection-timeout'));
// Set stream timeout (for timeouts during agent fetch
stream_set_timeout($agent, \LibreNMS\Config::get('unix-agent.read-timeout'));