mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
changes since changes began
git-svn-id: http://www.observium.org/svn/observer/trunk@1403 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -3,10 +3,14 @@
|
||||
function rewrite_entity_descr ($descr) {
|
||||
|
||||
$descr = str_replace("Distributed Forwarding Card", "DFC", $descr);
|
||||
$descr = preg_replace("/7600 Series SPA Interface Processor-/", "SIP-", $descr);
|
||||
$descr = preg_replace("/7600 Series SPA Interface Processor-/", "7600 SIP-", $descr);
|
||||
$descr = preg_replace("/Rev\.\ [0-9\.]+\ /", "", $descr);
|
||||
|
||||
$descr = preg_replace("/12000 Series Performance Route Processor/", "12000 PRP", $descr);
|
||||
$descr = preg_replace("/^12000/", "", $descr);
|
||||
$descr = preg_replace("/Gigabit Ethernet/", "GigE", $descr);
|
||||
$descr = preg_replace("/^ASR1000\ /", "", $descr);
|
||||
$descr = str_replace("Routing Processor", "RP", $descr);
|
||||
$descr = str_replace("Route Processor", "RP", $descr);
|
||||
$descr = str_replace("Switching Processor", "SP", $descr);
|
||||
$descr = str_replace("Sub-Module", "Module ", $descr);
|
||||
$descr = str_replace("DFC Card", "DFC", $descr);
|
||||
|
@@ -52,8 +52,14 @@ echo("<div style='clear: both;'>");
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
echo ("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/'>Graphs</a> |
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/arp/'>ARP Table</a>$pagp");
|
||||
echo ("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/'>Graphs</a> | ");
|
||||
|
||||
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `ports_adsl` WHERE `interface_id` = '".$interface['interface_id']."'"),0))
|
||||
{
|
||||
echo("<a href='".$config['base_url']."/device/".$device['device_id']."/interface/".$interface['interface_id']."/adsl/'>ADSL</a> | ");
|
||||
}
|
||||
|
||||
echo ("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/arp/'>ARP Table</a>$pagp");
|
||||
|
||||
|
||||
|
||||
|
@@ -127,6 +127,7 @@ $config['enable_pseudowires'] = 1; # Enable Pseudowires
|
||||
$config['enable_ports_junoseatmvp'] = 0; # Enable JunOSe ATM VC Discovery/Poller
|
||||
$config['enable_ports_etherlike'] = 0; # Enable Polling EtherLike-MIB (doubles interface processing time)
|
||||
$config['enable_printers'] = 0; # Enable Printer support
|
||||
$config['enable_ports_adsl'] = 1; # Enable ADSL-LINE-MIB
|
||||
|
||||
### External Integration
|
||||
|
||||
@@ -151,7 +152,7 @@ $config['ignore_mount_removable'] = 1; # Ignore removable disk storage
|
||||
$config['ignore_mount_network'] = 1; # Ignore network mounted storage
|
||||
$config['ignore_mount_optical'] = 1; # Ignore mounted optical discs
|
||||
|
||||
$config['device_traffic_iftype'] = array('/loopback/','/other/','/tunnel/','/virtual/','/mpls/');
|
||||
$config['device_traffic_iftype'] = array('/loopback/','/tunnel/','/virtual/','/mpls/');
|
||||
$config['device_traffic_descr'] = array('/loopback/','/vlan/','/tunnel/','/:\d+/');
|
||||
|
||||
### Authentication
|
||||
|
@@ -26,8 +26,11 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios")
|
||||
$descr = snmp_get($device, "entPhysicalDescr.".$index, "-Oqv", "ENTITY-MIB");
|
||||
$oid = ".1.3.6.1.4.1.9.9.91.1.1.1.1.4.".$index;
|
||||
$current = $entry['entSensorValue'];
|
||||
|
||||
if($entry['entSensorScale'] == "milli") { $divisor = "1000"; } else { $divisor = "1"; }
|
||||
|
||||
|
||||
discover_temperature($valid_temp, $device, $oid, $index, "cisco-entity-sensor", $descr, "1", NULL, NULL, $current);
|
||||
discover_temperature($valid_temp, $device, $oid, $index, "cisco-entity-sensor", $descr, $divisor, NULL, NULL, $current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -31,6 +31,14 @@
|
||||
$ciscomodel = str_replace("\"","",$ciscomodel);
|
||||
if($ciscomodel) { $hardware = $ciscomodel; unset($ciscomodel); }
|
||||
|
||||
if(strpos($sysDescr, "IOS XR")) {
|
||||
list(,$version) = explode(",", $sysDescr);
|
||||
$version = trim($version);
|
||||
list(,$version) = explode(" ", $version);
|
||||
list($version) = explode("\n", $version);
|
||||
trim($version);
|
||||
}
|
||||
|
||||
|
||||
$cpu5m = shell_exec($config['snmpget'] . " -M ".$config['mibdir'] . " -m OLD-CISCO-CPU-MIB -O qv -$snmpver -c $community $hostname:$port avgBusy5.0");
|
||||
$cpu5m = $cpu5m + 0;
|
||||
|
@@ -31,6 +31,7 @@
|
||||
foreach ($ifmib_oids as $oid) { echo("$oid "); $array = snmp_cache_oid($oid, $device, $array, "IF-MIB");}
|
||||
|
||||
if($config['enable_ports_etherlike']) { echo("dot3Stats "); $array = snmp_cache_oid("dot3StatsEntry", $device, $array, "EtherLike-MIB"); }
|
||||
if($config['enable_ports_adsl']) { echo("adsl "); $array = snmp_cache_oid(".1.3.6.1.2.1.10.94.1.1", $device, $array, "ADSL-LINE-MIB"); }
|
||||
|
||||
echo("\n");
|
||||
|
||||
@@ -198,6 +199,8 @@
|
||||
|
||||
/// Do EtherLike-MIB
|
||||
if($config['enable_ports_etherlike']) { include("port-etherlike.inc.php"); }
|
||||
if($config['enable_ports_adsl']) { include("port-adsl.inc.php"); }
|
||||
|
||||
|
||||
// Update MySQL
|
||||
if ($update) {
|
||||
|
Reference in New Issue
Block a user