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.
This commit is contained in:
Hornwitser committed 2019-08-24 11:25:40 +02:00
1 parent ea2f291025
commit ab2a377ca5
3 files changed
-9

No files matched your search

-1
View File
@@ -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
}
-1
View File
@@ -42,6 +42,5 @@
"enableCrossServerShout": true,
"mirrorAllChat": false,
"autosaveInterval": 600000,
"disablePrometheusPushgateway": false,
"disableImportsOfEverythingExceptElectricity": false
}
-7
View File
@@ -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));