mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
fix os on old cisco kit. a bit.
git-svn-id: http://www.observium.org/svn/observer/trunk@2677 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
<?php
|
||||
|
||||
$poll_device['sysDescr'] = str_replace("IOS (tm)", "IOS (tm),", $poll_device['sysDescr']);
|
||||
$poll_device['sysDescr'] = str_replace(") RELEASE", "), RELEASE", $poll_device['sysDescr']);
|
||||
|
||||
echo("\n".$poll_device['sysDescr']."\n");
|
||||
|
||||
list(,$features,$version) = explode(",", $poll_device['sysDescr']);
|
||||
|
||||
$version = str_replace(" Version ", "", $version);
|
||||
list(,$features) = explode("(", $features);
|
||||
list(,$features) = explode("-", $features);
|
||||
@@ -34,6 +39,10 @@ list($version) = explode(",", $version);
|
||||
# $ciscomodel = str_replace("\"","",$ciscomodel);
|
||||
# if ($ciscomodel) { $hardware = $ciscomodel; unset($ciscomodel); }
|
||||
|
||||
if($hardware == "") { $hardware = snmp_get($device, "sysObjectID.0", "-Osqv", "SNMPv2-MIB:CISCO-PRODUCTS-MIB"); }
|
||||
|
||||
if(isset($cisco_hardware_oids[$poll_device['sysObjectID']])) { $hardware = $cisco_hardware_oids[$poll_device['sysObjectID']]; }
|
||||
|
||||
if (strpos($poll_device['sysDescr'], "IOS XR")) {
|
||||
list(,$version) = explode(",", $poll_device['sysDescr']);
|
||||
$version = trim($version);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
foreach (array_keys($snmpdata[0]) as $key) { $poll_device[$key] = $snmpdata[0][$key]; }
|
||||
|
||||
$poll_device['sysDescr'] = snmp_get($device, "sysDescr.0", "-Oqv", "SNMPv2-MIB");
|
||||
$poll_device['sysObjectID'] = snmp_get($device, "sysObjectID.0", "-Oqvn", "SNMPv2-MIB");
|
||||
|
||||
$poll_device['sysName'] = strtolower($poll_device['sysName']);
|
||||
|
||||
|
||||
@@ -132,6 +132,10 @@ $rewrite_junose_hardware = array(
|
||||
'juniSsx1440' => 'SSX-1440',
|
||||
);
|
||||
|
||||
$rewrite_cisco_hardware = array(
|
||||
'.1.3.6.1.4.1.9.1.275' => 'C2948G-L3',
|
||||
);
|
||||
|
||||
$rewrite_ftos_hardware = array (
|
||||
'.1.3.6.1.4.1.6027.1.1.1'=> 'E1200',
|
||||
'.1.3.6.1.4.1.6027.1.1.2'=> 'E600',
|
||||
|
||||
Reference in New Issue
Block a user