mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 00:11:49 +02:00
Add option to clean old perf_times table entries #341
This commit is contained in:
@@ -48,5 +48,12 @@ if ($options['f'] === 'authlog') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($options['f'] === 'perf_times') {
|
||||||
|
if (is_numeric($config['perf_times_purge'])) {
|
||||||
|
if (dbDelete('perf_times', "start < UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL ? DAY))", array($config['perf_times_purge'])) ) {
|
||||||
|
echo 'Performance poller times cleared for entries over ' . $config['perf_times_purge'] . " days\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -10,3 +10,4 @@ fi
|
|||||||
php daily.php -f syslog
|
php daily.php -f syslog
|
||||||
php daily.php -f eventlog
|
php daily.php -f eventlog
|
||||||
php daily.php -f authlog
|
php daily.php -f authlog
|
||||||
|
php daily.php -f perf_times
|
||||||
|
|||||||
@@ -576,6 +576,7 @@ $config['update'] = 1;
|
|||||||
$config['syslog_purge'] = 30; # Number in days of how long to keep syslog entries for.
|
$config['syslog_purge'] = 30; # Number in days of how long to keep syslog entries for.
|
||||||
$config['eventlog_purge'] = 30; # Number in days of how long to keep eventlog entries for.
|
$config['eventlog_purge'] = 30; # Number in days of how long to keep eventlog entries for.
|
||||||
$config['authlog_purge'] = 30; # Number in days of how long to keep authlog entries for.
|
$config['authlog_purge'] = 30; # Number in days of how long to keep authlog entries for.
|
||||||
|
$config['perf_times_purge'] = 30; # Number in days of how long to keep performace pooling stats entries for.
|
||||||
|
|
||||||
# Date format for PHP date()s
|
# Date format for PHP date()s
|
||||||
$config['dateformat']['long'] = "r"; # RFC2822 style
|
$config['dateformat']['long'] = "r"; # RFC2822 style
|
||||||
|
|||||||
Reference in New Issue
Block a user