mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #3823 from laf/device-type-discovery
This commit is contained in:
@@ -103,6 +103,13 @@ function discover_device($device, $options = null) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set type to a predefined type for the OS if it's not already set
|
||||||
|
if ($device['type'] == 'unknown' || $device['type'] == '') {
|
||||||
|
if ($config['os'][$device['os']]['type']) {
|
||||||
|
$device['type'] = $config['os'][$device['os']]['type'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($config['os'][$device['os']]['group']) {
|
if ($config['os'][$device['os']]['group']) {
|
||||||
$device['os_group'] = $config['os'][$device['os']]['group'];
|
$device['os_group'] = $config['os'][$device['os']]['group'];
|
||||||
echo ' (' . $device['os_group'] . ')';
|
echo ' (' . $device['os_group'] . ')';
|
||||||
@@ -142,13 +149,6 @@ function discover_device($device, $options = null) {
|
|||||||
register_mibs($device, $devicemib, "includes/discovery/functions.inc.php");
|
register_mibs($device, $devicemib, "includes/discovery/functions.inc.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set type to a predefined type for the OS if it's not already set
|
|
||||||
if ($device['type'] == 'unknown' || $device['type'] == '') {
|
|
||||||
if ($config['os'][$device['os']]['type']) {
|
|
||||||
$device['type'] = $config['os'][$device['os']]['type'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$device_end = microtime(true);
|
$device_end = microtime(true);
|
||||||
$device_run = ($device_end - $device_start);
|
$device_run = ($device_end - $device_start);
|
||||||
$device_time = substr($device_run, 0, 5);
|
$device_time = substr($device_run, 0, 5);
|
||||||
|
|||||||
Reference in New Issue
Block a user