# Prometheus exporter The goal of this version is to offer a few basic metrics for initial testing. The set of supported metrics can be extended. The current implementation is [unconventional](https://prometheus.io/docs/instrumenting/writing_exporters) in that it creates new metrics each time but does not register a custom collector. Reasons are that the exporter should [clear out metrics](https://github.com/prometheus/client_python/issues/182) for closed connections but that `prom-client` [does not yet support](https://github.com/siimon/prom-client/issues/241) custom collectors. This version has been ported from an earlier Python version that was not part of `multiparty-meeting` but connected as an interactive client. ## Configuration | `.env` | description | |--------|-------| | `DEBUG` | e.g. `*WARN*,*ERROR*,*:prom` for debugging | | `PROM_DEIDENTIFY` | if set, deidentify IP addresses | | `PROM_NUMERIC` | if set, show numerical IP addresses | | `PROM_PORT` | if set, enable exporter on this port | | `PROM_QUIET` | if set, include fewer labels | If `multiparty-meeting` was installed with [`mm-absible`](https://github.com/misi/mm-ansible) it may be necessary to open the `iptables` firewall that was established with `ferm` for incoming TCP traffic on `PROM_PORT`. ## License MIT License (without copyright notice) ## Metrics | metric | value | |--------|-------| | `edumeet_peers`| | | `edumeet_rooms`| | | `mediasoup_consumer_byte_count_bytes`| [`byteCount`](https://mediasoup.org/documentation/v3/mediasoup/rtc-statistics/#Consumer-Statistics) | | `mediasoup_consumer_score`| [`score`](https://mediasoup.org/documentation/v3/mediasoup/rtc-statistics/#Consumer-Statistics) | | `mediasoup_producer_byte_count_bytes`| [`byteCount`](https://mediasoup.org/documentation/v3/mediasoup/rtc-statistics/#Producer-Statistics) | | `mediasoup_producer_score`| [`score`](https://mediasoup.org/documentation/v3/mediasoup/rtc-statistics/#Producer-Statistics) | ## Architecture ``` +-----------+ +---------------------------------------------+ | workers | | server observer API | | | sock | +------o------+----o-----+ | +------+ | int. server | exporter | | | | | | | | mediasoup | | express socket.io | net | express | +-----+-----+ +----+---------+-----+-----+-------+-----+----+ ^ min-max ^ 443 ^ 443 ^ sock ^ PROM_PORT | RTP | HTTPS | ws | | HTTP | | | | | | +-+---------+-+ +------+------+ +---+--------+ +---------------+ app | | int. client | | Prometheus | +-------------+ +-------------+ +------------+ ```