mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added edgeos hardware info (#9867)
* added hardware info cleanup os version * allow minor revision to be larger than 9 * Update edgeos.inc.php * snmprec * Create edgeos.json
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
<?php
|
||||
|
||||
// Version is second word in sysDescr
|
||||
list(,$version) = explode(' ', $device['sysDescr']);
|
||||
list(, $version) = explode(' ', $device['sysDescr']);
|
||||
preg_match('/v[0-9]+.[0-9]+.[0-9]+/', $version, $matches);
|
||||
$version = $matches[0];
|
||||
|
||||
$hw = snmp_get($device, '.1.3.6.1.2.1.25.4.2.1.5.3818', '-Ovq');
|
||||
if (strpos('running on', $hw) === false) {
|
||||
$hw = snmp_get($device, '.1.3.6.1.2.1.25.4.2.1.5.3819', '-Ovq');
|
||||
}
|
||||
preg_match('/(?<=UBNT )(.*)(?= running on)/', $hw, $matches);
|
||||
$hardware = $matches[0];
|
||||
|
||||
$features = '';
|
||||
|
3865
tests/data/edgeos.json
Normal file
3865
tests/data/edgeos.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user