Merge pull request #1031 from alangregory/fiberhome

Added Basic FiberHome Support
This commit is contained in:
Neil Lathwood
2015-05-17 13:26:03 +01:00
7 changed files with 7082 additions and 6 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

+6
View File
@@ -1104,6 +1104,12 @@ $config['os'][$os]['over'][0]['graph'] = "device_bits";
$config['os'][$os]['over'][0]['text'] = "Device Traffic";
$config['os'][$os]['ifname'] = 1;
// Fiberhome
$os = "fiberhome";
$config['os'][$os]['text'] = "Fiberhome";
$config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "fiberhome";
foreach ($config['os'] as $this_os => $blah)
{
if (isset($config['os'][$this_os]['group']))
+12
View File
@@ -0,0 +1,12 @@
<?php
if (!$os){
/**
* Supported Devides List
* OLT AN5516-06
* OLT AN5516-01
*/
if (preg_match('/^AN5516-0[16]$/',$sysDescr)) {
$os = "fiberhome";
}
}
?>
@@ -0,0 +1,10 @@
<?php
if ($device['os'] == 'fiberhome')
{
$temperature = snmp_get($device, "sysTemperature.0", "-Oqv", "GEPON-OLT-COMMON-MIB");
if (is_numeric($temperature)) {
$oid = ".1.3.6.1.4.1.5875.800.3.9.4.5.0";
discover_sensor($valid['sensor'], 'temperature', $device, $oid , "0", 'fiberhome',"Internal Temperature", '1', '1', "20" , NULL, NULL, "50", $temperature);
}
}
?>
+6 -6
View File
@@ -266,7 +266,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
echo("This is mag_poll_mib_def Processing\n");
$mib = NULL;
if (stristr($mib_name_table, "UBNT")) {
list($mib,) = explode(":", $mib_name_table, 2);
//$mib_dirs = mib_dirs($mib_subdir);
@@ -285,7 +285,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
$oiddsdesc = $param[2];
$oiddstype = $param[3];
$oiddsopts = $param[4];
if (strlen($oiddsname) > 19) { $oiddsname = truncate($oiddsname, 19, ''); }
if (empty($oiddsopts)) {
@@ -300,7 +300,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
} else {
$fulloid = $oid;
}
// Add to oid GET list
$oidglist[] = $fulloid;
@@ -308,7 +308,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
// Implde for LibreNMS Version
$oidilist = implode(" ",$oidglist);
$snmpdata = snmp_get_multi($device, $oidilist, "-OQUs", $mib);
if (isset($GLOBALS['exec_status']['exitcode']) && $GLOBALS['exec_status']['exitcode'] !== 0)
{
@@ -328,7 +328,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
}
}
$rrdfilename = $config['rrd_dir']."/".$device['hostname']."/".$rrd_file;
$rrdfilename = $config['rrd_dir']."/".$device['hostname']."/".$rrd_file;
if (!is_file($rrdfilename))
{
@@ -340,7 +340,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
{
$graphs[$graphtoenable] = TRUE;
}
return TRUE;
}
+5
View File
@@ -0,0 +1,5 @@
<?php
$hardware = "Fiberhome ".snmp_get($device, "sysDescr.0", "-Oqv", "GEPON-OLT-COMMON-MIB");
$version = str_replace('"','',snmp_get($device, "sysHardVersion.0", "-Ovq", "GEPON-OLT-COMMON-MIB"))." - ".str_replace('"','',snmp_get($device, "sysSoftVersion.0", "-Ovq", "GEPON-OLT-COMMON-MIB"));
$features = "Olt ".snmp_get($device, "sysDescr.0", "-Oqv", "GEPON-OLT-COMMON-MIB");
?>
File diff suppressed because it is too large Load Diff