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:
Adam Amstrong
2010-07-02 19:58:13 +00:00
parent b991efa9a6
commit c22e8493f7
53 changed files with 168 additions and 128 deletions

View File

@@ -113,7 +113,8 @@ if ($device['os'] == "netmanplus")
$current_id = $split_oid[count($split_oid)-1];
$current_oid = "1.3.6.1.2.1.33.1.2.6.$current_id";
$precision = 10;
$current = trim(shell_exec($config['snmpget'] . " -O qv -$snmpver -c $community $hostname:$port $current_oid")) / $precision;
$current = snmp_get($device, $current_oid, "-O vq") / $precision;
#$current = trim(shell_exec($config['snmpget'] . " -O qv -$snmpver -c $community $hostname:$port $current_oid")) / $precision;
$descr = "Battery" . (count(explode("\n",$oids)) == 1 ? '' : ' ' . ($current_id+1));
$type = "netmanplus";
$index = 500+$current_id;