From 96bee673945e1244023ddbc7dd8a9725eab50f34 Mon Sep 17 00:00:00 2001 From: Paul Gear Date: Sat, 13 Jun 2015 15:22:43 +1000 Subject: [PATCH] Do not attempt to create file if there are no DS definitions --- includes/polling/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php index b01d03e80..77e7d7825 100644 --- a/includes/polling/functions.inc.php +++ b/includes/polling/functions.inc.php @@ -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");