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:
Aaron Goulet
2017-06-05 14:49:04 -07:00
committed by Neil Lathwood
parent 127c4b84bd
commit 8c4efc83e1
117 changed files with 119 additions and 119 deletions

View File

@@ -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];