From 9d0458f777d14572a9d4430545f7e21fbc534d32 Mon Sep 17 00:00:00 2001 From: Maha Benzekri Date: Thu, 16 May 2024 16:58:02 +0200 Subject: [PATCH] wip --- CountItems/masterProcess.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CountItems/masterProcess.js b/CountItems/masterProcess.js index 08c3b1d6..b692c016 100644 --- a/CountItems/masterProcess.js +++ b/CountItems/masterProcess.js @@ -62,8 +62,14 @@ const metricServer = new WebServer(8003, log).onRequest((req, res) => monitoring )); metricServer.start(); -monitoring.bucketsCount.reset(); -monitoring.objectsCount.reset(); +// Set bucketsCount to 0 +monitoring.bucketsCount.labels('error').set(0); +monitoring.bucketsCount.labels('success').set(0); + +// Set objectsCount to 0 +monitoring.objectsCount.labels('error').set(0); +monitoring.bucketProcessingDurationobjectsCount.labels('success').set(0); +monitoring.objectsCount.labels('skipped').set(0); const handleSignal = sig => countMaster.stop(sig, () => process.exit(0)); process.on('SIGINT', handleSignal);