mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Updated graphs to use safer RRD check (#6781)
Graphs that were using `file_exists()` to check for the presence of RRD files now use `rrdtool_check_rrd_exists()` instead. This is a fix for distributed poller configurations that are running `rrdcached` on a different host.
This commit is contained in:
committed by
Neil Lathwood
parent
127c4b84bd
commit
8c4efc83e1
@@ -28,7 +28,7 @@ $count = 0;
|
||||
foreach ($components as $id => $array) {
|
||||
$rrd_filename = rrd_name($device['hostname'], array('ntp', $array['peer']));
|
||||
|
||||
if (file_exists($rrd_filename)) {
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
// Grab a color from the array.
|
||||
if (isset($config['graph_colours']['mixed'][$count])) {
|
||||
$color = $config['graph_colours']['mixed'][$count];
|
||||
|
||||
Reference in New Issue
Block a user