From 2444bc99af4a9f3d39ab4c2df07df42922f0e116 Mon Sep 17 00:00:00 2001 From: christian2 Date: Fri, 29 May 2020 10:04:27 +0200 Subject: [PATCH 1/3] fix docu --- prom.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prom.md b/prom.md index 51ba2e8d..30f06292 100644 --- a/prom.md +++ b/prom.md @@ -46,7 +46,7 @@ on the allocated port (see `/etc/ferm/ferm.conf`). | | | | | | | mediasoup | | express socket.io | net | express | +-----+-----+ +----+---------+-----+-----+-------+-----+----+ - ^ min-max ^ 443 ^ 443 ^ sock ^ PROM_PORT + ^ min-max ^ 443 ^ 443 ^ sock ^ 8889 | RTP | HTTPS | ws | | HTTP | | | | | | +-+---------+-+ +------+------+ +---+--------+ From 3de7b7fddc3d4ede4cf4f0ac38991348805ab8ab Mon Sep 17 00:00:00 2001 From: christian2 Date: Fri, 29 May 2020 11:30:33 +0200 Subject: [PATCH 2/3] resolves #421 --- server/config/config.example.js | 1 + server/lib/promExporter.js | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/config/config.example.js b/server/config/config.example.js index ef2978e9..b57e9190 100644 --- a/server/config/config.example.js +++ b/server/config/config.example.js @@ -387,6 +387,7 @@ module.exports = /* prometheus: { deidentify: false, // deidentify IP addresses + // listen: 'localhost', numeric: false, // show numeric IP addresses port: 8889, // allocated port quiet: false // include fewer labels diff --git a/server/lib/promExporter.js b/server/lib/promExporter.js index 0bcb4bb8..82bb7a13 100644 --- a/server/lib/promExporter.js +++ b/server/lib/promExporter.js @@ -242,6 +242,7 @@ module.exports = async function(rooms, peers, config) try { logger.debug(`config.deidentify=${config.deidentify}`); + logger.debug(`config.listen=${config.listen}`); logger.debug(`config.numeric=${config.numeric}`); logger.debug(`config.port=${config.port}`); logger.debug(`config.quiet=${config.quiet}`); @@ -270,12 +271,13 @@ module.exports = async function(rooms, peers, config) res.end(data); }); - const server = app.listen(config.port || 8889, () => - { - const address = server.address(); + const server = app.listen(config.port || 8889, + config.listen || undefined, () => + { + const address = server.address(); - logger.info(`listening ${address.address}:${address.port}`); - }); + logger.info(`listening ${address.address}:${address.port}`); + }); } catch (err) { From 7afe252b787c5e3d883c889b091da201ea9bea12 Mon Sep 17 00:00:00 2001 From: christian2 Date: Sat, 30 May 2020 06:41:48 +0200 Subject: [PATCH 3/3] fix docu --- README.md | 3 +++ server/config/config.example.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 43269d83..4b88be4c 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,9 @@ To integrate with an LMS (e.g. Moodle), have a look at [LTI](LTI/LTI.md). * You need an additional [TURN](https://github.com/coturn/coturn)-server for clients located behind restrictive firewalls! Add your server and credentials to `app/config.js` +## Prometheus monitoring +To enable the exporter, have a look at [prom](prom.md). + ## Community-driven support * Open mailing list: community@lists.edumeet.org diff --git a/server/config/config.example.js b/server/config/config.example.js index b57e9190..bbcbf960 100644 --- a/server/config/config.example.js +++ b/server/config/config.example.js @@ -387,7 +387,7 @@ module.exports = /* prometheus: { deidentify: false, // deidentify IP addresses - // listen: 'localhost', + // listen: 'localhost', // exporter listens on this address numeric: false, // show numeric IP addresses port: 8889, // allocated port quiet: false // include fewer labels