From ab2a377ca5eeed0e8c70bcb9f0eeccaad0af237e Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Fri, 23 Aug 2019 21:39:09 +0200 Subject: [PATCH] Remove Prometheus pushgateway code Remove code pushing metrics to a hardcoded Prometheus pushgateway that is no longer in operation. There's no point supporting the use of a pushgateway as there's already a full client implemented and since the master server is not ephemeral or batch job it shouldn't be using a pushgateway in the first place. --- config.json.dist | 1 - config.json.test | 1 - master.js | 7 ------- 3 files changed, 9 deletions(-) diff --git a/config.json.dist b/config.json.dist index d7f6a6b3..9af0ace7 100644 --- a/config.json.dist +++ b/config.json.dist @@ -57,7 +57,6 @@ "mirrorAllChat": false, "__comment7": "Autosave interval for items in the master storage in milliseconds. Defaults to one minute when set to 0 or not set.", "autosaveInterval": 600000, - "disablePrometheusPushgateway": false, "__comment8": "This setting only affects the master. It makes every import for things that arent 'electricity' return a maximum of 0. Effectively disables teleport chests.", "disableImportsOfEverythingExceptElectricity": false } diff --git a/config.json.test b/config.json.test index 3ea35cbd..d3ecb3f7 100644 --- a/config.json.test +++ b/config.json.test @@ -42,6 +42,5 @@ "enableCrossServerShout": true, "mirrorAllChat": false, "autosaveInterval": 600000, - "disablePrometheusPushgateway": false, "disableImportsOfEverythingExceptElectricity": false } diff --git a/master.js b/master.js index 8c9b8d7c..c74e6934 100644 --- a/master.js +++ b/master.js @@ -82,13 +82,6 @@ const prometheusPrefix = "clusterio_"; const Prometheus = require('prom-client'); const expressPrometheus = require('express-prometheus-request-metrics'); Prometheus.collectDefaultMetrics({ timeout: 10000 }); // collects RAM usage etc every 10 s -if(!config.disablePrometheusPushgateway){ - const pushgateway = new Prometheus.Pushgateway('http://hme.danielv.no:9091'); - setInterval(() => { - registerMoreMetrics(); - pushgateway.push({ jobName: 'clusterio', groupings: {instance: config.publicIP + ":" + config.masterPort, owner: config.username}}, function(err, resp, body) {}) - }, 15000) -} // collect express request durations ms app.use(expressPrometheus(Prometheus));