diff --git a/src/database.js b/src/database.js index b8512cdb..b3b316b6 100644 --- a/src/database.js +++ b/src/database.js @@ -19,6 +19,10 @@ const queryCount = new Counter({ help: 'DB query count' }); +setInterval(() => { + queryLatency.reset(); +}, 5 * 60 * 1000).unref(); + let db = null; let globalBanDB = null; diff --git a/src/web/webserver.js b/src/web/webserver.js index 25b0af1b..0c14ddbb 100644 --- a/src/web/webserver.js +++ b/src/web/webserver.js @@ -58,6 +58,10 @@ function initPrometheus(app) { }); next(); }); + + setInterval(() => { + latency.reset(); + }, 5 * 60 * 1000).unref(); } /**