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/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 | | | | | | +-+---------+-+ +------+------+ +---+--------+ diff --git a/server/config/config.example.js b/server/config/config.example.js index 791c120d..affafbe8 100644 --- a/server/config/config.example.js +++ b/server/config/config.example.js @@ -396,6 +396,7 @@ module.exports = /* prometheus: { deidentify: false, // deidentify IP addresses + // listen: 'localhost', // exporter listens on this address 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) {