[BREAK] Update the default port of the Prometheus exporter (#11351)

pull/10059/head
thaiphv 7 years ago committed by Diego Sampaio
parent 652d373b06
commit 3132dbc006
  1. 15
      packages/rocketchat-lib/server/lib/metrics.js
  2. 3
      packages/rocketchat-lib/server/startup/settings.js

@ -141,6 +141,21 @@ app.use('/metrics', (req, res) => {
res.end(RocketChat.promclient.register.metrics());
});
app.use('/', (req, res) => {
const html = `<html>
<head>
<title>Rocket.Chat Prometheus Exporter</title>
</head>
<body>
<h1>Rocket.Chat Prometheus Exporter</h1>
<p><a href="/metrics">Metrics</a></p>
</body>
</html>`;
res.write(html);
res.end();
});
const server = http.createServer(app);
let timer;

@ -1731,7 +1731,8 @@ RocketChat.settings.addGroup('Logs', function() {
type: 'boolean',
i18nLabel: 'Enabled',
});
this.add('Prometheus_Port', 9100, {
// See the default port allocation at https://github.com/prometheus/prometheus/wiki/Default-port-allocations
this.add('Prometheus_Port', 9458, {
type: 'string',
i18nLabel: 'Port',
});

Loading…
Cancel
Save