mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: MySQL app graphs with rrdcached (#6608)
Do not send -1 values when we set the minimum as 0. Send the proper U for non-values. fixes: #6223
This commit is contained in:
committed by
Neil Lathwood
parent
e67708d1f7
commit
379176ceac
@@ -108,7 +108,7 @@ foreach ($data as $str) {
|
||||
|
||||
$fields = array();
|
||||
foreach ($mapping as $k => $v) {
|
||||
$fields[$k] = isset($map[$v]) ? $map[$v] : (-1);
|
||||
$fields[$k] = (isset($map[$v]) && $map[$v] >= 0) ? $map[$v] : 'U';
|
||||
}
|
||||
|
||||
$rrd_name = array('app', $name, $app_id);
|
||||
@@ -221,7 +221,7 @@ $rrd_def = new RrdDefinition();
|
||||
unset($fields);
|
||||
$fields = array();
|
||||
foreach ($mapping_status as $desc => $id) {
|
||||
$fields[$desc] = isset($map[$id]) ? $map[$id] : (-1);
|
||||
$fields[$desc] = (isset($map[$id]) && $map[$id] >= 0) ? $map[$id] : 'U';
|
||||
$rrd_def->addDataset($id, 'GAUGE', 0, 125000000000);
|
||||
}
|
||||
$status = true;
|
||||
|
||||
Reference in New Issue
Block a user