newdevice: basic support for Ceragon devices

This commit is contained in:
Neil Lathwood
2016-11-17 06:40:46 +00:00
committed by GitHub
13 changed files with 33165 additions and 0 deletions

View File

@@ -154,6 +154,7 @@ LibreNMS contributors:
- Matthew Wall <llawwehttam@gmail.com> (llawwehttam)
- Andres Rahn <andreser@gmail.com> (Andreser)
- Christoph Zilian <czilian@hotmail.com> (czilian)
- Guillem Mateos <bbguillem@gmail.com> (guillemmateos)
[1]: http://observium.org/ "Observium web site"
Observium was written by:

BIN
html/images/os/ceragon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -795,6 +795,14 @@ $config['os'][$os]['text'] = 'ZTE ZXR10';
$config['os'][$os]['type'] = 'network';
$config['os'][$os]['icon'] = 'zte';
// Ceragon CeraOS
$os = 'ceraos';
$config['os'][$os]['text'] = 'Ceragon CeraOS';
$config['os'][$os]['type'] = 'wireless';
$config['os'][$os]['icon'] = 'ceragon';
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Traffic';
// Cisco WAP
$os = 'ciscowap';
$config['os'][$os]['text'] = 'Cisco Wireless Acess Point';

View File

@@ -0,0 +1,5 @@
<?php
if (starts_with($sysObjectId, '.1.3.6.1.4.1.2281')) {
$os = 'ceraos';
}

View File

@@ -0,0 +1,20 @@
<?php
if ($device['os'] == 'ceraos') {
$mib = 'genEquipUnitIduTemperature.0';
$oid = ' .1.3.6.1.4.1.2281.10.1.1.9.0';
$oids = snmp_get($device, $mib, '-OsqnU', 'MWRM-UNIT-MIB');
d_echo($oids."\n");
if (!empty($oids)) {
echo ' Ceragon CeraOS Temperature ';
$divisor = 1;
$type = 'ceraos';
list(,$current) = explode(' ', $oids);
$index = $oid;
$descr = 'System Temp';
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current);
}
}

View File

@@ -0,0 +1,20 @@
<?php
if ($device['os'] == 'ceraos') {
$mib = 'genEquipUnitIduVoltageInput.0';
$oid = '.1.3.6.1.4.1.2281.10.1.1.10.0';
$oids = snmp_get($device, $mib, '-OsqnU', 'MWRM-UNIT-MIB');
d_echo($oids."\n");
if (!empty($oids)) {
echo ' Ceragon CeraOS Voltage ';
$divisor = 1;
$type = 'ceraos';
list(,$current) = explode(' ', $oids);
$index = $oid;
$descr = 'System voltage';
discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current);
}
}

View File

@@ -0,0 +1,5 @@
<?php
$hardware = snmp_get($device, 'genEquipInventoryCardName.127', '-Osqnv', 'MWRM-UNIT-MIB');
$serial = snmp_get($device, 'genEquipInventorySerialNumber.127', '-Osqnv', 'MWRM-UNIT-MIB');
$version = snmp_get($device, 'genEquipMngSwIDUVersionsRunningVersion.1', '-Osqnv', 'MWRM-UNIT-MIB');

15536
mibs/MWRM-NETWORK-MIB Executable file

File diff suppressed because it is too large Load Diff

5216
mibs/MWRM-PM-MIB Executable file

File diff suppressed because it is too large Load Diff

5521
mibs/MWRM-RADIO-MIB Executable file

File diff suppressed because it is too large Load Diff

6826
mibs/MWRM-UNIT-MIB Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -310,6 +310,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('catos');
}
public function testCeraos()
{
$this->checkOS('ceraos');
}
public function testCimc()
{
$this->checkOS('cimc');

View File

@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|High capacity packet radio outdoor unit
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.2281.1.20.2.2