mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 18:38:25 +00:00
fixing update-interface.php to use config variables for snmpget location and remove incorrect mib dir
git-svn-id: http://www.observium.org/svn/observer/trunk@366 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
parent
f50cbc78b3
commit
e2632b0759
@ -20,7 +20,7 @@ while ($interface = mysql_fetch_array($interface_query)) {
|
||||
|
||||
echo("Looking at " . $interface['ifDescr'] . " on " . $device['hostname'] . "\n");
|
||||
|
||||
$snmp_cmd = "snmpget -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ifName." . $interface['ifIndex'];
|
||||
$snmp_cmd = $config['snmpget'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ifName." . $interface['ifIndex'];
|
||||
$snmp_cmd .= " ifDescr." . $interface['ifIndex'] . " ifAdminStatus." . $interface['ifIndex'] . " ifOperStatus." . $interface['ifIndex'] . " ";
|
||||
$snmp_cmd .= "ifAlias." . $interface['ifIndex'] . " ifSpeed." . $interface['ifIndex'] . " 1.3.6.1.2.1.10.7.2.1." . $interface['ifIndex'];
|
||||
$snmp_cmd .= " ifType." . $interface['ifIndex'] . " ifMtu." . $interface['ifIndex'] . " ifPhysAddress." . $interface['ifIndex'];
|
||||
@ -32,7 +32,7 @@ while ($interface = mysql_fetch_array($interface_query)) {
|
||||
|
||||
if($device['os'] == "IOS") {
|
||||
|
||||
$snmp_cmdb = "snmpget -M /usr/share/snmp/mibs/ -m CISCO-VLAN-MEMBERSHIP-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'];
|
||||
$snmp_cmdb = $config['snmpget'] . " -m +CISCO-VLAN-MEMBERSHIP-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'];
|
||||
$snmp_cmdb .= " .1.3.6.1.4.1.9.2.2.1.1.1." . $interface['ifIndex'];
|
||||
$snmp_cmdb .= " .1.3.6.1.4.1.9.9.68.1.2.2.1.2." . $interface['ifIndex'];
|
||||
$snmp_cmdb .= " .1.3.6.1.4.1.9.9.46.1.6.1.1.16." . $interface['ifIndex'];
|
||||
|
Loading…
Reference in New Issue
Block a user