Skip to content

Commit

Permalink
Rrd source does not work with rrdcached (#15974)
Browse files Browse the repository at this point in the history
Skip file migration, but at least the rrdcreate will succeed now.
  • Loading branch information
murrant committed May 8, 2024
1 parent 9ee7139 commit cdd7d9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions LibreNMS/RRD/RrdDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

namespace LibreNMS\RRD;

use App\Facades\Rrd;
use LibreNMS\Config;
use LibreNMS\Exceptions\InvalidRrdTypeException;

Expand Down Expand Up @@ -132,7 +131,9 @@ private function createSource(?string $ds, ?string $file): string
$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
Expand Down

0 comments on commit cdd7d9a

Please sign in to comment.