From cdd7d9a0ba3ac3a1dbf74bb7d5b919d660c57bb2 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Tue, 7 May 2024 23:17:32 -0500 Subject: [PATCH] Rrd source does not work with rrdcached (#15974) Skip file migration, but at least the rrdcreate will succeed now. --- LibreNMS/RRD/RrdDefinition.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LibreNMS/RRD/RrdDefinition.php b/LibreNMS/RRD/RrdDefinition.php index 33b72b9c1e..e047175c9e 100644 --- a/LibreNMS/RRD/RrdDefinition.php +++ b/LibreNMS/RRD/RrdDefinition.php @@ -25,7 +25,6 @@ namespace LibreNMS\RRD; -use App\Facades\Rrd; use LibreNMS\Config; use LibreNMS\Exceptions\InvalidRrdTypeException; @@ -132,7 +131,9 @@ class RrdDefinition $index = array_search($file, $this->sources); if ($index === false) { // check if source rrd exists and cache failures - if (isset($this->invalid_source[$file]) || ! Rrd::checkRrdExists($file)) { + // using file_exists because source does not seem to support rrdcached + // so this will only work if we have file access to the old rrd file + if (isset($this->invalid_source[$file]) || ! file_exists($file)) { $this->invalid_source[$file] = true; return ''; // skip source if file does not exist