mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add config settings for unix-agent time-outs.
This commit is contained in:
@@ -621,4 +621,9 @@ $config['ipmi']['type'][] = "open";
|
||||
// Options needed for dyn config - do NOT edit
|
||||
$dyn_config['email_backend'] = array('mail','sendmail','smtp');
|
||||
$dyn_config['email_smtp_secure'] = array('', 'tls', 'ssl');
|
||||
|
||||
// Unix-agent poller module config settings
|
||||
$config['unix-agent-connection-time-out'] = 10; //seconds
|
||||
$config['unix-agent-read-time-out'] = 10; //seconds
|
||||
|
||||
?>
|
||||
|
||||
@@ -10,10 +10,10 @@ if ($device['os_group'] == "unix")
|
||||
$agent_port='6556';
|
||||
|
||||
$agent_start = utime();
|
||||
$agent = fsockopen($device['hostname'], $agent_port, $errno, $errstr, 10);
|
||||
$agent = fsockopen($device['hostname'], $agent_port, $errno, $errstr, $config['unix-agent-connection-time-out'] );
|
||||
|
||||
// Set stream timeout (for timeouts during agent fetch
|
||||
stream_set_timeout($agent,10);
|
||||
stream_set_timeout($agent,$config['unix-agent-read-time-out']);
|
||||
$agentinfo = stream_get_meta_data($agent);
|
||||
|
||||
if (!$agent)
|
||||
|
||||
Reference in New Issue
Block a user