mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: NIOS discovery (#4389)
* fix: NIOS discovery Add nios test * Add actual sysDescr string for nios
This commit is contained in:
committed by
Neil Lathwood
parent
5ef5d65458
commit
b8cc59922e
@@ -5,8 +5,10 @@ if (!$os) {
|
|||||||
'.1.3.6.1.4.1.674.10892.2',
|
'.1.3.6.1.4.1.674.10892.2',
|
||||||
'.1.3.6.1.4.1.17163.1.1',
|
'.1.3.6.1.4.1.17163.1.1',
|
||||||
'.1.3.6.1.4.1.17713.21',
|
'.1.3.6.1.4.1.17713.21',
|
||||||
'.1.3.6.1.4.1.2.3.51.3'
|
'.1.3.6.1.4.1.2.3.51.3',
|
||||||
|
'.1.3.6.1.4.1.7779.1', // nios
|
||||||
);
|
);
|
||||||
|
|
||||||
if (starts_with($sysDescr, 'Linux') && !in_array($sysObjectId, $skip_oids)) {
|
if (starts_with($sysDescr, 'Linux') && !in_array($sysObjectId, $skip_oids)) {
|
||||||
$os = 'linux';
|
$os = 'linux';
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!$os || $os === 'linux') {
|
if (!$os) {
|
||||||
if (stristr($sysObjectId, ".1.3.6.1.4.1.7779.1")) {
|
if (str_contains($sysObjectId, ".1.3.6.1.4.1.7779.1")) {
|
||||||
$os = 'nios';
|
$os = 'nios';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -117,6 +117,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->checkOS('netbotz', 'Linux', '.1.3.6.1.4.1.5528.100.20.10.2016');
|
$this->checkOS('netbotz', 'Linux', '.1.3.6.1.4.1.5528.100.20.10.2016');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testNios()
|
||||||
|
{
|
||||||
|
$this->checkOS('nios', 'Linux ns01.hepl.ch 3.14.25 #1 SMP Thu Jun 16 18:19:37 EDT 2016 x86_64', '.1.3.6.1.4.1.7779.1');
|
||||||
|
}
|
||||||
|
|
||||||
public function testPcoweb()
|
public function testPcoweb()
|
||||||
{
|
{
|
||||||
$mockSnmp = array(
|
$mockSnmp = array(
|
||||||
|
Reference in New Issue
Block a user