mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated as per pr comments
This commit is contained in:
@ -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";
|
||||
|
@ -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';
|
||||
|
Reference in New Issue
Block a user