mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
migrate all SNMP calls to use $config['mibdir']. automatically generated from install_dir if not present
git-svn-id: http://www.observium.org/svn/observer/trunk@1284 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -51,7 +51,7 @@ if($device[os] != "Snom") {
|
||||
$snmpstring .= " $oid.0";
|
||||
}
|
||||
if(!file_exists($rrdfile)) { shell_exec($rrd_create); }
|
||||
$snmpdata_cmd = "snmpget -m IP-MIB:SNMPv2-MIB:UDP-MIB:TCP-MIB:IP-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " $snmpstring";
|
||||
$snmpdata_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -m IP-MIB:SNMPv2-MIB:UDP-MIB:TCP-MIB:IP-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " $snmpstring";
|
||||
$snmpdata = trim(shell_exec($snmpdata_cmd));
|
||||
$rrdupdate = "N";
|
||||
foreach(explode("\n", $snmpdata) as $data) {
|
||||
|
Reference in New Issue
Block a user