Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Add prometheus port config #11115

Merged
merged 13 commits into from
Jun 15, 2018
2 changes: 1 addition & 1 deletion packages/rocketchat-lib/server/lib/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ let timer;
RocketChat.settings.get('Prometheus_Enabled', (key, value) => {
if (value === true) {
server.listen({
port: 9100,
port: RocketChat.settings.get('Prometheus_Port'),
host: process.env.BIND_IP || '0.0.0.0'
});
timer = Meteor.setInterval(setPrometheusData, 5000);
Expand Down
4 changes: 4 additions & 0 deletions packages/rocketchat-lib/server/startup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,10 @@ RocketChat.settings.addGroup('Logs', function() {
type: 'boolean',
i18nLabel: 'Enabled'
});
this.add('Prometheus_Port', 9100, {
type: 'string',
i18nLabel: 'Port'
});
});
});

Expand Down