mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Cisco QFP polling fixes (#14961)
* fix cisco-qfp Division by zero * fix percentage calc * linting * another zero in RRD. the (int) might be consequential errors and should hurt... * no float for average_package * Update includes/polling/cisco-qfp.inc.php Co-authored-by: Tony Murray <murraytony@gmail.com> * Add floor --------- Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -33,7 +33,7 @@ if ($width > '500') {
|
||||
|
||||
$descr = \LibreNMS\Data\Store\Rrd::fixedSafeDescr(short_hrDeviceDescr($components['name']), $descr_len);
|
||||
|
||||
$perc = $components['memory_used'] * 100 / $components['memory_total'];
|
||||
$perc = \LibreNMS\Util\Number::calculatePercent((int) $components['memory_used'], (int) $tmp_component['memory_total']);
|
||||
|
||||
$background = \LibreNMS\Util\Color::percentage($perc, 75);
|
||||
|
||||
|
Reference in New Issue
Block a user