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

-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));