mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
billing bugfix :)
git-svn-id: http://www.observium.org/svn/observer/trunk@1228 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user