mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
updates additions
git-svn-id: http://www.observium.org/svn/observer/trunk@505 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
|
||||
function snmp_cache_cip($oid, $device, $array, $mib = 0) {
|
||||
global $config;
|
||||
$cmd = $config['snmpbulkwalk'] . " -O snq -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ";
|
||||
$cmd = $config['snmpbulkwalk'] . " -O snQ -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ";
|
||||
if($mib) { $cmd .= "-m $mib "; }
|
||||
$cmd .= $oid;
|
||||
$data = trim(shell_exec($cmd));
|
||||
$device_id = $device['device_id'];
|
||||
#echo("Caching: $oid\n");
|
||||
foreach(explode("\n", $data) as $entry) {
|
||||
list ($this_oid, $this_value) = split(" ", $entry);
|
||||
list ($this_oid, $this_value) = split("=", $entry);
|
||||
$this_oid = trim($this_oid);
|
||||
$this_value = trim($this_value);
|
||||
$this_oid = substr($this_oid, 30);
|
||||
|
||||
Reference in New Issue
Block a user