apply correct divider to rfc1628 current (Amps) values

This commit is contained in:
einhirn
2015-06-12 18:11:22 +02:00
parent 7b26b71719
commit ed05677f96

View File

@@ -34,12 +34,12 @@ if (isset($config['modules_compat']['rfc1628'][$device['os']]) && $config['modul
{
$current_oid = ".1.3.6.1.2.1.33.1.4.4.1.3.$i";
$descr = "Output"; if ($numPhase > 1) $descr .= " Phase $i";
$current = snmp_get($device, $current_oid, "-Oqv");
$precision = 10;
$current = snmp_get($device, $current_oid, "-Oqv") / $precision;
$type = "rfc1628";
$precision = 1;
$index = $i;
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', NULL, NULL, NULL, NULL, $current);
}
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.3.2.0", "-OsqnU"));
@@ -49,12 +49,12 @@ if (isset($config['modules_compat']['rfc1628'][$device['os']]) && $config['modul
{
$current_oid = "1.3.6.1.2.1.33.1.3.3.1.4.$i";
$descr = "Input"; if ($numPhase > 1) $descr .= " Phase $i";
$current = snmp_get($device, $current_oid, "-Oqv");
$precision = 10;
$current = snmp_get($device, $current_oid, "-Oqv") / $precision;
$type = "rfc1628";
$precision = 1;
$index = 100+$i;
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', NULL, NULL, NULL, NULL, $current);
}
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.5.2.0", "-OsqnU"));
@@ -64,12 +64,12 @@ if (isset($config['modules_compat']['rfc1628'][$device['os']]) && $config['modul
{
$current_oid = "1.3.6.1.2.1.33.1.5.3.1.3.$i";
$descr = "Bypass"; if ($numPhase > 1) $descr .= " Phase $i";
$current = snmp_get($device, $current_oid, "-Oqv");
$precision = 10;
$current = snmp_get($device, $current_oid, "-Oqv") / $precision;
$type = "rfc1628";
$precision = 1;
$index = 200+$i;
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', NULL, NULL, NULL, NULL, $current);
}
}