mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
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:
1 parent
ea2f291025
commit
ab2a377ca5
3 files changed
-9
No files matched your search
@@ -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
|
||||
}
|
||||
@@ -42,6 +42,5 @@
|
||||
"enableCrossServerShout": true,
|
||||
"mirrorAllChat": false,
|
||||
"autosaveInterval": 600000,
|
||||
"disablePrometheusPushgateway": false,
|
||||
"disableImportsOfEverythingExceptElectricity": false
|
||||
}
|
||||
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user