mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 08:02:23 +02:00
fix invisible precision in php leading to continuous toner swap message every poll
git-svn-id: http://www.observium.org/svn/observer/trunk@2504 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -10,7 +10,7 @@ if ($config['enable_printers'])
|
||||
|
||||
# FIXME poll capacity maybe also here, when toner is replaced capacity can change, leading to "154% of toner"
|
||||
|
||||
$tonerperc = snmp_get($device, $toner['toner_oid'], "-OUqnv") / $toner['toner_capacity'] * 100;
|
||||
$tonerperc = round(snmp_get($device, $toner['toner_oid'], "-OUqnv") / $toner['toner_capacity'] * 100);
|
||||
|
||||
$old_tonerrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("toner-" . $toner['toner_descr'] . ".rrd");
|
||||
$tonerrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("toner-" . $toner['toner_index'] . ".rrd");
|
||||
|
||||
Reference in New Issue
Block a user