mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Improve Mikrotik RouterOS and SwOS detection (#5772)
Should fix it for good, hurray for stats.librenms.org!
This commit is contained in:
committed by
Neil Lathwood
parent
f7724d0f20
commit
27ff1950d5
@@ -12,3 +12,5 @@ register_mibs:
|
||||
ciscoAAASessionMIB: CISCO-AAA-SESSION-MIB
|
||||
poller_modules:
|
||||
wifi: 1
|
||||
discovery:
|
||||
- sysObjectId: .1.3.6.1.4.1.14988.1
|
||||
|
@@ -8,3 +8,5 @@ over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'CPU Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
discovery:
|
||||
- sysObjectId: .1.3.6.1.4.1.14988.2
|
||||
|
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (starts_with($sysDescr, 'router') && is_numeric(snmp_get($device, 'SNMPv2-SMI::enterprises.14988.1.1.4.3.0', '-Oqv', ''))) {
|
||||
$os = 'routeros';
|
||||
}
|
||||
|
||||
if (starts_with($sysDescr, 'RouterOS')) {
|
||||
$os = 'routeros';
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (str_contains($sysDescr, array('RB260GS', 'RB250GS', 'RB260GSP'))) {
|
||||
if (str_contains(snmp_get($device, 'SNMPv2-MIB::sysName.0', '-Oqv', ''), 'MikroTik')) {
|
||||
$os = 'swos';
|
||||
}
|
||||
}
|
@@ -1454,9 +1454,7 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testSwos()
|
||||
{
|
||||
$this->checkOS('swos', 'swos-rb250gs');
|
||||
$this->checkOS('swos', 'swos-rb260gs');
|
||||
$this->checkOS('swos', 'swos-rb260gsp');
|
||||
$this->checkOS('swos');
|
||||
}
|
||||
|
||||
public function testSymbol()
|
||||
|
@@ -1,2 +1,3 @@
|
||||
1.3.6.1.2.1.1.1.0|4|router
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.14988.1
|
||||
1.3.6.1.4.1.14988.1.1.4.3.0|2|1
|
||||
|
@@ -1 +1,3 @@
|
||||
1.3.6.1.2.1.1.1.0|4|RouterOS RB2011UiAS
|
||||
1.3.6.1.2.1.1.1.0|4|RouterOS RB951G-2HnD
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.14988.1
|
||||
|
||||
|
@@ -1,2 +0,0 @@
|
||||
1.3.6.1.2.1.1.1.0|4|RB250GS
|
||||
1.3.6.1.2.1.1.5.0|4|MikroTik
|
@@ -1,2 +0,0 @@
|
||||
1.3.6.1.2.1.1.1.0|4|RB260GSP
|
||||
1.3.6.1.2.1.1.5.0|4|MikroTik
|
Reference in New Issue
Block a user