billing bugfix :)

git-svn-id: http://www.observium.org/svn/observer/trunk@1228 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-06-21 04:28:37 +00:00
parent 019e3c347a
commit 4fc6629f00
2 changed files with 8 additions and 4 deletions

View File

@@ -66,10 +66,14 @@ function getDates($dayofmonth) {
}
function getValue($host, $community, $port, $id, $inout) {
function getValue($host, $community, $snmpver, $port, $id, $inout) {
global $config;
$oid = "IF-MIB::ifHC" . $inout . "Octets." . $id;
$value = shell_exec($config['snmpget'] ." -m IF-MIB -c $community -v2c -O qv $host:$port $oid");
$value = shell_exec($config['snmpget'] ." -m IF-MIB -c $community -$snmpver -O qv $host:$port $oid");
if(!is_numeric($value)) {
$oid = "IF-MIB::if" . $inout . "Octets." . $id;
$value = shell_exec($config['snmpget'] ." -m IF-MIB -c $community -$snmpver -O qv $host:$port $oid");
}
return $value;
}