diff --git a/config.php.default b/config.php.default index 85c5de25b0..c8ac44a2bf 100755 --- a/config.php.default +++ b/config.php.default @@ -46,8 +46,9 @@ $config['auth_mechanism'] = "mysql"; # default, other options: ldap, http-auth $config['poller-wrapper']['alerter'] = FALSE; # Uncomment the next line to disable daily updates #$config['update'] = 0; -$config['rrd_purge'] = 90; -// Number in days of how long to keep old rrd files. + +# Number in days of how long to keep old rrd files. 0 disables this feature +$config['rrd_purge'] = 0; # Uncomment to submit callback stats via proxy #$config['callback_proxy'] = "hostname:port"; diff --git a/daily.php b/daily.php index d8579761f7..c4e207e4e6 100644 --- a/daily.php +++ b/daily.php @@ -32,7 +32,7 @@ if ($options['f'] === 'update') { } if ($options['f'] === 'rrd_purge') { - if (is_numeric($config['rrd_purge'])) { + if (is_numeric($config['rrd_purge']) && $config['rrd_purge'] > 0) { $cmd = "find ".$config['rrd_dir']." -mtime +".$config['rrd_purge']." -exec rm -Rf {} \;"; $purge = `$cmd`; echo 'purged old rrd files';