From 2e0e1457cb80cccf5722c38369867fcdb00c079e Mon Sep 17 00:00:00 2001 From: ironoa Date: Wed, 17 Nov 2021 10:59:29 +0100 Subject: [PATCH 1/2] added liveness test --- src/subscriber.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/subscriber.ts b/src/subscriber.ts index 9e1ded6..04d665e 100644 --- a/src/subscriber.ts +++ b/src/subscriber.ts @@ -43,6 +43,8 @@ export class Subscriber { await this._handleNewHeadSubscriptions(); await this._subscribeEvents(); + + this._initMetricsLivenessTest(); } private async _initAPI(): Promise { @@ -234,6 +236,12 @@ export class Subscriber { }); } + private _initMetricsLivenessTest(): void { + const testAccountName = "LIVENESS_TEST_NO_ACTION_REQUIRED" + this.promClient.increaseTotalValidatorOfflineReports(testAccountName,testAccountName); + setTimeout(()=>{this.promClient.resetTotalValidatorOfflineReports(testAccountName);},60000) + } + private _initOutOfActiveSetMetrics(): void { this.validators.forEach((account) => { // always increase metric even the first time, so that we initialize the time serie From 698bb7538f1e5c02b268b7164917915717aa1c80 Mon Sep 17 00:00:00 2001 From: ironoa Date: Wed, 17 Nov 2021 11:00:19 +0100 Subject: [PATCH 2/2] updated version --- charts/polkadot-watcher/Chart.yaml | 2 +- charts/polkadot-watcher/values.yaml | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/polkadot-watcher/Chart.yaml b/charts/polkadot-watcher/Chart.yaml index 046c4c1..ed52899 100644 --- a/charts/polkadot-watcher/Chart.yaml +++ b/charts/polkadot-watcher/Chart.yaml @@ -1,4 +1,4 @@ description: Polkadot Watcher name: polkadot-watcher -version: v3.0.12 +version: v3.1.0 apiVersion: v2 diff --git a/charts/polkadot-watcher/values.yaml b/charts/polkadot-watcher/values.yaml index a8b72e7..f02d0a9 100644 --- a/charts/polkadot-watcher/values.yaml +++ b/charts/polkadot-watcher/values.yaml @@ -3,7 +3,7 @@ port: 3000 image: repo: web3f/polkadot-watcher - tag: v3.0.12 + tag: v3.1.0 config: endpoint: "wss://kusama-rpc.polkadot.io" diff --git a/package.json b/package.json index f63da11..a1f9f97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polkadot-watcher", - "version": "3.0.12", + "version": "3.1.0", "description": "Monitor events on Polkadot networks", "repository": "git@github.com:w3f/polkadot-watcher.git", "author": "W3F Infrastructure Team ",