netman plus currents + use by-reference array on discover_current()

git-svn-id: http://www.observium.org/svn/observer/trunk@1195 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-06-17 10:46:04 +00:00
parent 8ad6ddd3ad
commit c5f104b18a
3 changed files with 84 additions and 14 deletions
+5 -4
View File
@@ -164,7 +164,8 @@ if ($device['os'] == "netmanplus")
$volt = trim(shell_exec($config['snmpget'] . " -O qv -$snmpver -c $community $hostname:$port $volt_oid")) / $precision;
$descr = "Battery" . (count(explode("\n",$oids)) == 1 ? '' : ' ' . ($volt_id+1));
$type = "netmanplus";
discover_volt($valid_volt,$device, $volt_oid, $volt_id, $type, $descr, $precision, NULL, NULL, $volt);
$index = 500+$volt_id;
discover_volt($valid_volt,$device, $volt_oid, $index, $type, $descr, $precision, NULL, NULL, $volt);
}
}
@@ -179,7 +180,7 @@ if ($device['os'] == "netmanplus")
$type = "netmanplus";
$precision = 1;
$index = $i;
echo discover_volt($valid_volt,$device, $volt_oid, $index, $type, $descr, $precision, $lowlimit, $limit, $current);
echo discover_volt($valid_volt,$device, $volt_oid, $index, $type, $descr, $precision, NULL, NULL, $current);
}
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.3.2.0", "-OsqnU"));
@@ -193,7 +194,7 @@ if ($device['os'] == "netmanplus")
$type = "netmanplus";
$precision = 1;
$index = 100+$i;
echo discover_volt($valid_volt,$device, $volt_oid, $index, $type, $descr, $precision, $lowlimit, $limit, $current);
echo discover_volt($valid_volt,$device, $volt_oid, $index, $type, $descr, $precision, NULL, NULL, $current);
}
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.5.2.0", "-OsqnU"));
@@ -207,7 +208,7 @@ if ($device['os'] == "netmanplus")
$type = "netmanplus";
$precision = 1;
$index = 200+$i;
echo discover_volt($valid_volt,$device, $volt_oid, $index, $type, $descr, $precision, $lowlimit, $limit, $current);
echo discover_volt($valid_volt,$device, $volt_oid, $index, $type, $descr, $precision, NULL, NULL, $current);
}
}