diff --git a/daily.php b/daily.php index 79dcea7574..cfc2e7bedc 100644 --- a/daily.php +++ b/daily.php @@ -103,11 +103,6 @@ if ($options['f'] === 'authlog') { exit($ret); } -if ($options['f'] === 'perf_times') { - $ret = lock_and_purge('perf_times', 'start < UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL ? DAY))'); - exit($ret); -} - if ($options['f'] === 'callback') { include_once 'includes/callback.php'; } diff --git a/daily.sh b/daily.sh index 200df270f5..f876c98978 100755 --- a/daily.sh +++ b/daily.sh @@ -379,7 +379,6 @@ main () { "syslog" "eventlog" "authlog" - "perf_times" "callback" "device_perf" "purgeusers" diff --git a/database/migrations/2021_02_09_084318_remove_perf_times.php b/database/migrations/2021_02_09_084318_remove_perf_times.php new file mode 100644 index 0000000000..f161ecf572 --- /dev/null +++ b/database/migrations/2021_02_09_084318_remove_perf_times.php @@ -0,0 +1,36 @@ +increments('id'); + $table->string('type', 8)->index(); + $table->string('doing', 64); + $table->unsignedInteger('start'); + $table->float('duration'); + $table->unsignedInteger('devices'); + $table->string('poller'); + }); + } +} diff --git a/discovery.php b/discovery.php index e519533ef7..381b3f58a2 100755 --- a/discovery.php +++ b/discovery.php @@ -121,14 +121,6 @@ $run = ($end - $start); $proctime = substr($run, 0, 5); if ($discovered_devices) { - dbInsert([ - 'type' => 'discover', - 'doing' => $doing, - 'start' => $start, - 'duration' => $proctime, - 'devices' => $discovered_devices, - 'poller' => \LibreNMS\Config::get('distributed_poller_name'), - ], 'perf_times'); if ($doing === 'new') { // We have added a new device by this point so we might want to do some other work oxidized_reload_nodes(); diff --git a/doc/Support/Cleanup-options.md b/doc/Support/Cleanup-options.md index c50f69e2f4..23e16db391 100644 --- a/doc/Support/Cleanup-options.md +++ b/doc/Support/Cleanup-options.md @@ -17,7 +17,6 @@ Cleanup Options are set in ```config.php``` $config['syslog_purge'] = 30; $config['eventlog_purge'] = 30; $config['authlog_purge'] = 30; -$config['perf_times_purge'] = 30; $config['device_perf_purge'] = 7; $config['rrd_purge'] = 90;// Not set by default $config['ports_purge'] = true;// Set to false by default diff --git a/doc/Support/Configuration.md b/doc/Support/Configuration.md index c0bbe69879..c46dc2a9a8 100644 --- a/doc/Support/Configuration.md +++ b/doc/Support/Configuration.md @@ -824,7 +824,6 @@ These options rely on daily.sh running from cron as per the installation instruc $config['syslog_purge'] = 30; $config['eventlog_purge'] = 30; $config['authlog_purge'] = 30; -$config['perf_times_purge'] = 30; $config['device_perf_purge'] = 7; $config['alert_log_purge'] = 365; $config['port_fdb_purge'] = 10; diff --git a/misc/config_definitions.json b/misc/config_definitions.json index f45667c658..cf9d423cb3 100644 --- a/misc/config_definitions.json +++ b/misc/config_definitions.json @@ -4128,13 +4128,6 @@ "value": "integer|between:0,100" } }, - "perf_times_purge": { - "default": 30, - "group": "system", - "section": "cleanup", - "order": 6, - "type": "integer" - }, "permission.device_group.allow_dynamic": { "default": false, "group": "authorization", diff --git a/misc/db_schema.yaml b/misc/db_schema.yaml index bb2b3fef7d..5ac1a89031 100644 --- a/misc/db_schema.yaml +++ b/misc/db_schema.yaml @@ -1309,18 +1309,6 @@ pdb_ix_peers: - { Field: timestamp, Type: 'int unsigned', 'Null': true, Extra: '' } Indexes: PRIMARY: { Name: PRIMARY, Columns: [pdb_ix_peers_id], Unique: true, Type: BTREE } -perf_times: - Columns: - - { Field: id, Type: 'int unsigned', 'Null': false, Extra: auto_increment } - - { Field: type, Type: varchar(8), 'Null': false, Extra: '' } - - { Field: doing, Type: varchar(64), 'Null': false, Extra: '' } - - { Field: start, Type: 'int unsigned', 'Null': false, Extra: '' } - - { Field: duration, Type: 'double(8,2)', 'Null': false, Extra: '' } - - { Field: devices, Type: 'int unsigned', 'Null': false, Extra: '' } - - { Field: poller, Type: varchar(255), 'Null': false, Extra: '' } - Indexes: - PRIMARY: { Name: PRIMARY, Columns: [id], Unique: true, Type: BTREE } - perf_times_type_index: { Name: perf_times_type_index, Columns: [type], Unique: false, Type: BTREE } plugins: Columns: - { Field: plugin_id, Type: 'int unsigned', 'Null': false, Extra: auto_increment } diff --git a/poll-billing.php b/poll-billing.php index 7cc6604e1c..a1a7fc6734 100755 --- a/poll-billing.php +++ b/poll-billing.php @@ -151,14 +151,6 @@ $poller_end = microtime(true); $poller_run = ($poller_end - $poller_start); $poller_time = substr($poller_run, 0, 5); -dbInsert([ - 'type' => 'pollbill', - 'doing' => $doing, - 'start' => $poller_start, - 'duration' => $poller_time, - 'devices' => 0, - 'poller' => \LibreNMS\Config::get('distributed_poller_name'), -], 'perf_times'); if ($poller_time > 300) { logfile("BILLING: polling took longer than 5 minutes ($poller_time seconds)!"); } diff --git a/poller.php b/poller.php index cfa40610a4..83f8290429 100755 --- a/poller.php +++ b/poller.php @@ -160,17 +160,6 @@ $poller_end = microtime(true); $poller_run = ($poller_end - $poller_start); $poller_time = substr($poller_run, 0, 5); -if ($polled_devices) { - dbInsert([ - 'type' => 'poll', - 'doing' => $doing, - 'start' => $poller_start, - 'duration' => $poller_time, - 'devices' => $polled_devices, - 'poller' => Config::get('base_url'), - ], 'perf_times'); -} - $string = $argv[0] . " $doing " . date(Config::get('dateformat.compact')) . " - $polled_devices devices polled in $poller_time secs"; d_echo("$string\n"); diff --git a/resources/lang/de/settings.php b/resources/lang/de/settings.php index 42fe2aaa5e..9aa0ec1a93 100644 --- a/resources/lang/de/settings.php +++ b/resources/lang/de/settings.php @@ -578,10 +578,6 @@ return [ 'help' => 'Aktiviere PeeringDB lookup (Daten werden mit daily.sh heruntergeladen)', ], ], - 'perf_times_purge' => [ - 'description' => 'Poller Performanz Daten älter als (Tage)', - 'help' => 'Bereinigung wird erledigt durch daily.sh', - ], 'ping' => [ 'description' => 'Pfad zu ping', ], diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php index 9ca6963104..f501ee81d7 100644 --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@ -957,10 +957,6 @@ return [ 'help' => 'Enable PeeringDB lookup (data is downloaded with daily.sh)', ], ], - 'perf_times_purge' => [ - 'description' => 'Poller performance log entries older than (days)', - 'help' => 'Cleanup done by daily.sh', - ], 'permission' => [ 'device_group' => [ 'allow_dynamic' => [ diff --git a/resources/lang/fr/settings.php b/resources/lang/fr/settings.php index 2eb322c4e3..a70b576b3a 100644 --- a/resources/lang/fr/settings.php +++ b/resources/lang/fr/settings.php @@ -752,10 +752,6 @@ return [ 'help' => 'Les données sont mises à jour via daily.sh', ], ], - 'perf_times_purge' => [ - 'description' => 'Journaux de performances des sondeurs (jours)', - 'help' => 'Nettoyage effectué par daily.sh', - ], 'permission' => [ 'device_group' => [ 'allow_dynamic' => [ diff --git a/resources/lang/it/settings.php b/resources/lang/it/settings.php index 0d45ea7cd8..9f134d24ff 100644 --- a/resources/lang/it/settings.php +++ b/resources/lang/it/settings.php @@ -868,10 +868,6 @@ return [ 'help' => 'Enable PeeringDB lookup (data is downloaded with daily.sh)', ], ], - 'perf_times_purge' => [ - 'description' => 'Poller performance log entries older than (days)', - 'help' => 'Cleanup done by daily.sh', - ], 'permission' => [ 'device_group' => [ 'allow_dynamic' => [ diff --git a/resources/lang/zh-CN/settings.php b/resources/lang/zh-CN/settings.php index 2158b7b8d0..276dd74e0c 100644 --- a/resources/lang/zh-CN/settings.php +++ b/resources/lang/zh-CN/settings.php @@ -585,10 +585,6 @@ return [ 'help' => '起用 PeeringDB lookup (资料将于由 daily.sh 进行下载)', ], ], - 'perf_times_purge' => [ - 'description' => '轮询器效能记录项目大于 (天)', - 'help' => 'Cleanup done by daily.sh', - ], 'ping' => [ 'description' => 'ping 路径', ], diff --git a/resources/lang/zh-TW/settings.php b/resources/lang/zh-TW/settings.php index 14393c5af3..f37361bf0e 100644 --- a/resources/lang/zh-TW/settings.php +++ b/resources/lang/zh-TW/settings.php @@ -658,10 +658,6 @@ return [ 'help' => '起用 PeeringDB lookup (資料將於由 daily.sh 進行下載)', ], ], - 'perf_times_purge' => [ - 'description' => '輪詢器效能記錄項目大於 (天)', - 'help' => 'Cleanup done by daily.sh', - ], 'permission' => [ 'device_group' => [ 'allow_dynamic' => [