mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Do not attempt to create file if there are no DS definitions
This commit is contained in:
@@ -359,7 +359,7 @@ function rrd_create_update($device, $name, $def, $val, $step = 300)
|
||||
global $config;
|
||||
$rrd = implode("/", array($config['rrd_dir'], $device['hostname'], safename(implode("-", $name)).".rrd"));
|
||||
|
||||
if (!is_file($rrd)) {
|
||||
if (!is_file($rrd) && $def != null) {
|
||||
// add the --step and the rra definitions to the array
|
||||
$newdef = "--step $step ".implode(' ', $def).$config['rrd_rra'];
|
||||
d_echo("Creating RRD $rrd: $newdef");
|
||||
|
||||
Reference in New Issue
Block a user