mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-31 16:23:50 +02:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user