mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: basic support for Ceragon devices
This commit is contained in:
@@ -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
BIN
html/images/os/ceragon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@@ -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';
|
||||
|
5
includes/discovery/os/ceraos.inc.php
Normal file
5
includes/discovery/os/ceraos.inc.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (starts_with($sysObjectId, '.1.3.6.1.4.1.2281')) {
|
||||
$os = 'ceraos';
|
||||
}
|
20
includes/discovery/sensors/temperatures/ceraos.inc.php
Normal file
20
includes/discovery/sensors/temperatures/ceraos.inc.php
Normal 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);
|
||||
}
|
||||
}
|
20
includes/discovery/sensors/voltages/ceraos.inc.php
Normal file
20
includes/discovery/sensors/voltages/ceraos.inc.php
Normal 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);
|
||||
}
|
||||
}
|
5
includes/polling/os/ceraos.inc.php
Normal file
5
includes/polling/os/ceraos.inc.php
Normal 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
15536
mibs/MWRM-NETWORK-MIB
Executable file
File diff suppressed because it is too large
Load Diff
5216
mibs/MWRM-PM-MIB
Executable file
5216
mibs/MWRM-PM-MIB
Executable file
File diff suppressed because it is too large
Load Diff
5521
mibs/MWRM-RADIO-MIB
Executable file
5521
mibs/MWRM-RADIO-MIB
Executable file
File diff suppressed because it is too large
Load Diff
6826
mibs/MWRM-UNIT-MIB
Executable file
6826
mibs/MWRM-UNIT-MIB
Executable file
File diff suppressed because it is too large
Load Diff
@@ -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');
|
||||
|
2
tests/snmpsim/ceraos.snmprec
Normal file
2
tests/snmpsim/ceraos.snmprec
Normal 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
|
Reference in New Issue
Block a user