From f5d1847975050e4b6954ba0b4d5a67e8f1923426 Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Sun, 6 May 2018 10:21:06 +0200 Subject: [PATCH] Revert "Prometheus now tracks import/export statistics" This reverts commit f580f060648dea188a4db1a975ba2e0082f25652. --- master.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/master.js b/master.js index b381055e..ed86924a 100644 --- a/master.js +++ b/master.js @@ -105,16 +105,6 @@ const prometheusProductionGauge = new Prometheus.Gauge({ help: 'Items produced by instance', labelNames: ["instanceID", "itemName"], }); -const prometheusExportGauge = new Prometheus.Gauge({ - name: prometheusPrefix+'export_gauge', - help: 'Items exported by instance', - labelNames: ["instanceID", "itemName"], -}); -const prometheusImportGauge = new Prometheus.Gauge({ - name: prometheusPrefix+'import_gauge', - help: 'Items imported by instance', - labelNames: ["instanceID", "itemName"], -}); const prometheusPlayerCountGauge = new Prometheus.Gauge({ name: prometheusPrefix+'player_count_gauge', help: 'Amount of players connected to this cluster', @@ -448,13 +438,11 @@ app.post("/api/place", authenticate.middleware, function(req, res) { key:req.body.name, value:req.body.count, }); - prometheusExportGauge.labels(x.instanceID, req.body.name).inc(req.body.count); // save items we get db.items.addItem({ name:req.body.name, count:req.body.count }); - // Attempt confirming res.send("success"); } else { @@ -526,8 +514,6 @@ app.post("/api/remove", authenticate.middleware, function(req, res) { //console.log(sentItemStatistics.data) sentItemStatisticsBySlaveID[object.instanceID] = sentItemStatistics; } - - prometheusImportGauge.labels(object.instanceID, object.name).inc(object.count); res.send({count: object.count, name: object.name}); httpRequestDurationMilliseconds.labels(req.route.path).observe(Date.now()-reqStartTime); } else {