diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6f7318d2f..1166eaed98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,64 @@ on: - master jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - name: Check Node / npm versions + run: | + node -v + npm -v + - name: setup tpl + run: | + dpkgArch="$(dpkg --print-architecture)" + case "${dpkgArch##*-}" in \ + "amd64") TPL_ARCH=amd64; S6_ARCH=amd64 ;; \ + "arm64") TPL_ARCH=arm64; S6_ARCH=aarch64 ;; \ + *) echo "unsupported architecture"; exit 1 ;; \ + esac + wget -qO /tmp/tpl https://github.com/jitsi/tpl/releases/download/v1.4.0/tpl-linux-${TPL_ARCH} + chmod +x /tmp/tpl + - name: Run tpl with default values for web + run: | + /tmp/tpl web/rootfs/defaults/system-config.js > /tmp/config.js + /tmp/tpl web/rootfs/defaults/settings-config.js >> /tmp/config.js + - name: Check config.js syntax + run: node /tmp/config.js + - name: Run tpl with default values for jvb + run: | + /tmp/tpl jvb/rootfs/defaults/jvb.conf > /tmp/jvb.conf + /tmp/tpl jvb/rootfs/defaults/logging.properties > /tmp/logging.properties + /tmp/tpl jvb/rootfs/defaults/autoscaler-sidecar.config > /tmp/autoscaler-sidecar.config + - name: Run tpl with default values for jicofo + run: | + /tmp/tpl jicofo/rootfs/defaults/jicofo.conf > /tmp/jicofo.conf + /tmp/tpl jicofo/rootfs/defaults/logging.properties > /tmp/logging.properties + - name: Run tpl with default values for jibri + run: | + /tmp/tpl jibri/rootfs/defaults/jibri.conf > /tmp/jibri.conf + /tmp/tpl jibri/rootfs/defaults/logging.properties > /tmp/logging.properties + /tmp/tpl jibri/rootfs/defaults/xmpp.conf > /tmp/xmpp.conf + /tmp/tpl jibri/rootfs/defaults/xorg-video-dummy.conf > /tmp/xorg-video-dummy.conf + /tmp/tpl jibri/rootfs/defaults/autoscaler-sidecar.config > /tmp/autoscaler-sidecar.config + - name: Run tpl with default values for jigasi + run: | + /tmp/tpl jigasi/rootfs/defaults/sip-communicator.properties > /tmp/sip-communicator.properties + /tmp/tpl jigasi/rootfs/defaults/sipserver-sip-communicator.properties > /tmp/xmpp-sip-communicator.properties + /tmp/tpl jigasi/rootfs/defaults/transcriber-sip-communicator.properties > /tmp/xmpp-sip-communicator.properties + /tmp/tpl jigasi/rootfs/defaults/xmpp-sip-communicator.properties > /tmp/xmpp-sip-communicator.properties + /tmp/tpl jigasi/rootfs/defaults/logging.properties > /tmp/logging.properties + /tmp/tpl jigasi/rootfs/defaults/autoscaler-sidecar.config > /tmp/autoscaler-sidecar.config + - name: Run tpl with default values for prosody + run: | + /tmp/tpl prosody/rootfs/defaults/prosody.cfg.lua > /tmp/prosody.cfg.lua + /tmp/tpl prosody/rootfs/defaults/saslauthd.conf > /tmp/saslauthd.conf + /tmp/tpl prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua > /tmp/jitsi-meet.cfg.lua + /tmp/tpl prosody/rootfs/defaults/conf.d/brewery.cfg.lua > /tmp/brewery.cfg.lua + /tmp/tpl prosody/rootfs/defaults/conf.d/visitors.cfg.lua > /tmp/visitors.cfg.lua + /tmp/tpl prosody/rootfs/defaults/rules.d/jvb_muc_presence_filter.pfw > /tmp/jvb_muc_presence_filter.pfw build: runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 479db34b48..62eb352f91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,103 @@ +## stable-9955 + +Based on stable release 9955. + +* 3ba77e1 feat(prosody) - Added TURN_USERNAME and TURN_PASSWORD (#1989) +* 82e98d2 web: Added P2P_STUN_SERVERS environment variable (#1990) +* 02499f8 feat(grafana): prosody monitoring dashboard created (#1879) +* 3af0725 web: add option param for Automatic Gain Control +* 9bc57e2 misc: working on unstable + +## stable-9909 + +Based on stable release 9909. + +* 9098202 feat(lint): add tpl lint step for each project (#1983) +* 70b75f5 feat(build): Checks config.js syntax. (#1981) +* f18b182 fix(web): config.js syntax errors (#1980) +* eea18b1 feat: Add an option to enable VLA. (#1979) +* 9527545 feat(web) Add defaults and env variables for codec preference. (#1978) +* 6ae3414 feat(prosody): Sets recorder prefixes. +* 07ea79a feat(prosody): Enables connection resumption for jicofo and jvb. +* 5341065 Update docker-compose.yml (#1968) +* 5e8b702 fix(prosody-visitors): proper variable for transcriber jid in rate limit (#1967) +* d3db3a5 fix(jibri,jicofo,jigasi,prosody,web): respect previous XMPP_RECORDER_DOMAIN value if set (#1966) +* 2d9c3cc feat(web): allow comment at the top of config.js to be overridden (#1964) +* 9fe5b8b fix(web) Remove no longer used config setting. Av1 has already been enabled by default. +* a53775c misc: working on unstable + +## stable-9823 + +Based on stable release 9823. + +* 51a1214 feat(jibri) bump Chrome to version 130 +* 345f8c2 fix(prosody,jicofo,jigasi,jibri) rename recorder domain to hidden domain +* 47d974d feat(jibri,jicofo,jvb): custom hocon support via include for components that support it (#1960) +* 6443c6f feat(transcriber): fix exposing transcript path in web +* 74d913f feat(transcriber): flag to enable translations (#1953) +* 8909050 feat(transcriber): remote config auth parameters (#1951) +* bb17a29 feat(prosody): enable muc_max_participants in lobby component (#1950) +* 26b6f27 fix(prosody): remove admin_adhoc module from defaults (#1948) +* 4ae7438 feat(prosody): move external_services module and config to global prosody.cfg.lua (#1949) +* 74a536e misc: working on unstable + +## stable-9779 + +Based on stable release 9779. + +* a5b719c :sparkles: allow configuration of a custom translation service (such as libretranslate) (#1946) +* d6251b7 feat(jaas): updated jaas URLs (#1944) +* 2a87a50 fix(jigasi): ensure tpl doesn't fail even if no JIGASI_SIP_PASSWORD is set (#1943) +* 5164db7 feat(jigasi): config for jigasi in visitor mode (#1942) +* a88c6e4 feat(prosody): allow s2s whitelist additions (#1940) +* b89c328 fix(prosody): install the new version of jitsi-contrib/prosody-plugins +* 0b75cd1 fix(transcriber): fix bosh and xmpp connections from jigasi to prosody (#1934) +* 4369907 feat(jibri,jicofo,jigasi,jvb,prosody,web): trim empty list entries when splitting with splitList to allow trailing comma (#1932) +* c58a9e5 feat(prosody): allow components access even after max participants is reached (#1930) +* 5e1fcd8 fix(prosody): default value for PROSODY_MODE (#1929) +* 7b7f101 feat(prosody): new flags to disable incoming client and server conection limits (#1928) +* 02aa4f1 fix: Only set app_secret when defined. (#1925) +* df0bb25 fix(prosody): install the new version of jitsi-contrib/prosody-plugins (#1926) +* ff0cdc7 fix(prosody): tpl errors on container startup due to missing variables (#1924) +* 905943d feat(prosody) update prosody contrib plugins from 20240117 to 20240817 +* 1f2b14d feat(prosody): enable recorder domain for s2s to visitor nodes to allow transcription support (#1905) +* c9b6679 feat(web): mount load-test volume to expose load-test client from host (#1910) +* b726312 feat(jicofo) add config parameter for ENABLE_MODERATOR_CHECKS +* 2d39624 misc: working on unstable + +## stable-9753 + +Based on stable release 9753. + +* 9e17f95 feat(jigasi): allow unique account UID for each entry even if the same auth is used (#1917) +* ad2a577 fix(jigasi): transcriber VOSK URL variable into compose file (#1916) +* 6c08391 feat(jigasi): transcriber configuration supports vosk URL (#1915) +* 1db83ed feat(ldap): Start and configure only if enabled. +* ceb4a51 feat(prosody): Skip some modules for prosody-jvb. +* e7786d5 feat(jigasi): transcriber configuration for OCI and whisper and to skip saving (#1909) +* c5afcde feat(jigasi): support graceful shutdown via sidecar (#1908) +* 5d40297 feat(jigasi): allow optional label for xmpp servers (#1907) +* e7cb0f4 feat(jvb): autoscaler sidecar shutdown hook on finish (#1906) +* b0675c0 prosody: recording metadata module (#1734) +* 36b2e16 feat(web) - Added NGINX_KEEPALIVE_TIMEOUT environment variable +* 24bf3e4 fix(web) add HTTPS port to URL in env.example +* 2280f6b feat(web) add ability to run the web container targetting JaaS +* ff49cd9 Revert "feat(jigasi): install openjdk nonheadless, currently required for dep…" (#1899) +* 66c6ad8 feat(jigasi): install openjdk nonheadless, currently required for dependencies (#1895) +* 3f67408 feat(jigasi,transcriber): transcriber component and jigasi configuration updates (#1881) +* 3e93212 fix(jicofo): pass compose variable for jicofo transcription support (#1893) +* 084266c feat(transcriber): transcriber password in env.example and gen-passwords.sh (#1894) +* e1b14f2 feat(prosody): enable brewery muc modules in internal muc component (#1892) +* 1889c5d fix(web): enable hidden domain when transcriptions or recordings are enabled (#1891) +* 46377d4 feat(prosody): transcriber account support and flag configuration fix (#1890) +* 9f2489d feat(log-analyser): updated grafana dashboards (#1885) +* 1e589f3 feat(log-analyser): transfered docker logs from docker containers and updated readme (#1884) +* 1f056b4 web: remove unnecessary option +* f893e49 base: update tpl +* 7617503 fix(log-analyser): added Jitsi network to loki service +* 27150a2 feat(prometheus): Docker Daemon scraping for monitoring (#1865) +* d6b64a2 misc: working on unstable + ## stable-9646 Based on stable release 9646. diff --git a/base/Dockerfile b/base/Dockerfile index 37c96a5e8b..d862ab5cac 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -14,7 +14,7 @@ RUN \ esac && \ apt-dpkg-wrap apt-get update && \ apt-dpkg-wrap apt-get install -y apt-transport-https apt-utils ca-certificates gnupg wget curl && \ - wget -qO /usr/bin/tpl https://github.com/jitsi/tpl/releases/download/v1.3.0/tpl-linux-${TPL_ARCH} && \ + wget -qO /usr/bin/tpl https://github.com/jitsi/tpl/releases/download/v1.4.0/tpl-linux-${TPL_ARCH} && \ # Workaround S6 bug when /bin is a symlink wget -qO /tmp/s6.tar.gz https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-${S6_ARCH}.tar.gz && \ mkdir /tmp/s6 && \ diff --git a/docker-compose.yml b/docker-compose.yml index 37567d5ef8..b518811e07 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.5' services: # Frontend web: - image: jitsi/web:${JITSI_IMAGE_VERSION:-stable-9646} + image: jitsi/web:${JITSI_IMAGE_VERSION:-stable-9955} restart: ${RESTART_POLICY:-unless-stopped} ports: - '${HTTP_PORT}:80' @@ -12,6 +12,9 @@ services: - ${CONFIG}/web:/config:Z - ${CONFIG}/web/crontabs:/var/spool/cron/crontabs:Z - ${CONFIG}/transcripts:/usr/share/jitsi-meet/transcripts:Z + - ${CONFIG}/web/load-test:/usr/share/jitsi-meet/load-test:Z + labels: + service: "jitsi-web" environment: - AMPLITUDE_ID - ANALYTICS_SCRIPT_URLS @@ -21,6 +24,10 @@ services: - BRANDING_DATA_URL - BOSH_RELATIVE - CHROME_EXTENSION_BANNER_JSON + - CODEC_ORDER_JVB + - CODEC_ORDER_JVB_MOBILE + - CODEC_ORDER_P2P + - CODEC_ORDER_P2P_MOBILE - COLIBRI_WEBSOCKET_PORT - COLIBRI_WEBSOCKET_JVB_LOOKUP_NAME - COLIBRI_WEBSOCKET_REGEX @@ -54,7 +61,9 @@ services: - DROPBOX_APPKEY - DROPBOX_REDIRECT_URI - DYNAMIC_BRANDING_URL + - ENABLE_ADAPTIVE_MODE - ENABLE_AUDIO_PROCESSING + - ENABLE_AUTOMATIC_GAIN_CONTROL - ENABLE_AUTH - ENABLE_AUTH_DOMAIN - ENABLE_BREAKOUT_ROOMS @@ -95,6 +104,7 @@ services: - ENABLE_TALK_WHILE_MUTED - ENABLE_TCC - ENABLE_TRANSCRIPTIONS + - ENABLE_VLA - ENABLE_XMPP_WEBSOCKET - ENABLE_JAAS_COMPONENTS - ETHERPAD_PUBLIC_URL @@ -115,6 +125,7 @@ services: - MATOMO_ENDPOINT - MATOMO_SITE_ID - MICROSOFT_API_APP_CLIENT_ID + - NGINX_KEEPALIVE_TIMEOUT - NGINX_RESOLVER - NGINX_WORKER_PROCESSES - NGINX_WORKER_CONNECTIONS @@ -122,6 +133,7 @@ services: - PREFERRED_LANGUAGE - PUBLIC_URL - P2P_PREFERRED_CODEC + - P2P_STUN_SERVERS - RESOLUTION - RESOLUTION_MIN - RESOLUTION_WIDTH @@ -132,7 +144,6 @@ services: - START_WITH_AUDIO_MUTED - START_VIDEO_MUTED - START_WITH_VIDEO_MUTED - - TESTING_AV1_SUPPORT - TOKEN_AUTH_URL - TOOLBAR_BUTTONS - TRANSLATION_LANGUAGES @@ -169,8 +180,9 @@ services: - XMPP_DOMAIN - XMPP_GUEST_DOMAIN - XMPP_MUC_DOMAIN - - XMPP_RECORDER_DOMAIN + - XMPP_HIDDEN_DOMAIN - XMPP_PORT + - XMPP_RECORDER_DOMAIN - WHITEBOARD_COLLAB_SERVER_PUBLIC_URL - WHITEBOARD_COLLAB_SERVER_URL_BASE networks: @@ -180,13 +192,15 @@ services: # XMPP server prosody: - image: jitsi/prosody:${JITSI_IMAGE_VERSION:-stable-9646} + image: jitsi/prosody:${JITSI_IMAGE_VERSION:-stable-9955} restart: ${RESTART_POLICY:-unless-stopped} expose: - '${XMPP_PORT:-5222}' - '${PROSODY_S2S_PORT:-5269}' - '5347' - '${PROSODY_HTTP_PORT:-5280}' + labels: + service: "jitsi-prosody" volumes: - ${CONFIG}/prosody/config:/config:Z - ${CONFIG}/prosody/prosody-plugins-custom:/prosody-plugins-custom:Z @@ -202,6 +216,7 @@ services: - ENABLE_LOBBY - ENABLE_RECORDING - ENABLE_S2S + - ENABLE_TRANSCRIPTIONS - ENABLE_VISITORS - ENABLE_XMPP_WEBSOCKET - ENABLE_JAAS_COMPONENTS @@ -220,6 +235,8 @@ services: - JIBRI_XMPP_PASSWORD - JICOFO_AUTH_PASSWORD - JICOFO_COMPONENT_SECRET + - JIGASI_TRANSCRIBER_PASSWORD + - JIGASI_TRANSCRIBER_USER - JIGASI_XMPP_USER - JIGASI_XMPP_PASSWORD - JVB_AUTH_USER @@ -260,7 +277,10 @@ services: - PROSODY_C2S_REQUIRE_ENCRYPTION - PROSODY_RESERVATION_ENABLED - PROSODY_RESERVATION_REST_BASE_URL + - PROSODY_DISABLE_C2S_LIMIT + - PROSODY_DISABLE_S2S_LIMIT - PROSODY_ENABLE_RATE_LIMITS + - PROSODY_ENABLE_RECORDING_METADATA - PROSODY_ENABLE_STANZA_COUNTS - PROSODY_ENABLE_S2S - PROSODY_ENABLE_METRICS @@ -279,15 +299,19 @@ services: - PROSODY_TRUSTED_PROXIES - PROSODY_VISITOR_INDEX - PROSODY_VISITORS_MUC_PREFIX + - PROSODY_VISITORS_S2S_VHOSTS - PUBLIC_URL - STUN_HOST - STUN_PORT - TURN_CREDENTIALS + - TURN_USERNAME + - TURN_PASSWORD - TURN_HOST - TURNS_HOST - TURN_PORT - TURNS_PORT - TURN_TRANSPORT + - TURN_TTL - TZ - VISITORS_MAX_VISITORS_PER_NODE - VISITORS_XMPP_DOMAIN @@ -305,8 +329,9 @@ services: - XMPP_MUC_MODULES - XMPP_MUC_CONFIGURATION - XMPP_INTERNAL_MUC_MODULES - - XMPP_RECORDER_DOMAIN + - XMPP_HIDDEN_DOMAIN - XMPP_PORT + - XMPP_RECORDER_DOMAIN - XMPP_SERVER_S2S_PORT - XMPP_SPEAKERSTATS_MODULES networks: @@ -316,18 +341,21 @@ services: # Focus component jicofo: - image: jitsi/jicofo:${JITSI_IMAGE_VERSION:-stable-9646} + image: jitsi/jicofo:${JITSI_IMAGE_VERSION:-stable-9955} restart: ${RESTART_POLICY:-unless-stopped} ports: - '127.0.0.1:${JICOFO_REST_PORT:-8888}:8888' volumes: - ${CONFIG}/jicofo:/config:Z + labels: + service: "jitsi-jicofo" environment: - AUTH_TYPE - BRIDGE_AVG_PARTICIPANT_STRESS - BRIDGE_STRESS_THRESHOLD - ENABLE_AUTH - ENABLE_AUTO_OWNER + - ENABLE_MODERATOR_CHECKS - ENABLE_CODEC_VP8 - ENABLE_CODEC_VP9 - ENABLE_CODEC_AV1 @@ -338,6 +366,7 @@ services: - ENABLE_OCTO_SCTP - ENABLE_RECORDING - ENABLE_SCTP + - ENABLE_TRANSCRIPTIONS - ENABLE_VISITORS - ENABLE_AUTO_LOGIN - JICOFO_AUTH_LIFETIME @@ -387,10 +416,11 @@ services: - XMPP_AUTH_DOMAIN - XMPP_INTERNAL_MUC_DOMAIN - XMPP_MUC_DOMAIN - - XMPP_RECORDER_DOMAIN + - XMPP_HIDDEN_DOMAIN - XMPP_REPLY_TIMEOUT - XMPP_SERVER - XMPP_PORT + - XMPP_RECORDER_DOMAIN - MAX_SSRCS_PER_USER - MAX_SSRC_GROUPS_PER_USER depends_on: @@ -400,13 +430,15 @@ services: # Video bridge jvb: - image: jitsi/jvb:${JITSI_IMAGE_VERSION:-stable-9646} + image: jitsi/jvb:${JITSI_IMAGE_VERSION:-stable-9955} restart: ${RESTART_POLICY:-unless-stopped} ports: - '${JVB_PORT:-10000}:${JVB_PORT:-10000}/udp' - '127.0.0.1:${JVB_COLIBRI_PORT:-8080}:8080' volumes: - ${CONFIG}/jvb:/config:Z + labels: + service: "jitsi-jvb" environment: - AUTOSCALER_SIDECAR_KEY_FILE - AUTOSCALER_SIDECAR_KEY_ID diff --git a/env.example b/env.example index dd8c50a847..ff21e16fa6 100644 --- a/env.example +++ b/env.example @@ -18,7 +18,7 @@ # Directory where all configuration will be stored CONFIG=~/.jitsi-meet-cfg -# Exposed HTTP port +# Exposed HTTP port (will redirect to HTTPS port) HTTP_PORT=8000 # Exposed HTTPS port @@ -28,7 +28,8 @@ HTTPS_PORT=8443 TZ=UTC # Public URL for the web service (required) -#PUBLIC_URL=https://meet.example.com +# Keep in mind that if you use a non-standard HTTPS port, it has to appear in the public URL +#PUBLIC_URL=https://meet.example.com:${HTTPS_PORT} # Media IP addresses to advertise by the JVB # This setting deprecates DOCKER_HOST_ADDRESS, and supports a comma separated list of IPs @@ -115,10 +116,10 @@ TZ=UTC # Authentication configuration (see handbook for details) # -# Enable authentication +# Enable authentication (will ask for login and password to join the meeting) #ENABLE_AUTH=1 -# Enable guest access +# Enable guest access (if authentication is enabled, this allows for users to be held in lobby until registered user lets them in) #ENABLE_GUESTS=1 # Select authentication type: internal, jwt, ldap or matrix @@ -204,6 +205,9 @@ JVB_AUTH_PASSWORD= # XMPP password for Jigasi MUC client connections JIGASI_XMPP_PASSWORD= +# XMPP password for Jigasi transcriber client connections +JIGASI_TRANSCRIBER_PASSWORD= + # XMPP recorder password for Jibri client connections JIBRI_RECORDER_PASSWORD= diff --git a/gen-passwords.sh b/gen-passwords.sh index 29aec9b785..a499e55af5 100755 --- a/gen-passwords.sh +++ b/gen-passwords.sh @@ -9,6 +9,7 @@ JVB_AUTH_PASSWORD=$(generatePassword) JIGASI_XMPP_PASSWORD=$(generatePassword) JIBRI_RECORDER_PASSWORD=$(generatePassword) JIBRI_XMPP_PASSWORD=$(generatePassword) +JIGASI_TRANSCRIBER_PASSWORD=$(generatePassword) sed -i.bak \ -e "s#JICOFO_AUTH_PASSWORD=.*#JICOFO_AUTH_PASSWORD=${JICOFO_AUTH_PASSWORD}#g" \ @@ -16,4 +17,5 @@ sed -i.bak \ -e "s#JIGASI_XMPP_PASSWORD=.*#JIGASI_XMPP_PASSWORD=${JIGASI_XMPP_PASSWORD}#g" \ -e "s#JIBRI_RECORDER_PASSWORD=.*#JIBRI_RECORDER_PASSWORD=${JIBRI_RECORDER_PASSWORD}#g" \ -e "s#JIBRI_XMPP_PASSWORD=.*#JIBRI_XMPP_PASSWORD=${JIBRI_XMPP_PASSWORD}#g" \ + -e "s#JIGASI_TRANSCRIBER_PASSWORD=.*#JIGASI_TRANSCRIBER_PASSWORD=${JIGASI_TRANSCRIBER_PASSWORD}#g" \ "$(dirname "$0")/.env" diff --git a/grafana.yml b/grafana.yml index 63b5b5bc67..02b8b2e9ac 100644 --- a/grafana.yml +++ b/grafana.yml @@ -11,3 +11,5 @@ services: - ./log-analyser/grafana-provisioning/dashboards/:/etc/grafana/provisioning/dashboards/ ports: - "3000:3000" + networks: + meet.jitsi: diff --git a/jibri.yml b/jibri.yml index bc637ba96f..1789950bba 100644 --- a/jibri.yml +++ b/jibri.yml @@ -2,7 +2,7 @@ version: '3.5' services: jibri: - image: jitsi/jibri:${JITSI_IMAGE_VERSION:-stable-9646} + image: jitsi/jibri:${JITSI_IMAGE_VERSION:-stable-9955} restart: ${RESTART_POLICY:-unless-stopped} volumes: - ${CONFIG}/jibri:/config:Z @@ -59,9 +59,10 @@ services: - XMPP_DOMAIN - XMPP_INTERNAL_MUC_DOMAIN - XMPP_MUC_DOMAIN - - XMPP_RECORDER_DOMAIN + - XMPP_HIDDEN_DOMAIN - XMPP_SERVER - XMPP_PORT + - XMPP_RECORDER_DOMAIN - XMPP_TRUST_ALL_CERTS depends_on: - jicofo diff --git a/jibri/Dockerfile b/jibri/Dockerfile index a99d01401c..6ac03633fb 100644 --- a/jibri/Dockerfile +++ b/jibri/Dockerfile @@ -11,7 +11,7 @@ LABEL org.opencontainers.image.documentation="https://jitsi.github.io/handbook/" ARG USE_CHROMIUM=0 #ARG CHROME_RELEASE=latest # https://googlechromelabs.github.io/chrome-for-testing/ -ARG CHROME_RELEASE=126.0.6478.126 +ARG CHROME_RELEASE=130.0.6723.116 COPY rootfs/ / diff --git a/jibri/rootfs/defaults/jibri.conf b/jibri/rootfs/defaults/jibri.conf index 0eac063006..a64b1738e4 100644 --- a/jibri/rootfs/defaults/jibri.conf +++ b/jibri/rootfs/defaults/jibri.conf @@ -39,7 +39,7 @@ jibri { } {{ if .Env.JIBRI_WEBHOOK_SUBSCRIBERS -}} webhook { - subscribers = [{{ range $index, $element := splitList "," .Env.JIBRI_WEBHOOK_SUBSCRIBERS }}{{ if gt $index 0}},{{ end }}"{{ $element }}"{{ end }}] + subscribers = [{{ range $index, $element := (splitList "," .Env.JIBRI_WEBHOOK_SUBSCRIBERS | compact) }}{{ if gt $index 0}},{{ end }}"{{ $element }}"{{ end }}] }{{ end }} ffmpeg { resolution = "{{ $JIBRI_RECORDING_RESOLUTION }}" @@ -62,7 +62,7 @@ jibri { chrome { // The flags which will be passed to chromium when launching flags = [ - "{{ join "\",\"" (splitList "," .Env.CHROMIUM_FLAGS) }}" + "{{ join "\",\"" (splitList "," .Env.CHROMIUM_FLAGS | compact) }}" ] } {{ else if $IGNORE_CERTIFICATE_ERRORS -}} @@ -116,3 +116,5 @@ jibri { } include "xmpp.conf" + +include "custom-jibri.conf" diff --git a/jibri/rootfs/defaults/xmpp.conf b/jibri/rootfs/defaults/xmpp.conf index c8e58f35c2..97d7f8fff7 100644 --- a/jibri/rootfs/defaults/xmpp.conf +++ b/jibri/rootfs/defaults/xmpp.conf @@ -8,11 +8,11 @@ {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}} -{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}} +{{ $XMPP_HIDDEN_DOMAIN := .Env.XMPP_HIDDEN_DOMAIN | default "hidden.meet.jitsi" -}} {{ $XMPP_TRUST_ALL_CERTS := .Env.XMPP_TRUST_ALL_CERTS | default "true" | toBool -}} {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} {{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}} -{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER -}} +{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER | compact -}} {{/* assign env from context, preserve during range when . is re-assigned */}} {{ $ENV := .Env -}} @@ -55,7 +55,7 @@ jibri.api.xmpp.environments = [ // The login information the selenium web client will use call-login { - domain = "{{ $XMPP_RECORDER_DOMAIN }}" + domain = "{{ $XMPP_HIDDEN_DOMAIN }}" username = "{{ $JIBRI_RECORDER_USER }}" password = "{{ $ENV.JIBRI_RECORDER_PASSWORD }}" } diff --git a/jibri/rootfs/etc/cont-init.d/10-config b/jibri/rootfs/etc/cont-init.d/10-config index d1ea95cba2..52c75adf5c 100644 --- a/jibri/rootfs/etc/cont-init.d/10-config +++ b/jibri/rootfs/etc/cont-init.d/10-config @@ -73,6 +73,9 @@ else echo "No AUTOSCALER_URL defined, leaving autoscaler sidecar disabled" fi +# maintain backward compatibility with older variable +[ -z "${XMPP_HIDDEN_DOMAIN}" ] && export XMPP_HIDDEN_DOMAIN="$XMPP_RECORDER_DOMAIN" + # always recreate configs tpl /defaults/jibri.conf > /etc/jitsi/jibri/jibri.conf tpl /defaults/xmpp.conf > /etc/jitsi/jibri/xmpp.conf diff --git a/jicofo/rootfs/defaults/jicofo.conf b/jicofo/rootfs/defaults/jicofo.conf index aab5cf21eb..5770cc4cf6 100644 --- a/jicofo/rootfs/defaults/jicofo.conf +++ b/jicofo/rootfs/defaults/jicofo.conf @@ -6,6 +6,7 @@ {{ $JICOFO_AUTH_LIFETIME := .Env.JICOFO_AUTH_LIFETIME | default "24 hours" -}} {{ $ENABLE_SCTP := .Env.ENABLE_SCTP | default "1" | toBool -}} {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool -}} +{{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}} {{ $ENABLE_OCTO := .Env.ENABLE_OCTO | default "0" | toBool -}} {{ $ENABLE_OCTO_SCTP := .Env.ENABLE_OCTO_SCTP | default $ENABLE_SCTP | toBool -}} {{ $ENABLE_AUTO_LOGIN := .Env.ENABLE_AUTO_LOGIN | default "1" | toBool -}} @@ -13,7 +14,6 @@ {{ $ENABLE_JVB_XMPP_SERVER := .Env.ENABLE_JVB_XMPP_SERVER | default "0" | toBool -}} {{ $HEALTH_CHECKS_USE_PRESENCE := .Env.JICOFO_HEALTH_CHECKS_USE_PRESENCE | default "0" | toBool -}} {{ $JIBRI_BREWERY_MUC := .Env.JIBRI_BREWERY_MUC | default "jibribrewery" -}} -{{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}} {{ $JIGASI_BREWERY_MUC := .Env.JIGASI_BREWERY_MUC | default "jigasibrewery" -}} {{ $JVB_BREWERY_MUC := .Env.JVB_BREWERY_MUC | default "jvbbrewery" -}} {{ $JIBRI_PENDING_TIMEOUT := .Env.JIBRI_PENDING_TIMEOUT | default "90 seconds" -}} @@ -27,20 +27,20 @@ {{ $VISITORS_XMPP_AUTH_DOMAIN := .Env.VISITORS_XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} {{ $VISITORS_XMPP_DOMAIN := .Env.VISITORS_XMPP_DOMAIN | default "meet.jitsi" -}} {{ $VISITORS_XMPP_SERVER := .Env.VISITORS_XMPP_SERVER | default "" -}} -{{ $VISITORS_XMPP_SERVERS := splitList "," $VISITORS_XMPP_SERVER -}} +{{ $VISITORS_XMPP_SERVERS := splitList "," $VISITORS_XMPP_SERVER | compact -}} {{ $VISITORS_XMPP_PORT := .Env.VISITORS_XMPP_PORT | default 52220 }} {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}} {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}} {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} -{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}} {{ $XMPP_REPLY_TIMEOUT := .Env.XMPP_REPLY_TIMEOUT | default "15 seconds" -}} +{{ $XMPP_HIDDEN_DOMAIN := .Env.XMPP_HIDDEN_DOMAIN | default "hidden.meet.jitsi" -}} {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} {{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}} {{ $MAX_SSRCS_PER_USER := .Env.MAX_SSRCS_PER_USER | default "20" -}} {{ $MAX_SSRC_GROUPS_PER_USER := .Env.MAX_SSRC_GROUPS_PER_USER | default $MAX_SSRCS_PER_USER -}} -{{ $TRUSTED_DOMAIN_LIST := .Env.JICOFO_TRUSTED_DOMAINS | default ($ENABLE_RECORDING | ternary $XMPP_RECORDER_DOMAIN "") -}} -{{ $TRUSTED_DOMAINS := splitList "," $TRUSTED_DOMAIN_LIST -}} +{{ $TRUSTED_DOMAIN_LIST := .Env.JICOFO_TRUSTED_DOMAINS | default (or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS | ternary $XMPP_HIDDEN_DOMAIN "") -}} +{{ $TRUSTED_DOMAINS := splitList "," $TRUSTED_DOMAIN_LIST | compact -}} {{ $ENV := .Env }} jicofo { @@ -136,6 +136,11 @@ jicofo { } {{ end }} } + rtp-extensions { + video-layers-allocation { + enabled = {{ .Env.ENABLE_VLA | default "0" | toBool }} + } + } } conference { @@ -143,6 +148,10 @@ jicofo { enable-auto-owner = {{ .Env.ENABLE_AUTO_OWNER | toBool }} {{ end }} + {{ if .Env.ENABLE_MODERATOR_CHECKS }} + enable-moderator-checks = {{ .Env.ENABLE_MODERATOR_CHECKS | toBool }} + {{ end }} + {{ if .Env.JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT }} initial-timeout = "{{ .Env.JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT }}" {{ end }} @@ -296,3 +305,5 @@ jicofo { } } + +include "custom-jicofo.conf" diff --git a/jicofo/rootfs/etc/cont-init.d/10-config b/jicofo/rootfs/etc/cont-init.d/10-config index ed4c876951..daf8aec69a 100644 --- a/jicofo/rootfs/etc/cont-init.d/10-config +++ b/jicofo/rootfs/etc/cont-init.d/10-config @@ -13,6 +13,9 @@ if [[ "$JICOFO_AUTH_PASSWORD" == "$OLD_JICOFO_AUTH_PASSWORD" ]]; then exit 1 fi +# maintain backward compatibility with older variable +[ -z "${XMPP_HIDDEN_DOMAIN}" ] && export XMPP_HIDDEN_DOMAIN="$XMPP_RECORDER_DOMAIN" + tpl /defaults/logging.properties > /config/logging.properties tpl /defaults/jicofo.conf > /config/jicofo.conf diff --git a/jigasi.yml b/jigasi.yml index c993930d49..67ce0b7616 100644 --- a/jigasi.yml +++ b/jigasi.yml @@ -3,13 +3,12 @@ version: '3.5' services: # SIP gateway (audio) jigasi: - image: jitsi/jigasi:${JITSI_IMAGE_VERSION:-stable-9646} + image: jitsi/jigasi:${JITSI_IMAGE_VERSION:-stable-9955} restart: ${RESTART_POLICY:-unless-stopped} ports: - '${JIGASI_PORT_MIN:-20000}-${JIGASI_PORT_MAX:-20050}:${JIGASI_PORT_MIN:-20000}-${JIGASI_PORT_MAX:-20050}/udp' volumes: - ${CONFIG}/jigasi:/config:Z - - ${CONFIG}/transcripts:/tmp/transcripts:Z environment: - AUTOSCALER_SIDECAR_KEY_FILE - AUTOSCALER_SIDECAR_KEY_ID @@ -24,6 +23,7 @@ services: - BOSH_URL_PATTERN - ENABLE_AUTH - ENABLE_GUESTS + - ENABLE_VISITORS - XMPP_AUTH_DOMAIN - XMPP_GUEST_DOMAIN - XMPP_MUC_DOMAIN @@ -37,6 +37,7 @@ services: - JIGASI_JVB_TIMEOUT - JIGASI_LOCAL_REGION - JIGASI_LOG_FILE + - JIGASI_MODE=sip - JIGASI_SIP_URI - JIGASI_SIP_PASSWORD - JIGASI_SIP_SERVER @@ -52,16 +53,9 @@ services: - JIGASI_HEALTH_CHECK_INTERVAL - JIGASI_SIP_KEEP_ALIVE_METHOD - JIGASI_ENABLE_SDES_SRTP - - ENABLE_TRANSCRIPTIONS - - JIGASI_TRANSCRIBER_ADVERTISE_URL - - JIGASI_TRANSCRIBER_RECORD_AUDIO - - JIGASI_TRANSCRIBER_SEND_TXT - - GC_PROJECT_ID - - GC_PRIVATE_KEY_ID - - GC_PRIVATE_KEY - - GC_CLIENT_EMAIL - - GC_CLIENT_ID - - GC_CLIENT_CERT_URL + - JIGASI_VISITORS_QUEUE_SERVICE_URL + - JIGASI_VISITORS_QUEUE_SERVICE_PRIVATE_KEY_PATH + - JIGASI_VISITORS_QUEUE_SERVICE_PRIVATE_KEY_ID - SHUTDOWN_REST_ENABLED - SENTRY_DSN="${JIGASI_SENTRY_DSN:-0}" - SENTRY_ENVIRONMENT diff --git a/jigasi/rootfs/defaults/sip-communicator.properties b/jigasi/rootfs/defaults/sip-communicator.properties index 850d1af833..0b648973ae 100644 --- a/jigasi/rootfs/defaults/sip-communicator.properties +++ b/jigasi/rootfs/defaults/sip-communicator.properties @@ -1,24 +1,14 @@ -{{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}} -{{ $JIGASI_BREWERY_MUC := .Env.JIGASI_BREWERY_MUC | default "jigasibrewery" -}} -{{ $JIGASI_XMPP_USER := .Env.JIGASI_XMPP_USER | default "jigasi" -}} {{ $JIGASI_JVB_TIMEOUT := .Env.JIGASI_JVB_TIMEOUT | default "30000" -}} {{ $JIGASI_LOCAL_REGION := .Env.JIGASI_LOCAL_REGION | default "" -}} {{ $BOSH_URL_PATTERN := .Env.BOSH_URL_PATTERN | default "" -}} -{{ $USE_TRANSLATOR_IN_CONFERENCE := .Env.USE_TRANSLATOR_IN_CONFERENCE | default "0" | toBool -}} -{{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}} -{{ $XMPP_GUEST_DOMAIN := .Env.XMPP_GUEST_DOMAIN | default "guest.meet.jitsi" -}} -{{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}} -{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} -{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} {{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}} -{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER -}} +{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER | compact -}} +{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} +{{ $XMPP_SERVER_ADDRESS := splitn ":" 3 ($XMPP_SERVERS | first) }} {{ $SHUTDOWN_REST_ENABLED := .Env.SHUTDOWN_REST_ENABLED | default "false" | toBool -}} -{{ $DISABLE_SIP := .Env.JIGASI_DISABLE_SIP | default "false" | toBool -}} -{{/* assign env from context, preserve during range when . is re-assigned */}} {{ $TRUSTED_DOMAIN_LIST := .Env.JIGASI_TRUSTED_DOMAINS | default "" -}} -{{ $TRUSTED_DOMAINS := splitList "," $TRUSTED_DOMAIN_LIST -}} -{{ $ENV := .Env -}} +{{ $TRUSTED_DOMAINS := splitList "," $TRUSTED_DOMAIN_LIST | compact -}} net.java.sip.communicator.impl.protocol.SingleCallInProgressPolicy.enabled=false @@ -31,155 +21,28 @@ net.java.sip.communicator.packetlogging.PACKET_LOGGING_ENABLED=false # Control REST Shutdown org.jitsi.jigasi.ENABLE_REST_SHUTDOWN={{ $SHUTDOWN_REST_ENABLED }} -{{ if not $ENABLE_TRANSCRIPTIONS -}} -# SIP account -net.java.sip.communicator.impl.protocol.sip.acc1=acc1 -{{ if .Env.JIGASI_SIP_SERVER }} -net.java.sip.communicator.impl.protocol.sip.acc1.PROXY_ADDRESS={{ .Env.JIGASI_SIP_SERVER }} -net.java.sip.communicator.impl.protocol.sip.acc1.PROXY_AUTO_CONFIG=false -net.java.sip.communicator.impl.protocol.sip.acc1.PROXY_PORT={{ .Env.JIGASI_SIP_PORT | default "5060" }} -net.java.sip.communicator.impl.protocol.sip.acc1.PREFERRED_TRANSPORT={{ .Env.JIGASI_SIP_TRANSPORT | default "UDP" }} -{{ end }} -{{ if .Env.JIGASI_ENABLE_SDES_SRTP | default "0" | toBool }} -net.java.sip.communicator.impl.protocol.sip.acc1.SAVP_OPTION=1 -net.java.sip.communicator.impl.protocol.sip.acc1.DEFAULT_ENCRYPTION=true -net.java.sip.communicator.impl.protocol.sip.acc1.DEFAULT_SIPZRTP_ATTRIBUTE=false -net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL.ZRTP=0 -net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL.SDES=1 -net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL.DTLS-SRTP=0 -net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL_STATUS.ZRTP=false -net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL_STATUS.SDES=true -net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL_STATUS.DTLS-SRTP=false -net.java.sip.communicator.impl.protocol.sip.acc1.SDES_CIPHER_SUITES=AES_CM_128_HMAC_SHA1_80,AES_CM_128_HMAC_SHA1_32 -{{ end }} -net.java.sip.communicator.impl.protocol.sip.acc1.ACCOUNT_UID=SIP\:{{ .Env.JIGASI_SIP_URI }} -net.java.sip.communicator.impl.protocol.sip.acc1.PASSWORD={{ .Env.JIGASI_SIP_PASSWORD | b64enc }} -net.java.sip.communicator.impl.protocol.sip.acc1.PROTOCOL_NAME=SIP -net.java.sip.communicator.impl.protocol.sip.acc1.SERVER_ADDRESS={{ .Env.JIGASI_SIP_SERVER }} -net.java.sip.communicator.impl.protocol.sip.acc1.USER_ID={{ .Env.JIGASI_SIP_URI }} -net.java.sip.communicator.impl.protocol.sip.acc1.KEEP_ALIVE_INTERVAL=25 -net.java.sip.communicator.impl.protocol.sip.acc1.KEEP_ALIVE_METHOD={{ .Env.JIGASI_SIP_KEEP_ALIVE_METHOD | default "OPTIONS" }} -net.java.sip.communicator.impl.protocol.sip.acc1.VOICEMAIL_ENABLED=false -net.java.sip.communicator.impl.protocol.sip.acc1.JITSI_MEET_ROOM_HEADER_NAME=X-Room-Name -net.java.sip.communicator.impl.protocol.sip.acc1.JITSI_MEET_DOMAIN_BASE_HEADER_NAME=X-Domain-Base -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.AMR-WB/16000=750 -# Temporarily disable G722, see: https://github.com/jitsi/docker-jitsi-meet/issues/1357 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.G722/8000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.GSM/8000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.H263-1998/90000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.H264/90000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.PCMA/8000=600 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.PCMU/8000=650 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.SILK/12000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.SILK/16000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.SILK/24000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.SILK/8000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.VP8/90000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.iLBC/8000=10 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.opus/48000=1000 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.red/90000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.speex/16000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.speex/32000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.speex/8000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.telephone-event/8000=1 -net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.ulpfec/90000=0 -net.java.sip.communicator.impl.protocol.sip.acc1.OVERRIDE_ENCODINGS=true -net.java.sip.communicator.impl.protocol.sip.acc1.DOMAIN_BASE={{ $XMPP_DOMAIN }} -{{ end -}} - -# XMPP account used for control - -{{ range $index, $element := $XMPP_SERVERS -}} -{{ $SERVER := splitn ":" 2 $element }} -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}=acc{{ $index }} -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.ACCOUNT_UID=Jabber:{{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }} -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.USER_ID={{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }} -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.IS_SERVER_OVERRIDDEN=true -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.SERVER_ADDRESS={{ $SERVER._0 }} -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.SERVER_PORT={{ $SERVER._1 | default $XMPP_PORT }} -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.PASSWORD={{ $ENV.JIGASI_XMPP_PASSWORD | b64enc }} -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.AUTO_GENERATE_RESOURCE=true -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.RESOURCE_PRIORITY=30 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.IS_CARBON_DISABLED=true -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.DEFAULT_ENCRYPTION=true -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.IS_USE_ICE=true -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.IS_ACCOUNT_DISABLED=false -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.IS_PREFERRED_PROTOCOL=false -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.AUTO_DISCOVER_JINGLE_NODES=false -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.PROTOCOL=Jabber -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.IS_USE_UPNP=false -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.USE_DEFAULT_STUN_SERVER=true -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.ENCRYPTION_PROTOCOL.DTLS-SRTP=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.ENCRYPTION_PROTOCOL_STATUS.DTLS-SRTP=true -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.VIDEO_CALLING_DISABLED=true -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.OVERRIDE_ENCODINGS=true -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.G722/8000=705 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.GSM/8000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.H263-1998/90000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.H264/90000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.PCMA/8000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.PCMU/8000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.SILK/12000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.SILK/16000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.SILK/24000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.SILK/8000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.VP8/90000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.iLBC/8000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.opus/48000=750 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.speex/16000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.speex/32000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.speex/8000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.Encodings.telephone-event/8000=0 -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.BREWERY={{ $JIGASI_BREWERY_MUC }}@{{ $XMPP_INTERNAL_MUC_DOMAIN }} -net.java.sip.communicator.impl.protocol.jabber.acc{{ $index }}.DOMAIN_BASE={{ $XMPP_DOMAIN }} -{{ end -}} org.jitsi.jigasi.BREWERY_ENABLED=true -org.jitsi.jigasi.ENABLE_SIP={{ not $DISABLE_SIP }} +org.jitsi.jigasi.MUC_JOIN_TIMEOUT=10 org.jitsi.jigasi.HEALTH_CHECK_SIP_URI={{ .Env.JIGASI_HEALTH_CHECK_SIP_URI | default "" }} org.jitsi.jigasi.HEALTH_CHECK_INTERVAL={{ .Env.JIGASI_HEALTH_CHECK_INTERVAL | default "300000" }} org.jitsi.jigasi.HEALTH_CHECK_TIMEOUT=600000 org.jitsi.jigasi.xmpp.acc.IS_SERVER_OVERRIDDEN=true -org.jitsi.jigasi.xmpp.acc.SERVER_ADDRESS={{ $XMPP_SERVER }} +org.jitsi.jigasi.xmpp.acc.SERVER_ADDRESS={{ $XMPP_SERVER_ADDRESS._0 }} +org.jitsi.jigasi.xmpp.acc.SERVER_PORT={{ $XMPP_SERVER_ADDRESS._1 | default $XMPP_PORT }} org.jitsi.jigasi.xmpp.acc.VIDEO_CALLING_DISABLED=true org.jitsi.jigasi.xmpp.acc.JINGLE_NODES_ENABLED=false org.jitsi.jigasi.xmpp.acc.AUTO_DISCOVER_STUN=false org.jitsi.jigasi.xmpp.acc.IM_DISABLED=true org.jitsi.jigasi.xmpp.acc.SERVER_STORED_INFO_DISABLED=true org.jitsi.jigasi.xmpp.acc.IS_FILE_TRANSFER_DISABLED=true -{{ if .Env.ENABLE_AUTH | default "0" | toBool }} -{{ if .Env.ENABLE_GUESTS | default "0" | toBool }} -org.jitsi.jigasi.xmpp.acc.USER_ID={{ $JIGASI_XMPP_USER }}@{{ $XMPP_GUEST_DOMAIN }} -org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=true -{{ else }} -org.jitsi.jigasi.xmpp.acc.USER_ID={{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }} -org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=false -{{ end }} -org.jitsi.jigasi.xmpp.acc.PASS={{ .Env.JIGASI_XMPP_PASSWORD }} -org.jitsi.jigasi.xmpp.acc.ALLOW_NON_SECURE=true -{{ end }} # Activate this property if you are using self-signed certificates or other # type of non-trusted certicates. In this mode your service trust in the # remote certificates always. net.java.sip.communicator.service.gui.ALWAYS_TRUST_MODE_ENABLED=true -{{ if $ENABLE_TRANSCRIPTIONS -}} -# Transcription config -org.jitsi.jigasi.ENABLE_TRANSCRIPTION=true -org.jitsi.jigasi.transcription.ENABLE_TRANSLATION=true -org.jitsi.jigasi.transcription.DIRECTORY=/tmp/transcripts -org.jitsi.jigasi.transcription.BASE_URL={{ .Env.PUBLIC_URL }}/transcripts -org.jitsi.jigasi.transcription.jetty.port=-1 -org.jitsi.jigasi.transcription.ADVERTISE_URL={{ .Env.JIGASI_TRANSCRIBER_ADVERTISE_URL | default "false"}} -org.jitsi.jigasi.transcription.SAVE_JSON=false -org.jitsi.jigasi.transcription.SEND_JSON=true -org.jitsi.jigasi.transcription.SAVE_TXT=true -org.jitsi.jigasi.transcription.SEND_TXT={{ .Env.JIGASI_TRANSCRIBER_SEND_TXT | default "false"}} -org.jitsi.jigasi.transcription.RECORD_AUDIO={{ .Env.JIGASI_TRANSCRIBER_RECORD_AUDIO | default "false"}} -org.jitsi.jigasi.transcription.RECORD_AUDIO_FORMAT=wav -{{ end -}} {{ if .Env.JIGASI_SIP_DEFAULT_ROOM }} org.jitsi.jigasi.DEFAULT_JVB_ROOM_NAME={{ .Env.JIGASI_SIP_DEFAULT_ROOM }} @@ -202,13 +65,6 @@ org.jitsi.jigasi.LOCAL_REGION={{ $JIGASI_LOCAL_REGION }} org.jitsi.jigasi.xmpp.acc.BOSH_URL_PATTERN={{ $BOSH_URL_PATTERN }} {{ end }} -{{ if $USE_TRANSLATOR_IN_CONFERENCE }} -org.jitsi.jigasi.xmpp.acc.USE_TRANSLATOR_IN_CONFERENCE=true -net.java.sip.communicator.impl.protocol.sip.acc1.USE_TRANSLATOR_IN_CONFERENCE=true -# Should be enabled when using translator mode -net.java.sip.communicator.impl.neomedia.audioSystem.audiosilence.captureDevice_list=["AudioSilenceCaptureDevice:noTransferData"] -{{ end }} - {{ if .Env.JIGASI_CONFIGURATION -}} -{{ join "\n" (splitList "," .Env.JIGASI_CONFIGURATION) }} +{{ join "\n" (splitList "," .Env.JIGASI_CONFIGURATION | compact) }} {{ end -}} diff --git a/jigasi/rootfs/defaults/sipserver-sip-communicator.properties b/jigasi/rootfs/defaults/sipserver-sip-communicator.properties new file mode 100644 index 0000000000..3b998e0741 --- /dev/null +++ b/jigasi/rootfs/defaults/sipserver-sip-communicator.properties @@ -0,0 +1,98 @@ +{{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}} +{{ $JIGASI_SIP_PASSWORD := .Env.JIGASI_SIP_PASSWORD | default "replaceme" -}} +{{ $JIGASI_XMPP_USER := .Env.JIGASI_XMPP_USER | default "jigasi" -}} +{{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} +{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} +{{ $XMPP_GUEST_DOMAIN := .Env.XMPP_GUEST_DOMAIN | default "guest.meet.jitsi" -}} +{{ $USE_TRANSLATOR_IN_CONFERENCE := .Env.USE_TRANSLATOR_IN_CONFERENCE | default "0" | toBool -}} + +org.jitsi.jigasi.ENABLE_SIP=true + +# SIP account +net.java.sip.communicator.impl.protocol.sip.acc1=acc1 +{{ if .Env.JIGASI_SIP_SERVER }} +net.java.sip.communicator.impl.protocol.sip.acc1.PROXY_ADDRESS={{ .Env.JIGASI_SIP_SERVER }} +net.java.sip.communicator.impl.protocol.sip.acc1.PROXY_AUTO_CONFIG=false +net.java.sip.communicator.impl.protocol.sip.acc1.PROXY_PORT={{ .Env.JIGASI_SIP_PORT | default "5060" }} +net.java.sip.communicator.impl.protocol.sip.acc1.PREFERRED_TRANSPORT={{ .Env.JIGASI_SIP_TRANSPORT | default "UDP" }} +{{ end }} +{{ if .Env.JIGASI_ENABLE_SDES_SRTP | default "0" | toBool }} +net.java.sip.communicator.impl.protocol.sip.acc1.SAVP_OPTION=1 +net.java.sip.communicator.impl.protocol.sip.acc1.DEFAULT_ENCRYPTION=true +net.java.sip.communicator.impl.protocol.sip.acc1.DEFAULT_SIPZRTP_ATTRIBUTE=false +net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL.ZRTP=0 +net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL.SDES=1 +net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL.DTLS-SRTP=0 +net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL_STATUS.ZRTP=false +net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL_STATUS.SDES=true +net.java.sip.communicator.impl.protocol.sip.acc1.ENCRYPTION_PROTOCOL_STATUS.DTLS-SRTP=false +net.java.sip.communicator.impl.protocol.sip.acc1.SDES_CIPHER_SUITES=AES_CM_128_HMAC_SHA1_80,AES_CM_128_HMAC_SHA1_32 +{{ end }} +net.java.sip.communicator.impl.protocol.sip.acc1.ACCOUNT_UID=SIP\:{{ .Env.JIGASI_SIP_URI }} +net.java.sip.communicator.impl.protocol.sip.acc1.PASSWORD={{ $JIGASI_SIP_PASSWORD | b64enc }} +net.java.sip.communicator.impl.protocol.sip.acc1.PROTOCOL_NAME=SIP +net.java.sip.communicator.impl.protocol.sip.acc1.SERVER_ADDRESS={{ .Env.JIGASI_SIP_SERVER }} +net.java.sip.communicator.impl.protocol.sip.acc1.USER_ID={{ .Env.JIGASI_SIP_URI }} +net.java.sip.communicator.impl.protocol.sip.acc1.KEEP_ALIVE_INTERVAL=25 +net.java.sip.communicator.impl.protocol.sip.acc1.KEEP_ALIVE_METHOD={{ .Env.JIGASI_SIP_KEEP_ALIVE_METHOD | default "OPTIONS" }} +net.java.sip.communicator.impl.protocol.sip.acc1.VOICEMAIL_ENABLED=false +net.java.sip.communicator.impl.protocol.sip.acc1.JITSI_MEET_ROOM_HEADER_NAME=X-Room-Name +net.java.sip.communicator.impl.protocol.sip.acc1.JITSI_MEET_DOMAIN_BASE_HEADER_NAME=X-Domain-Base +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.AMR-WB/16000=750 +# Temporarily disable G722, see: https://github.com/jitsi/docker-jitsi-meet/issues/1357 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.G722/8000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.GSM/8000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.H263-1998/90000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.H264/90000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.PCMA/8000=600 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.PCMU/8000=650 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.SILK/12000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.SILK/16000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.SILK/24000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.SILK/8000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.VP8/90000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.iLBC/8000=10 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.opus/48000=1000 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.red/90000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.speex/16000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.speex/32000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.speex/8000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.telephone-event/8000=1 +net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.ulpfec/90000=0 +net.java.sip.communicator.impl.protocol.sip.acc1.OVERRIDE_ENCODINGS=true +net.java.sip.communicator.impl.protocol.sip.acc1.DOMAIN_BASE={{ $XMPP_DOMAIN }} + +{{ if .Env.ENABLE_AUTH | default "0" | toBool }} +{{ if .Env.ENABLE_GUESTS | default "0" | toBool }} +org.jitsi.jigasi.xmpp.acc.USER_ID={{ $JIGASI_XMPP_USER }}@{{ $XMPP_GUEST_DOMAIN }} +org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=true +{{ else }} +org.jitsi.jigasi.xmpp.acc.USER_ID={{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }} +org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=false +{{ end }} +org.jitsi.jigasi.xmpp.acc.PASS={{ .Env.JIGASI_XMPP_PASSWORD }} +org.jitsi.jigasi.xmpp.acc.ALLOW_NON_SECURE=true +{{ end }} + +# forces sending presence on sip call hangup +net.java.sip.communicator.impl.protocol.jabber.FORCE_PRESENCE_ON_LEAVE=true + +{{ if $USE_TRANSLATOR_IN_CONFERENCE }} +org.jitsi.jigasi.xmpp.acc.USE_TRANSLATOR_IN_CONFERENCE=true +net.java.sip.communicator.impl.protocol.sip.acc1.USE_TRANSLATOR_IN_CONFERENCE=true +# Should be enabled when using translator mode +net.java.sip.communicator.impl.neomedia.audioSystem.audiosilence.captureDevice_list=["AudioSilenceCaptureDevice:noTransferData"] +{{ end }} + +{{ if $ENABLE_VISITORS -}} +org.jitsi.jigasi.ENABLE_SIP_VISITORS=true +{{ if .Env.JIGASI_VISITORS_QUEUE_SERVICE_URL -}} +org.jitsi.jigasi.VISITOR_QUEUE_SERVICE={{ .Env.JIGASI_VISITORS_QUEUE_SERVICE_URL }} +{{ end -}} +{{ if .Env.JIGASI_VISITORS_QUEUE_SERVICE_PRIVATE_KEY_PATH -}} +org.jitsi.jigasi.VISITOR_QUEUE_SERVICE_PRIVATE_KEY_PATH={{ .Env.JIGASI_VISITORS_QUEUE_SERVICE_PRIVATE_KEY_PATH }} +{{ end -}} +{{ if .Env.JIGASI_VISITORS_QUEUE_SERVICE_PRIVATE_KEY_ID -}} +org.jitsi.jigasi.VISITOR_QUEUE_SERVICE_PRIVATE_KEY_ID={{ .Env.JIGASI_VISITORS_QUEUE_SERVICE_PRIVATE_KEY_ID }} +{{ end -}} +{{ end -}} diff --git a/jigasi/rootfs/defaults/transcriber-sip-communicator.properties b/jigasi/rootfs/defaults/transcriber-sip-communicator.properties new file mode 100644 index 0000000000..216353b183 --- /dev/null +++ b/jigasi/rootfs/defaults/transcriber-sip-communicator.properties @@ -0,0 +1,71 @@ +{{ $JIGASI_TRANSCRIBER_USER := .Env.JIGASI_TRANSCRIBER_USER | default "transcriber" -}} +{{ $JIGASI_TRANSCRIBER_FILTER_SILENCE := .Env.JIGASI_TRANSCRIBER_FILTER_SILENCE | default "0" | toBool -}} +{{ $XMPP_HIDDEN_DOMAIN := .Env.XMPP_HIDDEN_DOMAIN | default "hidden.meet.jitsi" -}} +{{ $JIGASI_TRANSCRIBER_ENABLE_SAVING := .Env.JIGASI_TRANSCRIBER_ENABLE_SAVING | default "1" | toBool -}} +{{ $JIGASI_TRANSCRIBER_ENABLE_TRANSLATION := .Env.JIGASI_TRANSCRIBER_ENABLE_TRANSLATION | default "0" | toBool -}} + +org.jitsi.jigasi.ENABLE_SIP=false +org.jitsi.jigasi.xmpp.acc.USER_ID={{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_HIDDEN_DOMAIN }} +org.jitsi.jigasi.xmpp.acc.PASS={{ .Env.JIGASI_TRANSCRIBER_PASSWORD }} +org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=false +org.jitsi.jigasi.xmpp.acc.ALLOW_NON_SECURE=true + +# Transcription config +org.jitsi.jigasi.ENABLE_TRANSCRIPTION=true +{{ if $JIGASI_TRANSCRIBER_ENABLE_TRANSLATION -}} +org.jitsi.jigasi.transcription.ENABLE_TRANSLATION=true +{{ end -}} +{{ if $JIGASI_TRANSCRIBER_ENABLE_SAVING -}} +org.jitsi.jigasi.transcription.DIRECTORY=/tmp/transcripts +org.jitsi.jigasi.transcription.BASE_URL={{ .Env.PUBLIC_URL }}/transcripts +org.jitsi.jigasi.transcription.jetty.port=-1 +org.jitsi.jigasi.transcription.ADVERTISE_URL={{ .Env.JIGASI_TRANSCRIBER_ADVERTISE_URL | default "false"}} +org.jitsi.jigasi.transcription.SAVE_JSON=false +org.jitsi.jigasi.transcription.SAVE_TXT=true +{{ end -}} +org.jitsi.jigasi.transcription.SEND_JSON=true +org.jitsi.jigasi.transcription.SEND_TXT={{ .Env.JIGASI_TRANSCRIBER_SEND_TXT | default "false"}} +org.jitsi.jigasi.transcription.RECORD_AUDIO={{ .Env.JIGASI_TRANSCRIBER_RECORD_AUDIO | default "false"}} +org.jitsi.jigasi.transcription.RECORD_AUDIO_FORMAT=wav +{{ if .Env.JIGASI_TRANSCRIBER_CUSTOM_SERVICE -}} +org.jitsi.jigasi.transcription.customService={{ .Env.JIGASI_TRANSCRIBER_CUSTOM_SERVICE }} +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_CUSTOM_TRANSLATION_SERVICE -}} +org.jitsi.jigasi.transcription.translationService={{ .Env.JIGASI_TRANSCRIBER_CUSTOM_TRANSLATION_SERVICE }} +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_LIBRETRANSLATE_URL -}} +org.jitsi.jigasi.transcription.libreTranslate.api_url={{ .Env.JIGASI_TRANSCRIBER_LIBRETRANSLATE_URL }} +{{ end -}} +{{ if $JIGASI_TRANSCRIBER_FILTER_SILENCE -}} +org.jitsi.jigasi.transcription.FILTER_SILENCE = true +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL -}} +org.jitsi.jigasi.transcription.remoteTranscriptionConfigUrl={{ .Env.JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL }} +{{ if .Env.JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL_KEY_PATH -}} +org.jitsi.jigasi.transcription.remoteTranscriptionConfigUrl.keyPath={{ .Env.JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL_KEY_PATH }} +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL_KEY_ID -}} +org.jitsi.jigasi.transcription.remoteTranscriptionConfigUrl.kid={{ .Env.JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL_KEY_ID }} +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL_AUD -}} +org.jitsi.jigasi.transcription.remoteTranscriptionConfigUrl.aud={{ .Env.JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL_AUD }} +{{ end -}} +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_OCI_REGION -}} +org.jitsi.jigasi.transcription.oci.websocketUrl=wss://realtime.aiservice.{{ .Env.JIGASI_TRANSCRIBER_OCI_REGION }}.oci.oraclecloud.com +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_OCI_COMPARTMENT -}} +org.jitsi.jigasi.transcription.oci.compartmentId={{ .Env.JIGASI_TRANSCRIBER_OCI_COMPARTMENT }} +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_WHISPER_URL -}} +org.jitsi.jigasi.transcription.whisper.websocket_url={{ .Env.JIGASI_TRANSCRIBER_WHISPER_URL }} +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_WHISPER_PRIVATE_KEY_NAME -}} +org.jitsi.jigasi.transcription.whisper.private_key_name={{ .Env.JIGASI_TRANSCRIBER_WHISPER_PRIVATE_KEY_NAME }} +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_WHISPER_PRIVATE_KEY -}} +org.jitsi.jigasi.transcription.whisper.private_key={{ .Env.JIGASI_TRANSCRIBER_WHISPER_PRIVATE_KEY }} +{{ end -}} +{{ if .Env.JIGASI_TRANSCRIBER_VOSK_URL -}} +org.jitsi.jigasi.transcription.vosk.websocket_url={{ .Env.JIGASI_TRANSCRIBER_VOSK_URL }} +{{ end -}} diff --git a/jigasi/rootfs/defaults/xmpp-sip-communicator.properties b/jigasi/rootfs/defaults/xmpp-sip-communicator.properties new file mode 100644 index 0000000000..e699cd2255 --- /dev/null +++ b/jigasi/rootfs/defaults/xmpp-sip-communicator.properties @@ -0,0 +1,68 @@ +{{ $JIGASI_BREWERY_MUC := .Env.JIGASI_BREWERY_MUC | default "jigasibrewery" -}} +{{ $JIGASI_XMPP_USER := .Env.JIGASI_XMPP_USER | default "jigasi" -}} +{{ $JIGASI_XMPP_PASSWORD := .Env.JIGASI_XMPP_PASSWORD | default "replaceme" -}} +{{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}} +{{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} +{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} +{{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}} +{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} +{{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}} +{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER | compact -}} + +# XMPP account used for control +{{ range $index, $element := $XMPP_SERVERS -}} +{{ $SERVER := splitn ":" 3 $element }} +{{ $ID := $SERVER._2 | default $index }} +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}=acc-{{ $ID }} +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.ACCOUNT_UID=Jabber:{{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }}@{{ $ID }} +net.java.sip.communicator.plugin.reconnectplugin.ATLEAST_ONE_SUCCESSFUL_CONNECTION.Jabber\:{{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }}=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.USER_ID={{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }} +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.IS_SERVER_OVERRIDDEN=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.SERVER_ADDRESS={{ $SERVER._0 }} +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.SERVER_PORT={{ $SERVER._1 | default $XMPP_PORT }} +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.ALLOW_NON_SECURE=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.PASSWORD={{ $JIGASI_XMPP_PASSWORD | b64enc }} +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.AUTO_GENERATE_RESOURCE=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.RESOURCE_PRIORITY=30 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.KEEP_ALIVE_METHOD=XEP-0199 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.KEEP_ALIVE_INTERVAL=20 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.CALLING_DISABLED=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.JINGLE_NODES_ENABLED=false +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.IS_CARBON_DISABLED=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.DEFAULT_ENCRYPTION=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.IS_USE_ICE=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.IS_ACCOUNT_DISABLED=false +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.IS_PREFERRED_PROTOCOL=false +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.AUTO_DISCOVER_JINGLE_NODES=false +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.PROTOCOL=Jabber +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.IS_USE_UPNP=false +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.IM_DISABLED=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.SERVER_STORED_INFO_DISABLED=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.IS_FILE_TRANSFER_DISABLED=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.USE_DEFAULT_STUN_SERVER=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.ENCRYPTION_PROTOCOL.DTLS-SRTP=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.ENCRYPTION_PROTOCOL_STATUS.DTLS-SRTP=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.VIDEO_CALLING_DISABLED=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.OVERRIDE_ENCODINGS=true +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.G722/8000=705 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.GSM/8000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.H263-1998/90000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.H264/90000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.PCMA/8000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.PCMU/8000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.SILK/12000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.SILK/16000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.SILK/24000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.SILK/8000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.VP8/90000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.iLBC/8000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.opus/48000=750 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.speex/16000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.speex/32000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.speex/8000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.Encodings.telephone-event/8000=0 +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.BREWERY={{ $JIGASI_BREWERY_MUC }}@{{ $XMPP_INTERNAL_MUC_DOMAIN }} +net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.DOMAIN_BASE={{ $PUBLIC_URL_DOMAIN }} +{{ end -}} + +org.jitsi.jigasi.ALLOWED_JID={{ $JIGASI_BREWERY_MUC }}@{{ $XMPP_INTERNAL_MUC_DOMAIN }} diff --git a/jigasi/rootfs/etc/cont-init.d/10-config b/jigasi/rootfs/etc/cont-init.d/10-config index c158cb7940..c85add2500 100644 --- a/jigasi/rootfs/etc/cont-init.d/10-config +++ b/jigasi/rootfs/etc/cont-init.d/10-config @@ -13,6 +13,14 @@ if [[ "$JIGASI_XMPP_PASSWORD" == "$OLD_JIGASI_XMPP_PASSWORD" ]]; then exit 1 fi +[ -z "$JIGASI_MODE" ] && JIGASI_MODE="sip" +JIGASI_MODE="$(echo $JIGASI_MODE | tr '[:upper:]' '[:lower:]')" + +if [[ "$JIGASI_MODE" == "transcriber" ]]; then + # set random jigasi nickname for the instance if is not set + [ -z "${JIGASI_INSTANCE_ID}" ] && export JIGASI_INSTANCE_ID="transcriber-$(date +%N)" +fi + # set random jigasi nickname for the instance if is not set [ -z "${JIGASI_INSTANCE_ID}" ] && export JIGASI_INSTANCE_ID="jigasi-$(date +%N)" @@ -45,41 +53,47 @@ else echo "No AUTOSCALER_URL defined, leaving autoscaler sidecar disabled" fi +# maintain backward compatibility with older variable +[ -z "${XMPP_HIDDEN_DOMAIN}" ] && export XMPP_HIDDEN_DOMAIN="$XMPP_RECORDER_DOMAIN" + tpl /defaults/logging.properties > /config/logging.properties tpl /defaults/sip-communicator.properties > /config/sip-communicator.properties +tpl /defaults/xmpp-sip-communicator.properties >> /config/sip-communicator.properties -if [[ -f /config/custom-sip-communicator.properties ]]; then - cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties -fi - -mkdir -pm777 /tmp/transcripts -chown jigasi:jitsi /tmp/transcripts +if [[ "$JIGASI_MODE" == "sip" ]]; then + tpl /defaults/sipserver-sip-communicator.properties >> /config/sip-communicator.properties +elif [[ "$JIGASI_MODE" == "transcriber" ]]; then + tpl /defaults/transcriber-sip-communicator.properties >> /config/sip-communicator.properties + mkdir -pm777 /tmp/transcripts + chown jigasi:jitsi /tmp/transcripts -# Create Google Cloud Credentials -if [[ $ENABLE_TRANSCRIPTIONS -eq 1 || $ENABLE_TRANSCRIPTIONS == "true" ]]; then + # Create Google Cloud Credentials if [[ -z $GC_PROJECT_ID || -z $GC_PRIVATE_KEY_ID || -z $GC_PRIVATE_KEY || -z $GC_CLIENT_EMAIL || -z $GC_CLIENT_ID || -z $GC_CLIENT_CERT_URL ]]; then - echo 'Transcriptions: One or more environment variables are undefined' - exit 1 + echo 'Transcriptions: One or more gcloud environment variables are undefined, skipping gcloud credentials file /config/key.json' + else + jq -n \ + --arg GC_PROJECT_ID "$GC_PROJECT_ID" \ + --arg GC_PRIVATE_KEY_ID "$GC_PRIVATE_KEY_ID" \ + --arg GC_PRIVATE_KEY "$GC_PRIVATE_KEY" \ + --arg GC_CLIENT_EMAIL "$GC_CLIENT_EMAIL" \ + --arg GC_CLIENT_ID "$GC_CLIENT_ID" \ + --arg GC_CLIENT_CERT_URL "$GC_CLIENT_CERT_URL" \ + '{ + type: "service_account", + project_id: $GC_PROJECT_ID, + private_key_id: $GC_PRIVATE_KEY_ID, + private_key: $GC_PRIVATE_KEY, + client_email: $GC_CLIENT_EMAIL, + client_id: $GC_CLIENT_ID, + auth_uri: "https://accounts.google.com/o/oauth2/auth", + token_uri: "https://oauth2.googleapis.com/token", + auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs", + client_x509_cert_url: $GC_CLIENT_CERT_URL + }' \ + > /config/key.json fi +fi - jq -n \ - --arg GC_PROJECT_ID "$GC_PROJECT_ID" \ - --arg GC_PRIVATE_KEY_ID "$GC_PRIVATE_KEY_ID" \ - --arg GC_PRIVATE_KEY "$GC_PRIVATE_KEY" \ - --arg GC_CLIENT_EMAIL "$GC_CLIENT_EMAIL" \ - --arg GC_CLIENT_ID "$GC_CLIENT_ID" \ - --arg GC_CLIENT_CERT_URL "$GC_CLIENT_CERT_URL" \ - '{ - type: "service_account", - project_id: $GC_PROJECT_ID, - private_key_id: $GC_PRIVATE_KEY_ID, - private_key: $GC_PRIVATE_KEY, - client_email: $GC_CLIENT_EMAIL, - client_id: $GC_CLIENT_ID, - auth_uri: "https://accounts.google.com/o/oauth2/auth", - token_uri: "https://oauth2.googleapis.com/token", - auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs", - client_x509_cert_url: $GC_CLIENT_CERT_URL - }' \ - > /config/key.json +if [[ -f /config/custom-sip-communicator.properties ]]; then + cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties fi diff --git a/jigasi/rootfs/etc/services.d/jigasi/finish b/jigasi/rootfs/etc/services.d/jigasi/finish new file mode 100644 index 0000000000..73ee50b2f5 --- /dev/null +++ b/jigasi/rootfs/etc/services.d/jigasi/finish @@ -0,0 +1,9 @@ +#!/usr/bin/with-contenv bash + +# When the jigasi is shutdown (or gracefully shutdown), it exits with code 0. +# In this case, we don't want S6 to restart the service. We want to stop all +# services and shutdown the container. + +if [[ $1 -eq 0 ]]; then + /opt/jitsi/shutdown.sh +fi diff --git a/jigasi/rootfs/opt/jitsi/shutdown.sh b/jigasi/rootfs/opt/jitsi/shutdown.sh new file mode 100755 index 0000000000..4821f60103 --- /dev/null +++ b/jigasi/rootfs/opt/jitsi/shutdown.sh @@ -0,0 +1,11 @@ +#!/usr/bin/with-contenv bash + +if [ -n "$AUTOSCALER_URL" ]; then + # notify the sidecar of imminent shutdown + PORT=${AUTOSCALER_SIDECAR_PORT:-6000} + curl -d '{}' -v 0:$PORT/hook/v1/shutdown + sleep 10 +fi + +# shutdown everything +s6-svscanctl -t /var/run/s6/services diff --git a/jvb/rootfs/defaults/jvb.conf b/jvb/rootfs/defaults/jvb.conf index 1bf0cd77f4..8bb00b6a28 100644 --- a/jvb/rootfs/defaults/jvb.conf +++ b/jvb/rootfs/defaults/jvb.conf @@ -12,13 +12,13 @@ {{ $JVB_MUC_NICKNAME := .Env.JVB_MUC_NICKNAME | default .Env.HOSTNAME -}} {{ $JVB_ADVERTISE_PRIVATE_CANDIDATES := .Env.JVB_ADVERTISE_PRIVATE_CANDIDATES | default "true" | toBool -}} {{ $JVB_ADVERTISE_IPS := .Env.JVB_ADVERTISE_IPS | default "" -}} -{{ $JVB_IPS := splitList "," $JVB_ADVERTISE_IPS -}} +{{ $JVB_IPS := splitList "," $JVB_ADVERTISE_IPS | compact -}} {{ $JVB_REQUIRE_VALID_ADDRESS := .Env.JVB_REQUIRE_VALID_ADDRESS | default "0" | toBool -}} {{ $JVB_XMPP_AUTH_DOMAIN := .Env.JVB_XMPP_AUTH_DOMAIN | default "auth.jvb.meet.jitsi" -}} {{ $JVB_XMPP_INTERNAL_MUC_DOMAIN := .Env.JVB_XMPP_INTERNAL_MUC_DOMAIN | default "muc.jvb.meet.jitsi" -}} {{ $JVB_XMPP_PORT := .Env.JVB_XMPP_PORT | default "6222" -}} {{ $JVB_XMPP_SERVER := .Env.JVB_XMPP_SERVER | default "xmpp.jvb.meet.jitsi" -}} -{{ $JVB_XMPP_SERVERS := splitList "," $JVB_XMPP_SERVER -}} +{{ $JVB_XMPP_SERVERS := splitList "," $JVB_XMPP_SERVER | compact -}} {{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}} {{ $SHUTDOWN_REST_ENABLED := .Env.SHUTDOWN_REST_ENABLED | default "false" | toBool -}} {{ $USE_USRSCTP := .Env.JVB_USE_USRSCTP | default "false" | toBool -}} @@ -30,12 +30,13 @@ {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}} {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} {{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}} -{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER -}} +{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER | compact -}} {{/* assign env from context, preserve during range when . is re-assigned */}} {{ $ENV := .Env -}} videobridge { cc { + use-vla-target-bitrate = {{ .Env.ENABLE_VLA | default "0" | toBool }} trust-bwe = {{ $JVB_CC_TRUST_BWE }} } ice { @@ -149,3 +150,5 @@ ice4j { } } } + +include "custom-jvb.conf" diff --git a/jvb/rootfs/etc/services.d/jvb/finish b/jvb/rootfs/etc/services.d/jvb/finish index 9f7171a418..85a5659e24 100644 --- a/jvb/rootfs/etc/services.d/jvb/finish +++ b/jvb/rootfs/etc/services.d/jvb/finish @@ -5,5 +5,5 @@ # services and shutdown the container. if [[ $1 -eq 0 ]]; then - s6-svscanctl -t /var/run/s6/services + /opt/jitsi/shutdown.sh fi diff --git a/jvb/rootfs/opt/jitsi/shutdown.sh b/jvb/rootfs/opt/jitsi/shutdown.sh index 0464acbc97..4821f60103 100755 --- a/jvb/rootfs/opt/jitsi/shutdown.sh +++ b/jvb/rootfs/opt/jitsi/shutdown.sh @@ -1,8 +1,11 @@ #!/usr/bin/with-contenv bash -# notify the sidecar of imminent shutdown -PORT=${AUTOSCALER_SIDECAR_PORT:-6000} -curl -d '{}' -v 0:$PORT/hook/v1/shutdown -sleep 10 + +if [ -n "$AUTOSCALER_URL" ]; then + # notify the sidecar of imminent shutdown + PORT=${AUTOSCALER_SIDECAR_PORT:-6000} + curl -d '{}' -v 0:$PORT/hook/v1/shutdown + sleep 10 +fi # shutdown everything s6-svscanctl -t /var/run/s6/services diff --git a/log-analyser.yml b/log-analyser.yml index a4fc8ee91a..aaebd152fb 100644 --- a/log-analyser.yml +++ b/log-analyser.yml @@ -12,10 +12,17 @@ services: - ./log-analyser/loki/conf:/conf ports: - "3100:3100" + networks: + meet.jitsi: otel-collector: container_name: otel image: otel/opentelemetry-collector-contrib + user: "0" # required for reading docker container logs volumes: - ./log-analyser/otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml - ./log-analyser/jitsi-logs/:/tmp/jitsi-logs/ + - /var/lib/docker/containers:/var/lib/docker/containers:ro + - /var/run/docker.sock:/var/run/docker.sock + networks: + meet.jitsi: diff --git a/log-analyser/README.md b/log-analyser/README.md index eb47993d9b..e31ac586a4 100644 --- a/log-analyser/README.md +++ b/log-analyser/README.md @@ -5,13 +5,13 @@ Currently this is an in-progress GSoC Summer of Code project and so the instruct ## Overview -This project demonstrates how to configure and use Grafana Loki with OpenTelemetry to collect, parse, and visualize log data. It includes: +This project demonstrates how to configure and use Grafana Loki with OpenTelemetry to collect, parse, and visualize log data from Jitsi Meet components. It includes: - A Docker Compose setup (`log-analyser.yml`) for Loki and OpenTelemetry Collector. - A Docker Compose setup (`grafana.yml`) for Grafana. -- Configuration files for log parsing and exporting. +- A unified Docker Compose command to start all services. - Instructions to set up and access Grafana with Loki as a data source. -- + ## Getting Started ### Prerequisites @@ -23,39 +23,39 @@ This project demonstrates how to configure and use Grafana Loki with OpenTelemet 1. **Clone the repository:** - ```bash - git clone https://github.com/jitsi/docker-jitsi-meet.git - ``` - -### Log Analyser +```bash +git clone https://github.com/jitsi/docker-jitsi-meet.git +``` -1. **Add your log files:** +2. **Update Jitsi Meet Docker Compose Configuration:** - Place your log file in the `log-analyser/jitsi-logs` directory. Update the `otel-collector-config.yaml` file with the correct file path to start ingesting the logs. This setup allows OpenTelemetry to read logs from the file and forward them to Loki. +To enable log collection and analysis, you need to modify the `docker-compose.yml` file for Jitsi Meet components. Add the following configuration to each Jitsi service within the `docker-compose.yml` file: -2. **Update the otel-collector-config.yaml file:** +```yaml + logging: + driver: "json-file" + options: + labels: "service" +``` - Update the file path to point to your log file for ingestion by OpenTelemetry. +This configuration ensures that logs are collected in JSON format and tagged with service labels, which is essential for Loki to properly ingest and index the logs. 3. **Start the Docker containers:** - ```bash - docker-compose -f docker-compose.yml -f log-analyser.yml up -d - ``` - -### Grafana + To start all necessary services, including Jitsi Meet components, Grafana, Loki, and OpenTelemetry, run: -1. **Start the Docker container:** - - ```bash - docker-compose -f docker-compose.yml -f grafana.yml up -d + ```bash + docker-compose -f docker-compose.yml -f log-analyser.yml -f grafana.yml up -d ``` -2. **Access Grafana:** + - This command will start the Jitsi Meet components from `docker-compose.yml`, the log analysis tools from `log-analyser.yml`, and Grafana from `grafana.yml`. The logs from Jitsi Meet components will automatically be sent to Grafana through Loki. + - **Note:** To use only Grafana for visualization without log analysis, you can use just `grafana.yml` alone. However, for the complete log analysis project, you need both `log-analyser.yml` and `grafana.yml`. + +### Access Grafana - Open your web browser and navigate to [http://localhost:3000](http://localhost:3000). +1. **Open your web browser and navigate to [http://localhost:3000](http://localhost:3000).** -3. **Log in to Grafana:** +2. **Log in to Grafana:** Use the default credentials: @@ -64,16 +64,17 @@ This project demonstrates how to configure and use Grafana Loki with OpenTelemet Password: admin ``` -### Dashboard Setup - -The dashboard setups are available as JSON files in the `log-analyser/grafana-dashboards` directory. You can import these JSON files into Grafana to use the pre-configured dashboards. In the future, we plan to automate this import process. +3. **Dashboard Setup:** + The dashboards for Jitsi Meet components are pre-configured and will be automatically available in Grafana. You can explore these dashboards to view and analyze logs. ## Usage -- **Log Parsing and Visualization:** After setting up, you can use Grafana to explore and visualize your logs. Check our dashboards and panels to monitor log data effectively. - +- **Log Parsing and Visualization:** After setting up, use Grafana to explore and visualize your logs. Check the pre-configured dashboards and panels to monitor and analyze log data from Jitsi Meet components effectively. ## Acknowledgements -Thanks for checking out this project! If you have any questions or need further assistance, don't hesitate to reach out. +Thank you for exploring this project! +For detailed documentation, follow the [Jitsi Handbook](https://jitsi.github.io/handbook/docs/intro), you can follow the Docker and Log-Analyser guides under Self-Hosting Guide > Deployment guide. + +If you have any questions or need further assistance, please feel free to reach out. diff --git a/log-analyser/grafana-provisioning/dashboards/Prosody-Dashboard.json b/log-analyser/grafana-provisioning/dashboards/Prosody-Dashboard.json new file mode 100644 index 0000000000..3417c3bfec --- /dev/null +++ b/log-analyser/grafana-provisioning/dashboards/Prosody-Dashboard.json @@ -0,0 +1,1393 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 20, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 4, + "panels": [], + "title": "Session Activity", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bbb38190-2464-44ea-8080-f9ca9e3dcd61" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(rate(prosody_mod_smacks__sessions_started_total[5m]))", + "instant": false, + "legendFormat": "Smacks Sessions", + "range": true, + "refId": "A" + } + ], + "title": "Smacks Sessions started", + "type": "timeseries" + }, + { + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_smacks__session_resumption_expired_total)", + "instant": false, + "legendFormat": "Session Resumption Expired", + "range": true, + "refId": "A" + } + ], + "title": "Session Resumption Expired", + "type": "timeseries" + }, + { + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_bosh__active_sessions)", + "instant": false, + "legendFormat": "Bosh active sessions", + "range": true, + "refId": "A" + } + ], + "title": "Bosh Active Sessions", + "type": "timeseries" + }, + { + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_c2s__connections) by (ip_family)", + "instant": false, + "legendFormat": "{{label_name}}", + "range": true, + "refId": "A" + } + ], + "title": "C2S Connections by IP Family", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 10, + "panels": [], + "title": "Stanza Handling", + "type": "row" + }, + { + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 18 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_smacks__tx_queued_stanzas_total)", + "instant": false, + "legendFormat": "TX Queued Stanzas", + "range": true, + "refId": "A" + } + ], + "title": "TX Queued Stanzas", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bbb38190-2464-44ea-8080-f9ca9e3dcd61" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 21, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "bbb38190-2464-44ea-8080-f9ca9e3dcd61" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_measure_stanza_counts__received_total)by(stanza_kind)", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Stanza Counts", + "type": "timeseries" + }, + { + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 26 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(rate(prosody_mod_smacks__tx_dropped_stanzas_count[5m]))", + "instant": false, + "legendFormat": "Rate of Dropped Stanzas", + "range": true, + "refId": "A" + } + ], + "title": "Dropped Stanzas Rate", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 13, + "panels": [], + "title": "Processing Performance", + "type": "row" + }, + { + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 35 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(rate(prosody_stats_processing_seconds_sum[5m]))*1000000", + "instant": false, + "legendFormat": "Processing in microsecond", + "range": true, + "refId": "A" + } + ], + "title": "Processing time Sum", + "type": "timeseries" + }, + { + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "fillOpacity": 80, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1 + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "Processing" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Processing" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 35 + }, + "id": 11, + "options": { + "bucketOffset": 0, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.90, sum(rate(prosody_stats_processing_seconds_bucket[5m])) by (le))", + "instant": false, + "legendFormat": "Processing", + "range": true, + "refId": "A" + } + ], + "title": "Processing time Histogram", + "type": "histogram" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 16, + "panels": [], + "title": "Room Metrics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bbb38190-2464-44ea-8080-f9ca9e3dcd61" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 44 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_muc__room_hit_total{host!~\"internal-muc.*\"}) by (host)", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Room Hits", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bbb38190-2464-44ea-8080-f9ca9e3dcd61" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 44 + }, + "id": 14, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_muc__live_room{host!~\"internal-muc.*\"})by(host)\n", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Live MUC Rooms", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "bbb38190-2464-44ea-8080-f9ca9e3dcd61" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 52 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_muc__room_miss_total{host!~\"internal-muc.*\"})by(host)", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "MUC Room Miss", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 60 + }, + "id": 19, + "panels": [], + "title": "Error Monitoring", + "type": "row" + }, + { + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 61 + }, + "id": 17, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_bosh__bad_sid_total)", + "instant": false, + "legendFormat": "Bad Bosh Sessions", + "range": true, + "refId": "A" + } + ], + "title": "Bad Bosh Session IDs", + "type": "timeseries" + }, + { + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 61 + }, + "id": 18, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(prosody_mod_bosh__new_sid_total)", + "instant": false, + "legendFormat": "New Bosh", + "range": true, + "refId": "A" + } + ], + "title": "New Bosh SIDs", + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Prosody Dashboard", + "uid": "c8b1b5f8-6b45-4fa7-92b2-01cc164e2f94asdf", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/log-analyser/grafana-provisioning/dashboards/docker-statistics.json b/log-analyser/grafana-provisioning/dashboards/docker-statistics.json new file mode 100644 index 0000000000..70275ab561 --- /dev/null +++ b/log-analyser/grafana-provisioning/dashboards/docker-statistics.json @@ -0,0 +1,706 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "expr": "container_memory_percent_ratio * 100", + "instant": false, + "legendFormat": "Memory Usage (in %)", + "range": true, + "refId": "A" + } + ], + "title": "Memory Usage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 7, + "y": 0 + }, + "id": 2, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "exemplar": false, + "expr": "container_cpu_utilization_ratio * 100", + "format": "time_series", + "instant": false, + "legendFormat": "CPU Utilization (in %)", + "range": true, + "refId": "A" + } + ], + "title": "CPU Utilization", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 10, + "x": 14, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "expr": "sum(rate(container_blockio_io_service_bytes_recursive_total{operation=\"read\"}[5m])) ", + "hide": false, + "instant": false, + "legendFormat": "Read Operation", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "expr": "sum(rate(container_blockio_io_service_bytes_recursive_total{operation=\"write\"}[5m])) ", + "hide": false, + "instant": false, + "legendFormat": "Write Operation", + "range": true, + "refId": "C" + } + ], + "title": "Block IO in bytes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "expr": "rate(container_cpu_usage_kernelmode_nanoseconds_total[5m])", + "instant": false, + "legendFormat": "Kernel Mode", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "expr": "rate(container_cpu_usage_usermode_nanoseconds_total[5m])", + "hide": false, + "instant": false, + "legendFormat": "User Mode", + "range": true, + "refId": "B" + } + ], + "title": "CPU usage in different modes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "expr": "(container_memory_usage_total_bytes / container_memory_usage_limit_bytes) * 100", + "instant": false, + "legendFormat": "Total Bytes Read/Written", + "range": true, + "refId": "A" + } + ], + "title": "Container memory usage vs limit", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "exemplar": false, + "expr": "rate(container_network_io_usage_rx_bytes_total{interface=\"eth0\"}[5m])", + "instant": false, + "legendFormat": "Network bytes received", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "expr": "rate(container_network_io_usage_tx_bytes_total{interface=\"eth0\"}[5m])", + "hide": false, + "instant": false, + "legendFormat": "Network bytes Sent", + "range": true, + "refId": "B" + } + ], + "title": "Network bytes sent and received", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "expr": "rate(container_network_io_usage_rx_dropped_total{interface=\"eth0\"}[5m])", + "instant": false, + "legendFormat": "Network Bytes Dropped in Receiving", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d301145e-8c4e-4027-bf6e-43e81f095020" + }, + "editorMode": "code", + "expr": "rate(container_network_io_usage_tx_dropped_total{interface=\"eth0\"}[5m])", + "hide": false, + "instant": false, + "legendFormat": "Network Bytes dropped in Sending", + "range": true, + "refId": "B" + } + ], + "title": "Network Packets dropped", + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Docker Statistics", + "uid": "c67742f2-7db9-489b-90fa-a13f4655806a", + "version": 3, + "weekStart": "" + } \ No newline at end of file diff --git a/log-analyser/grafana-provisioning/dashboards/jicofo.json b/log-analyser/grafana-provisioning/dashboards/jicofo.json index 2024180cf4..0207fb4074 100644 --- a/log-analyser/grafana-provisioning/dashboards/jicofo.json +++ b/log-analyser/grafana-provisioning/dashboards/jicofo.json @@ -18,14 +18,50 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 1, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "loki", - "uid": "b8130a28-4867-4668-917d-539c93852857" + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "{exporter=\"OTLP\"} | json | attributes_attrs_service=\"jitsi-jicofo\"", + "queryType": "range", + "refId": "A" + } + ], + "title": "Jicofo Logs", + "type": "logs" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" }, "fieldConfig": { "defaults": { @@ -46,7 +82,7 @@ "gridPos": { "h": 8, "w": 12, - "x": 0, + "x": 12, "y": 0 }, "id": 2, @@ -81,19 +117,19 @@ "uid": "b8130a28-4867-4668-917d-539c93852857" }, "editorMode": "code", - "expr": "sum by (attributes_level) (\n rate({exporter=\"OTLP\"} | json|attributes_log_file_name=\"jicofo.log\"| line_format \"{{.log}}\" | logfmt | pattern \"[<_>] <_level>: <_>\"[5m])\n)", + "expr": "sum by (attributes_level) (\n rate({exporter=\"OTLP\"} | json|attributes_attrs_service=\"jitsi-jicofo\"| line_format \"{{.log}}\" | logfmt | pattern \"[<_>] <_level>: <_>\"[5m])\n)", "legendFormat": "Level: {{attributes_level}}", "queryType": "range", "refId": "A" } ], - "title": "Log Levels Pie Chart", + "title": "Jicofo Log Levels Pie Chart", "type": "piechart" }, { "datasource": { "type": "loki", - "uid": "b8130a28-4867-4668-917d-539c93852857" + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" }, "fieldConfig": { "defaults": { @@ -105,7 +141,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -147,15 +184,261 @@ "uid": "b8130a28-4867-4668-917d-539c93852857" }, "editorMode": "code", - "expr": "sum by (attributes_level, attributes_log_file_name) (\n rate({exporter=\"OTLP\"} | json|attributes_log_file_name=\"jicofo.log\"| line_format \"{{.attributes_message}}\" | logfmt | pattern \"[<_>] #: <_>\"[5m]))", + "expr": "sum by (attributes_level, attributes_attrs_service) (\n rate({exporter=\"OTLP\"} | json|attributes_attrs_service=\"jitsi-jicofo\"| line_format \"{{.attributes_message}}\" | logfmt | pattern \"[<_>] #: <_>\"[5m]))", "legendFormat": "Level: {{attributes_level}}", "queryType": "range", "refId": "A" } ], - "title": "Log Levels Bar Chart", + "title": "Jicofo Log Levels Bar Chart", "transformations": [], "type": "bargauge" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "editorMode": "code", + "expr": "sum by (attributes_codefile) (\n rate({exporter=\"OTLP\"} | json|attributes_attrs_service=\"jitsi-jicofo\"| attributes_level=\"ERROR\" | line_format \"{{.attributes_message}}\" | logfmt | pattern \"[<_>] #: <_>\"[5m]))", + "queryType": "range", + "refId": "A" + } + ], + "title": "Jicofo Total Rate of ERROR Logs Aggregated by Code File", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "description": "This panel shows the number of conference requests over time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "count_over_time({exporter=\"OTLP\"} | json | attributes_attrs_service=\"jitsi-jicofo\" |= \"Conference request\" [1m])", + "queryType": "range", + "refId": "A" + } + ], + "title": "Jicofo Number of Conference Requests", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 5, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "sum(count_over_time({exporter=\"OTLP\"} | json | attributes_attrs_service=\"jitsi-jicofo\" |~ \"Member left|Terminating|Removed participant\" [1m]))", + "queryType": "range", + "refId": "A" + } + ], + "title": "Jicofo Total Counts of Member Left, Terminating, Removed Participant", + "type": "gauge" } ], "refresh": "", @@ -170,8 +453,8 @@ }, "timepicker": {}, "timezone": "", - "title": "Jicofo Logs", + "title": "Jicofo Dashboard", "uid": "f2dcfe84-3c27-4b1d-8583-bc2c97a8d22d", - "version": 5, + "version": 20, "weekStart": "" } diff --git a/log-analyser/grafana-provisioning/dashboards/jitsi-all.json b/log-analyser/grafana-provisioning/dashboards/jitsi-all.json index 922ad2e12e..ab8c511607 100644 --- a/log-analyser/grafana-provisioning/dashboards/jitsi-all.json +++ b/log-analyser/grafana-provisioning/dashboards/jitsi-all.json @@ -18,15 +18,15 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 3, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "loki", - "uid": "b8130a28-4867-4668-917d-539c93852857" + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -67,13 +67,13 @@ } ] }, - "unit": "none" + "unit": "percent" }, "overrides": [] }, "gridPos": { - "h": 8, - "w": 12, + "h": 13, + "w": 24, "x": 0, "y": 0 }, @@ -107,14 +107,51 @@ "uid": "b8130a28-4867-4668-917d-539c93852857" }, "editorMode": "code", - "expr": "sum by (attributes_log_file_name) (\n rate({exporter=\"OTLP\"} | json | line_format \"{{.attributes_message}}\" | logfmt | pattern \"[<_>] <_level>: <_>\"[5m]))", - "legendFormat": "{{attributes_log_file_name}}", + "expr": "sum by (attributes_attrs_service) (\n rate({exporter=\"OTLP\"} | json | line_format \"{{.attributes_message}}\" | logfmt | pattern \"[<_>] <_level>: <_>\"[5m]))", + "legendFormat": "{{attributes_attrs_service}}", "queryType": "range", "refId": "A" } ], - "title": "Jicofo and JVB Log Counts", + "title": "Jicofo, Prosody, Jitsi Web and JVB Log Counts", "type": "barchart" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 2, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "{exporter=\"OTLP\"} ", + "queryType": "range", + "refId": "A" + } + ], + "title": "Jitsi All Logs (Jicofo, Prosody, JVB, Web)", + "type": "logs" } ], "refresh": "", @@ -129,8 +166,8 @@ }, "timepicker": {}, "timezone": "", - "title": "Jitsi All Components", + "title": "Jitsi All Components Dashboard", "uid": "b75d666d-4537-45e2-94a1-2783f9362b65", - "version": 1, + "version": 14, "weekStart": "" } diff --git a/log-analyser/grafana-provisioning/dashboards/jitsi-web.json b/log-analyser/grafana-provisioning/dashboards/jitsi-web.json new file mode 100644 index 0000000000..bbd362ea2f --- /dev/null +++ b/log-analyser/grafana-provisioning/dashboards/jitsi-web.json @@ -0,0 +1,275 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 5, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "{exporter=\"OTLP\"} | json | attributes_attrs_service=\"jitsi-web\"", + "queryType": "range", + "refId": "A" + } + ], + "title": "Jitsi Web Logs", + "type": "logs" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 4, + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "right", + "showLegend": false, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "sum by (attributes_level) (\n rate({exporter=\"OTLP\"} | json|attributes_attrs_service=\"jitsi-web\"| line_format \"{{.log}}\" | logfmt | pattern \"[<_>] <_level>: <_>\"[5m])\n)", + "legendFormat": "Level: {{attributes_level}}", + "queryType": "range", + "refId": "A" + } + ], + "title": "Jitsi Web Log Levels Pie Chart", + "type": "piechart" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "sum by (attributes_level, attributes_attrs_service) (\n rate({exporter=\"OTLP\"} | json|attributes_attrs_service=\"jitsi-web\"| line_format \"{{.attributes_message}}\" | logfmt | pattern \"[<_>] #: <_>\"[5m]))", + "legendFormat": "Level: {{attributes_level}}", + "queryType": "range", + "refId": "A" + } + ], + "title": "Jitsi Web Log Levels Bar Chart", + "type": "bargauge" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "semi-dark-red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 2, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "sum(count_over_time({exporter=\"OTLP\"} | json | attributes_attrs_service=\"jitsi-web\" |= \"GET\" [5m])) by (instance)", + "queryType": "range", + "refId": "A" + } + ], + "title": "Jitsi Web Sum of 'GET' Log Counts", + "type": "gauge" + } + ], + "refresh": "", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Jitsi Web Dashboard", + "uid": "d1f8ba02-9b8d-42c7-8934-d30ea3559a49", + "version": 4, + "weekStart": "" +} diff --git a/log-analyser/grafana-provisioning/dashboards/jvb.json b/log-analyser/grafana-provisioning/dashboards/jvb.json index 9a2be5c10e..7c9022a999 100644 --- a/log-analyser/grafana-provisioning/dashboards/jvb.json +++ b/log-analyser/grafana-provisioning/dashboards/jvb.json @@ -18,14 +18,50 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 2, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "loki", - "uid": "b8130a28-4867-4668-917d-539c93852857" + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 3, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "{exporter=\"OTLP\"} | json | attributes_attrs_service=\"jitsi-jvb\"", + "queryType": "range", + "refId": "A" + } + ], + "title": "JVB Logs", + "type": "logs" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" }, "fieldConfig": { "defaults": { @@ -46,7 +82,7 @@ "gridPos": { "h": 8, "w": 12, - "x": 0, + "x": 12, "y": 0 }, "id": 2, @@ -80,7 +116,7 @@ "uid": "b8130a28-4867-4668-917d-539c93852857" }, "editorMode": "code", - "expr": "sum by (attributes_level) (\n rate({exporter=\"OTLP\"} | json|attributes_log_file_name=\"jvb.log\"| line_format \"{{.log}}\" | logfmt | pattern \"[<_>] <_level>: <_>\"[5m])\n)", + "expr": "sum by (attributes_level) (\n rate({exporter=\"OTLP\"} | json|attributes_attrs_service=\"jitsi-jvb\"| line_format \"{{.log}}\" | logfmt | pattern \"[<_>] <_level>: <_>\"[5m])\n)", "legendFormat": "Level: {{attributes_level}}", "queryType": "range", "refId": "A" @@ -92,7 +128,7 @@ { "datasource": { "type": "loki", - "uid": "b8130a28-4867-4668-917d-539c93852857" + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" }, "fieldConfig": { "defaults": { @@ -148,7 +184,7 @@ "uid": "b8130a28-4867-4668-917d-539c93852857" }, "editorMode": "code", - "expr": "sum by (attributes_level, attributes_log_file_name) (\n rate({exporter=\"OTLP\"} | json|attributes_log_file_name=\"jvb.log\"| line_format \"{{.attributes_message}}\" | logfmt | pattern \"[<_>] #: <_>\"[5m]))", + "expr": "sum by (attributes_level, attributes_attrs_service) (\n rate({exporter=\"OTLP\"} | json|attributes_attrs_service=\"jitsi-jvb\" | line_format \"{{.attributes_message}}\" | logfmt | pattern \"[<_>] #: <_>\"[5m]))", "legendFormat": "Level: {{attributes_level}}", "queryType": "range", "refId": "A" @@ -172,6 +208,6 @@ "timezone": "", "title": "JVB Dashboard", "uid": "d53a9efb-ca3b-4f47-af3a-9638de8a35fa", - "version": 1, + "version": 10, "weekStart": "" } diff --git a/log-analyser/grafana-provisioning/dashboards/prosody.json b/log-analyser/grafana-provisioning/dashboards/prosody.json new file mode 100644 index 0000000000..795494c21b --- /dev/null +++ b/log-analyser/grafana-provisioning/dashboards/prosody.json @@ -0,0 +1,408 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "{exporter=\"OTLP\"} | json | attributes_attrs_service=\"jitsi-prosody\"", + "queryType": "range", + "refId": "A" + } + ], + "title": "Prosody Logs", + "type": "logs" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 1, + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "right", + "showLegend": false, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "sum by (attributes_level) (\n rate({exporter=\"OTLP\"} | json|attributes_attrs_service=\"jitsi-prosody\"| line_format \"{{.log}}\" | logfmt | pattern \"[<_>] <_level>: <_>\"[5m])\n)", + "legendFormat": "Level: {{attributes_level}}", + "queryType": "range", + "refId": "A" + } + ], + "title": "Prosody Log Levels Pie Chart", + "type": "piechart" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 7, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "sum by (attributes_level, attributes_attrs_service) (\n rate({exporter=\"OTLP\"} | json|attributes_attrs_service=\"jitsi-prosody\"| line_format \"{{.attributes_message}}\" | logfmt | pattern \"[<_>] #: <_>\"[5m]))", + "legendFormat": "Level: {{attributes_level}}", + "queryType": "range", + "refId": "A" + } + ], + "title": "Prosody Log Levels Bar Chart", + "type": "bargauge" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 5, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "sum(count_over_time({exporter=\"OTLP\"} | json | attributes_attrs_service=\"jitsi-prosody\" |~ \"Starting room\" [1m]))", + "queryType": "range", + "refId": "A" + } + ], + "title": "Prosody Total Number of Rooms Started", + "type": "gauge" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 3, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "sum(count_over_time({exporter=\"OTLP\"} | json | attributes_attrs_service=\"jitsi-prosody\" |~ \"Client disconnected\" [1m]))", + "queryType": "range", + "refId": "A" + } + ], + "title": "Prosody Total Number of Clients Disconnected", + "type": "gauge" + }, + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 2, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "a4bdfb3e-762a-46e5-a79f-2e7bbe88d444" + }, + "editorMode": "code", + "expr": "sum(count_over_time({exporter=\"OTLP\"} | json |attributes_attrs_service=\"jitsi-prosody\" |~ \"Client connected\" [1m]))", + "queryType": "range", + "refId": "A" + } + ], + "title": "Prosody Total Number of Clients Connected", + "type": "gauge" + } + ], + "refresh": "", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Prosody Dashboard", + "uid": "fe2d57bc-b09b-4688-8037-f642047b0cfc", + "version": 1, + "weekStart": "" +} diff --git a/log-analyser/grafana-provisioning/datasources/datasource_loki.yml b/log-analyser/grafana-provisioning/datasources/datasource_loki.yml index 6c8883d376..83c34b61d2 100644 --- a/log-analyser/grafana-provisioning/datasources/datasource_loki.yml +++ b/log-analyser/grafana-provisioning/datasources/datasource_loki.yml @@ -6,4 +6,14 @@ datasources: type: loki access: proxy url: http://loki:3100 - editable: true \ No newline at end of file + editable: true + apiVersion: 1 + + - name: Prometheus + type: prometheus + access: proxy + url: http://prometheus:9090 + isDefault: true + editable: true + jsonData: + timeInterval: "5s" diff --git a/log-analyser/otel-collector-config.yaml b/log-analyser/otel-collector-config.yaml index d9f1636c68..c8baa89a20 100644 --- a/log-analyser/otel-collector-config.yaml +++ b/log-analyser/otel-collector-config.yaml @@ -4,26 +4,66 @@ receivers: http: grpc: endpoint: 0.0.0.0:4317 - filelog/jicofo: - include: ['/tmp/jitsi-logs/jicofo.log'] + filelog/jitsi-containers: + include: ['/var/lib/docker/containers/*/*.log'] + encoding: utf-8 operators: + - type: json_parser + id: parser-docker + output: filter_non_tagged_containers + timestamp: + parse_from: attributes.time + layout: '%Y-%m-%dT%H:%M:%S.%LZ' + - type: filter + id: filter_non_tagged_containers + expr: | + (attributes?.attrs?.service != "jitsi-web" and + attributes?.attrs?.service != "jitsi-jicofo" and + attributes?.attrs?.service != "jitsi-jvb" and + attributes?.attrs?.service != "jitsi-prosody") + output: regex_parser_choice + - type: router + id: regex_parser_choice + routes: + - expr: 'attributes.attrs.service == "jitsi-web"' + output: jitsi_web_parser + - expr: 'attributes.attrs.service == "jitsi-jicofo"' + output: jitsi_jicofo_parser + - expr: 'attributes.attrs.service == "jitsi-jvb"' + output: jitsi_jvb_parser + - expr: 'attributes.attrs.service == "jitsi-prosody"' + output: jitsi_prosody_parser - type: regex_parser - regex: "^(?PJicofo) (?P\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3}) (?P\\w+): \\[(?P\\d+)\\] (?P[\\w\\.]+)#(?P\\d+): (?P[\\S\\s]*)$" - filelog/jvb: - include: ['/tmp/jitsi-logs/jvb.log'] - operators: + id: jitsi_web_parser + parse_from: attributes.log + regex: "^(?P[\\s\\S]*)$|^(\\[(?P[\\w\\W]+)\\] (?P[\\S\\s]*)$)" - type: regex_parser - regex: "^(?PJVB) (?P\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3}) (?P\\w+): \\[(?P\\d+)\\] (?P[\\w\\.]+)#(?P\\d+): (?P[\\S\\s]*)$" - filelog/prosody: - include: ['/tmp/jitsi-logs/prosody.log'] - operators: + id: jitsi_jicofo_parser + parse_from: attributes.log + regex: "(^(?P\\w+) (?P\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3}) (?P\\w+): \\[(?P\\d+)\\]( \\[(?P[\\w\\W]+)\\])? (?P[\\w\\W]+)(#(?P\\d+))?: (?P[\\s\\S]*)$)|^(\\[(?P[\\w\\W]+)\\] (?P[\\S\\s]*)$)" + output: move_meta_key - type: regex_parser - regex: "^(?P\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2})\\s+(?P\\S+)\\s+(?P\\w+)\\s+(?P.+)$" - filelog/jitsi-web: - include: ['/tmp/jitsi-logs/jitsi-web.log'] - operators: + id: jitsi_jvb_parser + parse_from: attributes.log + regex: "^(?PJVB) \\[(?P\\d+)\\] (?P[\\w\\.]+)#(?P\\d+): (?P[\\S\\s]*)$" - type: regex_parser - regex: "^(?P\\[\\w+-\\w+\\.\\w+\\]\\s+(\\w+\\s+)*\\w+:?\\s*.*$)" + id: jitsi_prosody_parser + parse_from: attributes.log + regex: (^(?\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\s+(?\S+)\s+(?\w{0,10})(\t)(?P[\s\S]*)$)|^(\[(?P[\w\W]+)\] (?P[\S\s]*)$) + output: move_meta_key + - type: move + id: move_meta_key + if: "attributes.temp_meta != nil and attributes.temp_meta != ''" + from: attributes.temp_meta + to: attributes.meta + output: move_message_key + - type: move + id: move_message_key + if: "attributes.temp_message != nil and attributes.temp_message != ''" + from: attributes.temp_message + to: attributes.message + docker_stats: + endpoint: "unix:///var/run/docker.sock" processors: batch: @@ -32,22 +72,17 @@ exporters: loglevel: debug loki: endpoint: "http://loki:3100/loki/api/v1/push" + prometheus: + endpoint: "0.0.0.0:9464" service: pipelines: - logs/jicofo: - receivers: [otlp, filelog/jicofo] - processors: [batch] - exporters: [loki] - logs/jvb: - receivers: [otlp, filelog/jvb] + logs: + receivers: [otlp, filelog/jitsi-containers] processors: [batch] exporters: [loki] - logs/prosody: - receivers: [otlp, filelog/prosody] + metrics: + receivers: [docker_stats] processors: [batch] - exporters: [loki] - logs/jitsi-web: - receivers: [otlp, filelog/jitsi-web] - processors: [batch] - exporters: [loki] + exporters: [prometheus] + diff --git a/prometheus/README.md b/prometheus/README.md new file mode 100644 index 0000000000..af7bc84268 --- /dev/null +++ b/prometheus/README.md @@ -0,0 +1,73 @@ +# Prometheus Scraping & Grafana Dashboard for Jitsi + +## Overview + +This project aims to integrate **Prometheus** and **Grafana** with Jitsi to monitor and visualize performance metrics. + +## Features + +- **Prometheus Integration**: Collects metrics from Jitsi containers. +- **Grafana Dashboards**: Visualizes the metrics for easy analysis. + +## Installation + +### Prerequisites + +- Docker +- Docker Compose + +### Steps + +1. **Setup Jitsi with Docker Compose** + + Follow the [Jitsi Docker](https://github.com/jitsi/docker-jitsi-meet) setup instructions.
+ Also, you could follow Self - Hosting guide of Jitsi Meet: [Jitsi handbook](https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker/) + +2. **Configure Prometheus** + + Edit `/prometheus/prometheus.yml` with any **Port / Container name** changes are there to scrape metrics from Jitsi containers: + + ```yaml + scrape_configs: + - job_name: "jitsi" + static_configs: + - targets: ["prosody:5280", "jvb:8080", "jicofo:8888", "otel:9464"] + ``` + +3. **Run Docker Compose** + + The following command turns up the Jitsi Meet: + + ```bash + docker-compose up -d + ``` + + If you want to add the Prometheus and Grafana for monitoring purpose. Use the following command: + + ```bash + docker-compose -f docker-compose.yml -f prometheus.yml -f grafana.yml up -d + ``` + + To monitor Docker Engine we need to enable **Open Telemetry** service, which can be turned up from `log-analyser.yml`. Use the following command: + + ```bash + docker-compose -f docker-compose.yml -f prometheus.yml -f grafana.yml -f log-analyser.yml up -d + ``` + +## Usage + +1. **View the Prometheus Targets** + + Open [http://localhost:9090](http://localhost:9090) in your browser. + +2. **Access Grafana Dashboard** + + Open [http://localhost:3000](http://localhost:3000) in your browser. + +3. **Import Dashboard** + + Import the provided JSON file in Grafana to visualize Jitsi metrics. + +## Contributer + +[@24kushang](https://github.com/24kushang). diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index b806f42f0a..368ff2a06c 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -2,4 +2,4 @@ scrape_configs: - job_name: "prometheus" scrape_interval: 5s static_configs: - - targets: ["prosody:5280","jvb:8080","jicofo:8888"] + - targets: ["prosody:5280","jvb:8080","jicofo:8888","otel:9464"] diff --git a/prosody/Dockerfile b/prosody/Dockerfile index d33c9f7213..8c2b0a6ae7 100644 --- a/prosody/Dockerfile +++ b/prosody/Dockerfile @@ -27,7 +27,7 @@ LABEL org.opencontainers.image.url="https://prosody.im/" LABEL org.opencontainers.image.source="https://github.com/jitsi/docker-jitsi-meet" LABEL org.opencontainers.image.documentation="https://jitsi.github.io/handbook/" -ARG VERSION_JITSI_CONTRIB_PROSODY_PLUGINS="20240117" +ARG VERSION_JITSI_CONTRIB_PROSODY_PLUGINS="20241017" ARG VERSION_MATRIX_USER_VERIFICATION_SERVICE_PLUGIN="1.8.0" RUN wget -qO /etc/apt/trusted.gpg.d/prosody.gpg https://prosody.im/files/prosody-debian-packages.key && \ diff --git a/prosody/rootfs/defaults/conf.d/brewery.cfg.lua b/prosody/rootfs/defaults/conf.d/brewery.cfg.lua index 0418d735b3..e13d95ed43 100644 --- a/prosody/rootfs/defaults/conf.d/brewery.cfg.lua +++ b/prosody/rootfs/defaults/conf.d/brewery.cfg.lua @@ -13,11 +13,15 @@ admins = { plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom", "/prosody-plugins-contrib" } VirtualHost "{{ $JVB_XMPP_AUTH_DOMAIN }}" + modules_enabled = { + "smacks"; + } authentication = "internal_hashed" ssl = { key = "/config/certs/{{ $JVB_XMPP_AUTH_DOMAIN }}.key"; certificate = "/config/certs/{{ $JVB_XMPP_AUTH_DOMAIN }}.crt"; } + smacks_hibernation_time = 15; Component "{{ $JVB_XMPP_INTERNAL_MUC_DOMAIN }}" "muc" modules_enabled = { diff --git a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua index 22b02c9b9c..d413e20c4a 100644 --- a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua +++ b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua @@ -1,62 +1,53 @@ +{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" -}} {{ $C2S_REQUIRE_ENCRYPTION := .Env.PROSODY_C2S_REQUIRE_ENCRYPTION | default "1" | toBool -}} +{{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}} +{{ $ENABLE_APP_SECRET := .Env.JWT_APP_SECRET | default "false" | toBool -}} {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool -}} -{{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}} -{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" -}} -{{ $PROSODY_AUTH_TYPE := .Env.PROSODY_AUTH_TYPE | default $AUTH_TYPE -}} +{{ $ENABLE_AV_MODERATION := .Env.ENABLE_AV_MODERATION | default "true" | toBool -}} +{{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool -}} +{{ $ENABLE_END_CONFERENCE := .Env.ENABLE_END_CONFERENCE | default "true" | toBool -}} {{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) -}} +{{ $ENABLE_JAAS_COMPONENTS := .Env.ENABLE_JAAS_COMPONENTS | default "0" | toBool -}} +{{ $ENABLE_LOBBY := .Env.ENABLE_LOBBY | default "true" | toBool -}} +{{ $ENABLE_RATE_LIMITS := .Env.PROSODY_ENABLE_RATE_LIMITS | default "0" | toBool -}} {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool -}} +{{ $ENABLE_RECORDING_METADATA := .Env.PROSODY_ENABLE_RECORDING_METADATA | default "1" | toBool -}} +{{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}} {{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}} +{{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}} +{{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool -}} +{{ $ENV := .Env -}} +{{ $GUEST_AUTH_TYPE := .Env.PROSODY_GUEST_AUTH_TYPE | default "jitsi-anonymous" -}} +{{ $JIBRI_RECORDER_USER := .Env.JIBRI_RECORDER_USER | default "recorder" -}} {{ $JIBRI_XMPP_USER := .Env.JIBRI_XMPP_USER | default "jibri" -}} +{{ $JIGASI_TRANSCRIBER_USER := .Env.JIGASI_TRANSCRIBER_USER | default "transcriber" -}} {{ $JIGASI_XMPP_USER := .Env.JIGASI_XMPP_USER | default "jigasi" -}} {{ $JVB_AUTH_USER := .Env.JVB_AUTH_USER | default "jvb" -}} -{{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" -}} {{ $JWT_ALLOW_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool -}} +{{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" -}} {{ $JWT_AUTH_TYPE := .Env.JWT_AUTH_TYPE | default "token" -}} {{ $JWT_ENABLE_DOMAIN_VERIFICATION := .Env.JWT_ENABLE_DOMAIN_VERIFICATION | default "false" | toBool -}} +{{ $JWT_TOKEN_AUTH_MODULE := .Env.JWT_TOKEN_AUTH_MODULE | default "token_verification" -}} +{{ $MATRIX_LOBBY_BYPASS := .Env.MATRIX_LOBBY_BYPASS | default "0" | toBool -}} {{ $MATRIX_UVS_ISSUER := .Env.MATRIX_UVS_ISSUER | default "issuer" -}} {{ $MATRIX_UVS_SYNC_POWER_LEVELS := .Env.MATRIX_UVS_SYNC_POWER_LEVELS | default "0" | toBool -}} -{{ $MATRIX_LOBBY_BYPASS := .Env.MATRIX_LOBBY_BYPASS | default "0" | toBool -}} -{{ $JWT_TOKEN_AUTH_MODULE := .Env.JWT_TOKEN_AUTH_MODULE | default "token_verification" -}} -{{ $ENABLE_LOBBY := .Env.ENABLE_LOBBY | default "true" | toBool -}} -{{ $ENABLE_AV_MODERATION := .Env.ENABLE_AV_MODERATION | default "true" | toBool -}} -{{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool -}} -{{ $ENABLE_END_CONFERENCE := .Env.ENABLE_END_CONFERENCE | default "true" | toBool -}} -{{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool -}} -{{ $ENABLE_JAAS_COMPONENTS := .Env.ENABLE_JAAS_COMPONENTS | default "0" | toBool -}} -{{ $ENABLE_RATE_LIMITS := .Env.PROSODY_ENABLE_RATE_LIMITS | default "0" | toBool -}} -{{ $GUEST_AUTH_TYPE := .Env.PROSODY_GUEST_AUTH_TYPE | default "jitsi-anonymous" -}} +{{ $PROSODY_AUTH_TYPE := .Env.PROSODY_AUTH_TYPE | default $AUTH_TYPE -}} +{{ $PROSODY_RESERVATION_ENABLED := .Env.PROSODY_RESERVATION_ENABLED | default "false" | toBool -}} +{{ $PROSODY_RESERVATION_REST_BASE_URL := .Env.PROSODY_RESERVATION_REST_BASE_URL | default "" -}} {{ $PUBLIC_URL := .Env.PUBLIC_URL | default "https://localhost:8443" -}} {{ $PUBLIC_URL_DOMAIN := $PUBLIC_URL | trimPrefix "https://" | trimSuffix "/" -}} -{{ $STUN_HOST := .Env.STUN_HOST | default "" -}} -{{ $STUN_PORT := .Env.STUN_PORT | default "443" -}} -{{ $TURN_HOST := .Env.TURN_HOST | default "" -}} -{{ $TURN_HOSTS := splitList "," $TURN_HOST -}} -{{ $TURN_PORT := .Env.TURN_PORT | default "443" -}} -{{ $TURN_TRANSPORT := .Env.TURN_TRANSPORT | default "tcp" -}} -{{ $TURN_TRANSPORTS := splitList "," $TURN_TRANSPORT -}} -{{ $TURN_TTL := .Env.TURN_TTL | default "86400" -}} -{{ $TURNS_HOST := .Env.TURNS_HOST | default "" -}} -{{ $TURNS_HOSTS := splitList "," $TURNS_HOST -}} -{{ $TURNS_PORT := .Env.TURNS_PORT | default "443" -}} +{{ $RATE_LIMIT_ALLOW_RANGES := .Env.PROSODY_RATE_LIMIT_ALLOW_RANGES | default "10.0.0.0/8" -}} +{{ $RATE_LIMIT_CACHE_SIZE := .Env.PROSODY_RATE_LIMIT_CACHE_SIZE | default "10000" -}} +{{ $RATE_LIMIT_LOGIN_RATE := .Env.PROSODY_RATE_LIMIT_LOGIN_RATE | default "3" -}} +{{ $RATE_LIMIT_SESSION_RATE := .Env.PROSODY_RATE_LIMIT_SESSION_RATE | default "200" -}} +{{ $RATE_LIMIT_TIMEOUT := .Env.PROSODY_RATE_LIMIT_TIMEOUT | default "60" -}} {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} {{ $XMPP_GUEST_DOMAIN := .Env.XMPP_GUEST_DOMAIN | default "guest.meet.jitsi" -}} {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}} {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}} {{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 -}} -{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}} -{{ $JIBRI_RECORDER_USER := .Env.JIBRI_RECORDER_USER | default "recorder" -}} -{{ $JIGASI_TRANSCRIBER_USER := .Env.JIGASI_TRANSCRIBER_USER | default "transcriber" -}} -{{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}} -{{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}} -{{ $PROSODY_RESERVATION_ENABLED := .Env.PROSODY_RESERVATION_ENABLED | default "false" | toBool -}} -{{ $PROSODY_RESERVATION_REST_BASE_URL := .Env.PROSODY_RESERVATION_REST_BASE_URL | default "" -}} -{{ $RATE_LIMIT_LOGIN_RATE := .Env.PROSODY_RATE_LIMIT_LOGIN_RATE | default "3" -}} -{{ $RATE_LIMIT_SESSION_RATE := .Env.PROSODY_RATE_LIMIT_SESSION_RATE | default "200" -}} -{{ $RATE_LIMIT_TIMEOUT := .Env.PROSODY_RATE_LIMIT_TIMEOUT | default "60" -}} -{{ $RATE_LIMIT_ALLOW_RANGES := .Env.PROSODY_RATE_LIMIT_ALLOW_RANGES | default "10.0.0.0/8" -}} -{{ $RATE_LIMIT_CACHE_SIZE := .Env.PROSODY_RATE_LIMIT_CACHE_SIZE | default "10000" -}} -{{ $ENV := .Env -}} +{{ $XMPP_HIDDEN_DOMAIN := .Env.XMPP_HIDDEN_DOMAIN | default "hidden.meet.jitsi" -}} admins = { {{ if .Env.JIGASI_XMPP_PASSWORD }} @@ -81,41 +72,16 @@ plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom", "/prosody-plugi muc_mapper_domain_base = "{{ $XMPP_DOMAIN }}"; muc_mapper_domain_prefix = "{{ $XMPP_MUC_DOMAIN_PREFIX }}"; -http_default_host = "{{ $XMPP_DOMAIN }}" +recorder_prefixes = { "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_HIDDEN_DOMAIN }}" }; -{{ if .Env.TURN_CREDENTIALS -}} -external_service_secret = "{{.Env.TURN_CREDENTIALS}}"; -{{- end }} - -{{ if or .Env.STUN_HOST .Env.TURN_HOST .Env.TURNS_HOST -}} -external_services = { - {{- if $STUN_HOST }} - { type = "stun", host = "{{ $STUN_HOST }}", port = {{ $STUN_PORT }}, transport = "udp" } - {{- end }} - {{- if $TURN_HOST -}} - {{- range $idx1, $host := $TURN_HOSTS -}} - {{- range $idx2, $transport := $TURN_TRANSPORTS -}} - {{- if or $STUN_HOST $idx1 $idx2 -}},{{- end }} - { type = "turn", host = "{{ $host }}", port = {{ $TURN_PORT }}, transport = "{{ $transport }}", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" } - {{- end -}} - {{- end -}} - {{- end -}} - - {{- if $TURNS_HOST -}} - {{- range $idx, $host := $TURNS_HOSTS -}} - {{- if or $STUN_HOST $TURN_HOST $idx -}},{{- end }} - { type = "turns", host = "{{ $host }}", port = {{ $TURNS_PORT }}, transport = "tcp", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" } - {{- end }} - {{- end }} -}; -{{- end }} +http_default_host = "{{ $XMPP_DOMAIN }}" {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) .Env.JWT_ACCEPTED_ISSUERS }} -asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" } +asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS | compact) }}" } {{ end }} {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) .Env.JWT_ACCEPTED_AUDIENCES }} -asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" } +asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES | compact) }}" } {{ end }} consider_bosh_secure = true; @@ -148,7 +114,9 @@ VirtualHost "{{ $XMPP_DOMAIN }}" {{ end -}} authentication = "{{ $JWT_AUTH_TYPE }}" app_id = "{{ .Env.JWT_APP_ID }}" + {{ if $ENABLE_APP_SECRET }} app_secret = "{{ .Env.JWT_APP_SECRET }}" + {{ end }} allow_empty_token = {{ $JWT_ALLOW_EMPTY }} {{ if $JWT_ASAP_KEYSERVER }} asap_key_server = "{{ .Env.JWT_ASAP_KEYSERVER }}" @@ -179,7 +147,9 @@ VirtualHost "{{ $XMPP_DOMAIN }}" {{ else if eq $PROSODY_AUTH_TYPE "hybrid_matrix_token" }} authentication = "hybrid_matrix_token" app_id = "{{ .Env.JWT_APP_ID }}" + {{ if $ENABLE_APP_SECRET }} app_secret = "{{ .Env.JWT_APP_SECRET }}" + {{ end }} allow_empty_token = {{ $JWT_ALLOW_EMPTY }} enable_domain_verification = {{ $JWT_ENABLE_DOMAIN_VERIFICATION }} @@ -212,9 +182,6 @@ VirtualHost "{{ $XMPP_DOMAIN }}" {{ if $ENABLE_END_CONFERENCE }} "end_conference"; {{ end }} - {{ if or .Env.TURN_HOST .Env.TURNS_HOST }} - "external_services"; - {{ end }} {{ if $ENABLE_LOBBY }} "muc_lobby_rooms"; {{ end }} @@ -225,7 +192,7 @@ VirtualHost "{{ $XMPP_DOMAIN }}" "av_moderation"; {{ end }} {{ if .Env.XMPP_MODULES }} - "{{ join "\";\n \"" (splitList "," .Env.XMPP_MODULES) }}"; + "{{ join "\";\n \"" (splitList "," .Env.XMPP_MODULES | compact) }}"; {{ end }} {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "ldap") }} "auth_cyrus"; @@ -236,14 +203,18 @@ VirtualHost "{{ $XMPP_DOMAIN }}" {{ if $ENABLE_VISITORS }} "visitors"; {{ end }} + {{- if and $ENABLE_RECORDING_METADATA $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "jwt") $ENABLE_RECORDING }} + "jibri_session"; + {{- end }} + } main_muc = "{{ $XMPP_MUC_DOMAIN }}" room_metadata_component = "metadata.{{ $XMPP_DOMAIN }}" {{ if $ENABLE_LOBBY }} lobby_muc = "lobby.{{ $XMPP_DOMAIN }}" - {{ if $ENABLE_RECORDING }} - muc_lobby_whitelist = { "{{ $XMPP_RECORDER_DOMAIN }}" } + {{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS }} + muc_lobby_whitelist = { "{{ $XMPP_HIDDEN_DOMAIN }}" } {{ end }} {{ end }} @@ -269,11 +240,11 @@ VirtualHost "{{ $XMPP_DOMAIN }}" c2s_require_encryption = {{ $C2S_REQUIRE_ENCRYPTION }} {{ if $ENABLE_VISITORS -}} - visitors_ignore_list = { "{{ $XMPP_RECORDER_DOMAIN }}" } + visitors_ignore_list = { "{{ $XMPP_HIDDEN_DOMAIN }}" } {{ end }} {{ if .Env.XMPP_CONFIGURATION -}} - {{ join "\n " (splitList "," .Env.XMPP_CONFIGURATION) }} + {{ join "\n " (splitList "," .Env.XMPP_CONFIGURATION | compact) }} {{ end -}} {{ if $ENABLE_GUEST_DOMAIN }} @@ -299,11 +270,16 @@ VirtualHost "{{ $XMPP_AUTH_DOMAIN }}" } modules_enabled = { "limits_exception"; + {{- if and $ENABLE_RECORDING_METADATA $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "jwt") $ENABLE_RECORDING }} + "jibri_session"; + {{- end }} + "smacks"; } authentication = "internal_hashed" + smacks_hibernation_time = 15; -{{ if $ENABLE_RECORDING }} -VirtualHost "{{ $XMPP_RECORDER_DOMAIN }}" +{{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS }} +VirtualHost "{{ $XMPP_HIDDEN_DOMAIN }}" modules_enabled = { "smacks"; } @@ -313,8 +289,10 @@ VirtualHost "{{ $XMPP_RECORDER_DOMAIN }}" Component "{{ $XMPP_INTERNAL_MUC_DOMAIN }}" "muc" storage = "memory" modules_enabled = { + "muc_hide_all"; + "muc_filter_access"; {{ if .Env.XMPP_INTERNAL_MUC_MODULES -}} - "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}"; + "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES | compact) }}"; {{ end -}} } restrict_room_creation = true @@ -331,7 +309,7 @@ Component "{{ $XMPP_MUC_DOMAIN }}" "muc" modules_enabled = { "muc_meeting_id"; {{ if .Env.XMPP_MUC_MODULES -}} - "{{ join "\";\n \"" (splitList "," .Env.XMPP_MUC_MODULES) }}"; + "{{ join "\";\n \"" (splitList "," .Env.XMPP_MUC_MODULES | compact) }}"; {{ end -}} {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) -}} "{{ $JWT_TOKEN_AUTH_MODULE }}"; @@ -375,13 +353,13 @@ Component "{{ $XMPP_MUC_DOMAIN }}" "muc" -- List of regular expressions for IP addresses that are not limited by this module. rate_limit_whitelist = { "127.0.0.1"; -{{ range $index, $cidr := (splitList "," $RATE_LIMIT_ALLOW_RANGES) }} +{{ range $index, $cidr := (splitList "," $RATE_LIMIT_ALLOW_RANGES | compact) }} "{{ $cidr }}"; {{ end }} }; rate_limit_whitelist_hosts = { - "{{ $XMPP_RECORDER_DOMAIN }}"; + "{{ $XMPP_HIDDEN_DOMAIN }}"; } {{ end -}} @@ -392,19 +370,27 @@ Component "{{ $XMPP_MUC_DOMAIN }}" "muc" muc_room_locking = false muc_room_default_public_jids = true {{ if .Env.XMPP_MUC_CONFIGURATION -}} - {{ join "\n " (splitList "," .Env.XMPP_MUC_CONFIGURATION) }} + {{ join "\n " (splitList "," .Env.XMPP_MUC_CONFIGURATION | compact) }} {{ end -}} {{ if .Env.MAX_PARTICIPANTS }} - muc_access_whitelist = { "focus@{{ $XMPP_AUTH_DOMAIN }}" } + muc_access_whitelist = { + "focus@{{ $XMPP_AUTH_DOMAIN }}"; + {{- if $ENABLE_RECORDING }} + "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_HIDDEN_DOMAIN }}"; + {{- end }} + {{- if $ENABLE_TRANSCRIPTIONS }} + "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_HIDDEN_DOMAIN }}"; + {{- end }} + } muc_max_occupants = "{{ .Env.MAX_PARTICIPANTS }}" {{ end }} muc_password_whitelist = { "focus@{{ $XMPP_AUTH_DOMAIN }}"; {{- if $ENABLE_RECORDING }} - "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}"; + "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_HIDDEN_DOMAIN }}"; {{- end }} {{- if $ENABLE_TRANSCRIPTIONS }} - "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}"; + "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_HIDDEN_DOMAIN }}"; {{- end }} } muc_tombstones = false @@ -417,7 +403,7 @@ Component "speakerstats.{{ $XMPP_DOMAIN }}" "speakerstats_component" muc_component = "{{ $XMPP_MUC_DOMAIN }}" {{- if .Env.XMPP_SPEAKERSTATS_MODULES }} modules_enabled = { - "{{ join "\";\n \"" (splitList "," .Env.XMPP_SPEAKERSTATS_MODULES) }}"; + "{{ join "\";\n \"" (splitList "," .Env.XMPP_SPEAKERSTATS_MODULES | compact) }}"; } {{- end }} @@ -443,13 +429,19 @@ Component "lobby.{{ $XMPP_DOMAIN }}" "muc" muc_room_cache_size = 10000 muc_room_locking = false muc_room_default_public_jids = true + {{- if .Env.MAX_PARTICIPANTS }} + muc_max_occupants = "{{ .Env.MAX_PARTICIPANTS }}" + {{- end }} modules_enabled = { - {{ if $ENABLE_RATE_LIMITS -}} + {{- if $ENABLE_RATE_LIMITS }} "muc_rate_limit"; - {{ end -}} - {{ if .Env.XMPP_LOBBY_MUC_MODULES -}} - "{{ join "\";\n \"" (splitList "," .Env.XMPP_LOBBY_MUC_MODULES) }}"; - {{ end -}} + {{- end }} + {{- if .Env.MAX_PARTICIPANTS }} + "muc_max_occupants"; + {{- end }} + {{- if .Env.XMPP_LOBBY_MUC_MODULES }} + "{{ join "\";\n \"" (splitList "," .Env.XMPP_LOBBY_MUC_MODULES | compact) }}"; + {{- end }} } {{ end }} @@ -472,7 +464,7 @@ Component "breakout.{{ $XMPP_DOMAIN }}" "muc" "muc_rate_limit"; {{ end -}} {{ if .Env.XMPP_BREAKOUT_MUC_MODULES -}} - "{{ join "\";\n \"" (splitList "," .Env.XMPP_BREAKOUT_MUC_MODULES) }}"; + "{{ join "\";\n \"" (splitList "," .Env.XMPP_BREAKOUT_MUC_MODULES | compact) }}"; {{ end -}} } {{ end }} diff --git a/prosody/rootfs/defaults/conf.d/visitors.cfg.lua b/prosody/rootfs/defaults/conf.d/visitors.cfg.lua index 035759a75b..81218c8574 100644 --- a/prosody/rootfs/defaults/conf.d/visitors.cfg.lua +++ b/prosody/rootfs/defaults/conf.d/visitors.cfg.lua @@ -1,7 +1,9 @@ {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool -}} {{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) -}} {{ $ENABLE_RATE_LIMITS := .Env.PROSODY_ENABLE_RATE_LIMITS | default "0" | toBool -}} +{{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool -}} {{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}} +{{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}} {{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool -}} {{ $JIBRI_RECORDER_USER := .Env.JIBRI_RECORDER_USER | default "recorder" -}} {{ $JIGASI_TRANSCRIBER_USER := .Env.JIGASI_TRANSCRIBER_USER | default "transcriber" -}} @@ -15,15 +17,6 @@ {{ $RELEASE_NUMBER := .Env.RELEASE_NUMBER | default "" -}} {{ $SHARD_NAME := .Env.SHARD | default "default" -}} {{ $S2S_PORT := .Env.PROSODY_S2S_PORT | default "5269" -}} -{{ $TURN_HOST := .Env.TURN_HOST | default "" -}} -{{ $TURN_HOSTS := splitList "," $TURN_HOST -}} -{{ $TURN_PORT := .Env.TURN_PORT | default "443" -}} -{{ $TURN_TRANSPORT := .Env.TURN_TRANSPORT | default "tcp" -}} -{{ $TURN_TRANSPORTS := splitList "," $TURN_TRANSPORT -}} -{{ $TURN_TTL := .Env.TURN_TTL | default "86400" -}} -{{ $TURNS_HOST := .Env.TURNS_HOST | default "" -}} -{{ $TURNS_HOSTS := splitList "," $TURNS_HOST -}} -{{ $TURNS_PORT := .Env.TURNS_PORT | default "443" -}} {{ $VISITOR_INDEX := .Env.PROSODY_VISITOR_INDEX | default "0" -}} {{ $VISITORS_MUC_PREFIX := .Env.PROSODY_VISITORS_MUC_PREFIX | default "muc" -}} {{ $VISITORS_MAX_VISITORS_PER_NODE := .Env.VISITORS_MAX_VISITORS_PER_NODE | default "250" }} @@ -35,7 +28,7 @@ {{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 -}} {{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}} {{ $XMPP_SERVER_S2S_PORT := .Env.XMPP_SERVER_S2S_PORT | default $S2S_PORT -}} -{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}} +{{ $XMPP_HIDDEN_DOMAIN := .Env.XMPP_HIDDEN_DOMAIN | default "hidden.meet.jitsi" -}} plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom", "/prosody-plugins-contrib" } @@ -44,30 +37,6 @@ muc_mapper_domain_prefix = "{{ $XMPP_MUC_DOMAIN_PREFIX }}"; http_default_host = "v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DOMAIN }}" -{{ if .Env.TURN_CREDENTIALS -}} -external_service_secret = "{{.Env.TURN_CREDENTIALS}}"; -{{- end }} - -{{ if or .Env.TURN_HOST .Env.TURNS_HOST -}} -external_services = { - {{ if $TURN_HOST -}} - {{- range $idx1, $host := $TURN_HOSTS -}} - {{- range $idx2, $transport := $TURN_TRANSPORTS -}} - {{- if or $idx1 $idx2 -}},{{- end }} - { type = "turn", host = "{{ $host }}", port = {{ $TURN_PORT }}, transport = "{{ $transport }}", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" } - {{- end -}} - {{- end -}} - {{- end -}} - - {{- if $TURNS_HOST -}} - {{- range $idx, $host := $TURNS_HOSTS -}} - {{- if or $TURN_HOST $idx -}},{{- end }} - { type = "turns", host = "{{ $host }}", port = {{ $TURNS_PORT }}, transport = "tcp", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" } - {{- end }} - {{- end }} -}; -{{- end }} - main_domain = '{{ $XMPP_DOMAIN }}'; -- https://prosody.im/doc/modules/mod_smacks @@ -99,6 +68,15 @@ s2sout_override = { {{ if $ENABLE_GUEST_DOMAIN -}} ["{{ $XMPP_GUEST_DOMAIN }}"] = "tcp://{{ $XMPP_SERVER }}:{{ $XMPP_SERVER_S2S_PORT }}"; {{ end -}} +{{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}} + ["{{ $XMPP_HIDDEN_DOMAIN }}"] = "tcp://{{ $XMPP_SERVER }}:{{ $XMPP_SERVER_S2S_PORT }}"; +{{ end -}} +{{ if .Env.PROSODY_VISITORS_S2S_VHOSTS -}} + {{- range $index, $vhost := (splitList "," .Env.PROSODY_VISITORS_S2S_VHOSTS | compact) }} + ["{{ $vhost }}"] = "tcp://{{ $XMPP_SERVER }}:{{ $XMPP_SERVER_S2S_PORT }}"; + {{ end -}} +{{ end -}} + } muc_limit_messages_count = 10; @@ -119,7 +97,7 @@ VirtualHost 'v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DOMAIN }}' "smacks"; -- XEP-0198: Stream Management {{ end -}} {{ if .Env.XMPP_MODULES }} - "{{ join "\";\n\"" (splitList "," .Env.XMPP_MODULES) }}"; + "{{ join "\";\n\"" (splitList "," .Env.XMPP_MODULES | compact) }}"; {{ end }} } main_muc = '{{ $VISITORS_MUC_PREFIX }}.v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DOMAIN }}'; @@ -128,14 +106,16 @@ VirtualHost 'v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DOMAIN }}' release_number = "{{ $RELEASE_NUMBER }}" {{ if .Env.XMPP_CONFIGURATION -}} - {{ join "\n " (splitList "," .Env.XMPP_CONFIGURATION) }} + {{ join "\n " (splitList "," .Env.XMPP_CONFIGURATION | compact) }} {{- end }} VirtualHost '{{ $XMPP_AUTH_DOMAIN }}' modules_enabled = { 'limits_exception'; + 'smacks'; } authentication = 'internal_hashed' + smacks_hibernation_time = 15; Component '{{ $VISITORS_MUC_PREFIX }}.v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DOMAIN }}' 'muc' storage = 'memory' @@ -157,7 +137,7 @@ Component '{{ $VISITORS_MUC_PREFIX }}.v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DO "rate_limit"; {{ end -}} {{ if .Env.XMPP_MUC_MODULES -}} - "{{ join "\";\n\"" (splitList "," .Env.XMPP_MUC_MODULES) }}"; + "{{ join "\";\n\"" (splitList "," .Env.XMPP_MUC_MODULES | compact) }}"; {{ end -}} } muc_room_default_presence_broadcast = { @@ -176,18 +156,23 @@ Component '{{ $VISITORS_MUC_PREFIX }}.v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DO {{ if $ENABLE_RATE_LIMITS -}} -- Max allowed join/login rate in events per second. - rate_limit_login_rate = {{ $RATE_LIMIT_LOGIN_RATE }}; - -- The rate to which sessions from IPs exceeding the join rate will be limited, in bytes per second. - rate_limit_session_rate = {{ $RATE_LIMIT_SESSION_RATE }}; - -- The time in seconds, after which the limit for an IP address is lifted. - rate_limit_timeout = {{ $RATE_LIMIT_TIMEOUT }}; - -- List of regular expressions for IP addresses that are not limited by this module. - rate_limit_whitelist = { - "127.0.0.1"; - {{ range $index, $cidr := (splitList "," $RATE_LIMIT_ALLOW_RANGES) -}} - "{{ $cidr }}"; - {{ end -}} - }; + rate_limit_login_rate = {{ $RATE_LIMIT_LOGIN_RATE }}; + -- The rate to which sessions from IPs exceeding the join rate will be limited, in bytes per second. + rate_limit_session_rate = {{ $RATE_LIMIT_SESSION_RATE }}; + -- The time in seconds, after which the limit for an IP address is lifted. + rate_limit_timeout = {{ $RATE_LIMIT_TIMEOUT }}; + -- List of regular expressions for IP addresses that are not limited by this module. + rate_limit_whitelist = { + "127.0.0.1"; + {{ range $index, $cidr := (splitList "," $RATE_LIMIT_ALLOW_RANGES) -}} + "{{ $cidr }}"; + {{ end -}} + }; + + rate_limit_whitelist_jids = { + "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_HIDDEN_DOMAIN }}", + "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_HIDDEN_DOMAIN }}" + } {{ end -}} @@ -196,5 +181,5 @@ Component '{{ $VISITORS_MUC_PREFIX }}.v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DO muc_rate_joins = 30; {{ if .Env.XMPP_MUC_CONFIGURATION -}} - {{ join "\n" (splitList "," .Env.XMPP_MUC_CONFIGURATION) }} + {{ join "\n" (splitList "," .Env.XMPP_MUC_CONFIGURATION | compact) }} {{ end -}} diff --git a/prosody/rootfs/defaults/prosody.cfg.lua b/prosody/rootfs/defaults/prosody.cfg.lua index 3d1b80ce69..c278acd4a5 100644 --- a/prosody/rootfs/defaults/prosody.cfg.lua +++ b/prosody/rootfs/defaults/prosody.cfg.lua @@ -1,9 +1,13 @@ {{ $C2S_REQUIRE_ENCRYPTION := .Env.PROSODY_C2S_REQUIRE_ENCRYPTION | default "1" | toBool -}} +{{ $DISABLE_C2S_LIMIT := .Env.PROSODY_DISABLE_C2S_LIMIT | default "0" | toBool -}} +{{ $DISABLE_S2S_LIMIT := .Env.PROSODY_DISABLE_S2S_LIMIT | default "0" | toBool -}} {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool -}} {{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) -}} +{{ $ENABLE_IPV6 := .Env.ENABLE_IPV6 | default "true" | toBool -}} +{{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool -}} +{{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}} {{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}} {{ $ENABLE_S2S := or $ENABLE_VISITORS ( .Env.PROSODY_ENABLE_S2S | default "0" | toBool ) }} -{{ $ENABLE_IPV6 := .Env.ENABLE_IPV6 | default "true" | toBool -}} {{ $GC_TYPE := .Env.GC_TYPE | default "incremental" -}} {{ $GC_INC_TH := .Env.GC_INC_TH | default 400 -}} {{ $GC_INC_SPEED := .Env.GC_INC_SPEED | default 250 -}} @@ -17,20 +21,33 @@ {{ $PROSODY_ENABLE_METRICS := .Env.PROSODY_ENABLE_METRICS | default "false" | toBool -}} {{ $PROSODY_ENABLE_STANZA_COUNTS := .Env.PROSODY_ENABLE_STANZA_COUNTS | default "false" | toBool -}} {{ $PROSODY_ADMINS := .Env.PROSODY_ADMINS | default "" -}} -{{ $PROSODY_ADMIN_LIST := splitList "," $PROSODY_ADMINS -}} +{{ $PROSODY_ADMIN_LIST := splitList "," $PROSODY_ADMINS | compact -}} +{{ $PROSODY_MODE := .Env.PROSODY_MODE | default "client" -}} {{ $TRUSTED_PROXIES := .Env.PROSODY_TRUSTED_PROXIES | default "127.0.0.1,::1" -}} -{{ $TRUSTED_PROXY_LIST := splitList "," $TRUSTED_PROXIES -}} +{{ $TRUSTED_PROXY_LIST := splitList "," $TRUSTED_PROXIES | compact -}} {{ $PROSODY_S2S_LIMIT := .Env.PROSODY_S2S_LIMIT | default "30kb/s" -}} {{ $S2S_PORT := .Env.PROSODY_S2S_PORT | default "5269" }} +{{ $STUN_HOST := .Env.STUN_HOST | default "" -}} +{{ $STUN_PORT := .Env.STUN_PORT | default "443" -}} +{{ $TURNS_HOST := .Env.TURNS_HOST | default "" -}} +{{ $TURNS_HOSTS := splitList "," $TURNS_HOST | compact -}} +{{ $TURNS_PORT := .Env.TURNS_PORT | default "443" -}} +{{ $TURN_HOST := .Env.TURN_HOST | default "" -}} +{{ $TURN_HOSTS := splitList "," $TURN_HOST | compact -}} +{{ $TURN_PORT := .Env.TURN_PORT | default "443" -}} +{{ $TURN_TRANSPORT := .Env.TURN_TRANSPORT | default "tcp" -}} +{{ $TURN_TRANSPORTS := splitList "," $TURN_TRANSPORT | compact -}} +{{ $TURN_TTL := .Env.TURN_TTL | default "86400" -}} {{ $VISITORS_MUC_PREFIX := .Env.PROSODY_VISITORS_MUC_PREFIX | default "muc" -}} {{ $VISITORS_XMPP_DOMAIN := .Env.VISITORS_XMPP_DOMAIN | default "meet.jitsi" -}} {{ $VISITORS_XMPP_SERVER := .Env.VISITORS_XMPP_SERVER | default "" -}} -{{ $VISITORS_XMPP_SERVERS := splitList "," $VISITORS_XMPP_SERVER -}} +{{ $VISITORS_XMPP_SERVERS := splitList "," $VISITORS_XMPP_SERVER | compact -}} {{ $VISITORS_XMPP_PORT := .Env.VISITORS_XMPP_PORT | default 52220 }} {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} {{ $XMPP_GUEST_DOMAIN := .Env.XMPP_GUEST_DOMAIN | default "guest.meet.jitsi" -}} {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}} {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} +{{ $XMPP_HIDDEN_DOMAIN := .Env.XMPP_HIDDEN_DOMAIN | default "hidden.meet.jitsi" -}} -- Prosody Example Configuration File -- @@ -69,7 +86,7 @@ modules_enabled = { "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in. "tls"; -- Add support for secure TLS on c2s/s2s connections "disco"; -- Service discovery - +{{- if eq $PROSODY_MODE "client" }} -- Not essential, but recommended "private"; -- Private XML storage (for room bookmarks, etc.) "limits"; -- Enable bandwidth limiting for XMPP connections @@ -78,16 +95,17 @@ modules_enabled = { --"privacy"; -- Support privacy lists --"compression"; -- Stream compression (Debian: requires lua-zlib module to work) - -- Nice to have - "version"; -- Replies to server version requests - "uptime"; -- Report how long server has been running - "time"; -- Let others know the time here on this server - "ping"; -- Replies to XMPP pings with pongs - -- Admin interfaces - "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands + -- "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands --"admin_telnet"; -- Opens telnet console interface on localhost port 5582 + -- Nice to have + "version"; -- Replies to server version requests +{{- end }} + "ping"; -- Replies to XMPP pings with pongs +{{- if eq $PROSODY_MODE "visitors" }} + "limits"; -- Enable bandwidth limiting for XMPP connections +{{- end }} -- HTTP modules --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP" --"http_files"; -- Serve static files from a directory over HTTP @@ -101,17 +119,19 @@ modules_enabled = { --"motd"; -- Send a message to users when they log in --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots. "http_health"; - {{ if eq .Env.PROSODY_MODE "brewery" -}} + {{ if eq $PROSODY_MODE "brewery" -}} "firewall"; -- Enable firewalling "secure_interfaces"; {{ end -}} {{ if $ENABLE_S2S -}} - "dialback"; -- s2s dialback support "s2s_bidi"; "certs_s2soutinjection"; "s2sout_override"; "s2s_whitelist"; {{ end -}} + {{- if or .Env.TURN_HOST .Env.TURNS_HOST }} + "external_services"; + {{- end }} {{ if $PROSODY_ENABLE_METRICS }} -- metrics collection functionality @@ -124,7 +144,7 @@ modules_enabled = { {{ end -}} {{ if .Env.GLOBAL_MODULES }} - "{{ join "\";\n\"" (splitList "," .Env.GLOBAL_MODULES) }}"; + "{{ join "\";\n\"" (splitList "," .Env.GLOBAL_MODULES | compact) }}"; {{ end }} }; @@ -137,7 +157,7 @@ trusted_proxies = { {{ end }} } -{{ if eq .Env.PROSODY_MODE "brewery" -}} +{{ if eq $PROSODY_MODE "brewery" -}} firewall_scripts = { "/config/rules.d/jvb_muc_presence_filter.pfw"; }; @@ -159,15 +179,17 @@ modules_disabled = { -- For more information see http://prosody.im/doc/creating_accounts allow_registration = false; -{{ if ne .Env.PROSODY_MODE "brewery" -}} --- Enable rate limits for incoming client and server connections +{{ if and (ne $PROSODY_MODE "brewery") (or (not $DISABLE_C2S_LIMIT) (not $DISABLE_S2S_LIMIT)) -}} +-- Enable rate limits for incoming connections limits = { -{{ if ne $PROSODY_C2S_LIMIT "" }} +{{ if not $DISABLE_C2S_LIMIT }} +-- Limit incoming client connections c2s = { rate = "{{ $PROSODY_C2S_LIMIT }}"; }; {{ end }} -{{ if ne $PROSODY_S2S_LIMIT "" }} +{{ if not $DISABLE_S2S_LIMIT }} +-- Limit incoming server connections s2sin = { rate = "{{ $PROSODY_S2S_LIMIT }}"; }; @@ -211,17 +233,24 @@ c2s_interfaces = { "*" } -- set s2s port s2s_ports = { {{ $S2S_PORT }} } -- Listen on specific s2s port -{{ if eq .Env.PROSODY_MODE "visitors" -}} +{{ if eq $PROSODY_MODE "visitors" -}} s2s_whitelist = { - {{ if $ENABLE_VISITORS -}} + {{- if $ENABLE_VISITORS }} '{{ $XMPP_MUC_DOMAIN }}'; -- needed for visitors to send messages to main room 'visitors.{{ $XMPP_DOMAIN }}'; -- needed for sending promotion request to visitors.{{ $XMPP_DOMAIN }} component '{{ $XMPP_DOMAIN }}'; -- unavailable presences back to main room + {{- end }} - {{ end -}} - {{ if $ENABLE_GUEST_DOMAIN -}} + {{- if $ENABLE_GUEST_DOMAIN }} '{{ $XMPP_GUEST_DOMAIN }}'; - {{ end -}} + {{- end }} + {{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}} + '{{ $XMPP_HIDDEN_DOMAIN }}'; + {{- end }} + + {{- if .Env.PROSODY_VISITORS_S2S_VHOSTS }} + '{{ join "';\n '" (splitList "," .Env.PROSODY_VISITORS_S2S_VHOSTS | compact) }}'; + {{- end }} } {{ end -}} @@ -237,7 +266,7 @@ s2sout_override = { ["v{{ $index }}.{{ $VISITORS_XMPP_DOMAIN }}"] = "tcp://{{ $SERVER._0 }}:{{ $SERVER._1 | default $DEFAULT_PORT }}"; {{ end -}} }; -{{ if ne .Env.PROSODY_MODE "visitors" -}} +{{ if ne $PROSODY_MODE "visitors" -}} s2s_whitelist = { {{ range $index, $element := $VISITORS_XMPP_SERVERS -}} "{{ $VISITORS_MUC_PREFIX }}.v{{ $index }}.{{ $VISITORS_XMPP_DOMAIN }}"; @@ -298,19 +327,85 @@ authentication = "internal_hashed" log = { { levels = {min = "{{ $LOG_LEVEL }}"}, timestamps = "%Y-%m-%d %X", to = "console"}; {{ if .Env.PROSODY_LOG_CONFIG }} - {{ join "\n" (splitList "\\n" .Env.PROSODY_LOG_CONFIG) }} + {{ join "\n" (splitList "\\n" .Env.PROSODY_LOG_CONFIG | compact) }} {{ end }} } -{{ if $PROSODY_ENABLE_METRICS }} +{{ if $PROSODY_ENABLE_METRICS }} -- Statistics Provider configuration statistics = "internal" statistics_interval = "manual" openmetrics_allow_cidr = "{{ $PROSODY_METRICS_ALLOWED_CIDR }}" {{ end }} +{{ if .Env.TURN_CREDENTIALS -}} +external_service_secret = "{{.Env.TURN_CREDENTIALS}}"; +{{- end }} + +{{ if or .Env.STUN_HOST .Env.TURN_HOST .Env.TURNS_HOST -}} +external_services = { + {{- if $STUN_HOST }} + { type = "stun", host = "{{ $STUN_HOST }}", port = {{ $STUN_PORT }}, transport = "udp" } + {{- end }} + {{- if $TURN_HOST -}} + {{- range $idx1, $host := $TURN_HOSTS -}} + {{- range $idx2, $transport := $TURN_TRANSPORTS -}} + {{- if or $STUN_HOST $idx1 $idx2 -}},{{- end }} + { + type = "turn", + host = "{{ $host }}", + port = {{ $TURN_PORT }}, + transport = "{{ $transport }}", + ttl = {{ $TURN_TTL }}, + + {{ if $.Env.TURN_CREDENTIALS -}} + secret = true, + algorithm = "turn", + {{- end }} + + {{ if $.Env.TURN_USERNAME -}} + username = "{{$.Env.TURN_USERNAME}}", + {{- end }} + + {{ if $.Env.TURN_PASSWORD -}} + password = "{{$.Env.TURN_PASSWORD}}", + {{- end }} + } + {{- end -}} + {{- end -}} + {{- end -}} + + {{- if $TURNS_HOST -}} + {{- range $idx, $host := $TURNS_HOSTS -}} + {{- if or $STUN_HOST $TURN_HOST $idx -}},{{- end }} + { + type = "turns", + host = "{{ $host }}", + port = {{ $TURNS_PORT }}, + transport = "tcp", + ttl = {{ $TURN_TTL }}, + + {{ if $.Env.TURN_CREDENTIALS -}} + secret = true, + algorithm = "turn", + {{- end }} + + {{ if $.Env.TURN_USERNAME -}} + username = "{{$.Env.TURN_USERNAME}}", + {{- end }} + + {{ if $.Env.TURN_PASSWORD -}} + password = "{{$.Env.TURN_PASSWORD}}", + {{- end }} + } + {{- end }} + {{- end }} +}; +{{- end }} + + {{ if .Env.GLOBAL_CONFIG }} -{{ join "\n" (splitList "\\n" .Env.GLOBAL_CONFIG) }} +{{ join "\n" (splitList "\\n" .Env.GLOBAL_CONFIG | compact) }} {{ end }} -- Enable use of native prosody 0.11 support for epoll over select diff --git a/prosody/rootfs/etc/cont-init.d/10-config b/prosody/rootfs/etc/cont-init.d/10-config index 98f0f832eb..62e293f79c 100644 --- a/prosody/rootfs/etc/cont-init.d/10-config +++ b/prosody/rootfs/etc/cont-init.d/10-config @@ -1,6 +1,6 @@ #!/usr/bin/with-contenv bash -if [[ ! -f /etc/saslauthd.conf ]]; then +if [[ ! -f /etc/saslauthd.conf ]] && [[ "$AUTH_TYPE" == "ldap" ]]; then tpl /defaults/saslauthd.conf > /etc/saslauthd.conf mkdir -pm777 /var/run/saslauthd adduser prosody sasl @@ -32,7 +32,7 @@ fi mkdir /config/certs cp -r /defaults/* /config -[ -z "$PROSODY_MODE" ] && PROSODY_MODE="client" +[ -z "$PROSODY_MODE" ] && export PROSODY_MODE="client" if [[ "$PROSODY_MODE" == "visitors" ]]; then echo "Prosody visitor mode, using alternate config" @@ -77,7 +77,9 @@ fi [ -z "${JVB_AUTH_USER}" ] && export JVB_AUTH_USER=jvb [ -z "${XMPP_DOMAIN}" ] && export XMPP_DOMAIN=meet.jitsi [ -z "${XMPP_AUTH_DOMAIN}" ] && export XMPP_AUTH_DOMAIN=auth.meet.jitsi -[ -z "${XMPP_RECORDER_DOMAIN}" ] && export XMPP_RECORDER_DOMAIN=recorder.meet.jitsi +# maintain backward compatibility with older variable +[ -z "${XMPP_HIDDEN_DOMAIN}" ] && export XMPP_HIDDEN_DOMAIN="$XMPP_RECORDER_DOMAIN" +[ -z "${XMPP_HIDDEN_DOMAIN}" ] && export XMPP_HIDDEN_DOMAIN=hidden.meet.jitsi prosodyctl --config $PROSODY_CFG register focus $XMPP_AUTH_DOMAIN $JICOFO_AUTH_PASSWORD @@ -115,7 +117,13 @@ if [[ "$PROSODY_MODE" == "client" ]]; then echo 'FATAL ERROR: Jibri recorder password must be changed, check the README' exit 1 fi - prosodyctl --config $PROSODY_CFG register $JIBRI_RECORDER_USER $XMPP_RECORDER_DOMAIN $JIBRI_RECORDER_PASSWORD + prosodyctl --config $PROSODY_CFG register $JIBRI_RECORDER_USER $XMPP_HIDDEN_DOMAIN $JIBRI_RECORDER_PASSWORD + fi + if [[ "$(echo "$ENABLE_TRANSCRIPTIONS" | tr '[:upper:]' '[:lower:]')" == "true" ]] || [[ "$ENABLE_TRANSCRIPTIONS" == "1" ]]; then + if [[ ! -z $JIGASI_TRANSCRIBER_PASSWORD ]]; then + [ -z "$JIGASI_TRANSCRIBER_USER" ] && JIGASI_TRANSCRIBER_USER="transcriber" + prosodyctl --config $PROSODY_CFG register $JIGASI_TRANSCRIBER_USER $XMPP_HIDDEN_DOMAIN $JIGASI_TRANSCRIBER_PASSWORD + fi fi fi diff --git a/prosody/rootfs/etc/services.d/10-saslauthd/run b/prosody/rootfs/etc/services.d/10-saslauthd/run index 75199bb59c..126f44413c 100644 --- a/prosody/rootfs/etc/services.d/10-saslauthd/run +++ b/prosody/rootfs/etc/services.d/10-saslauthd/run @@ -1,2 +1,8 @@ #!/usr/bin/with-contenv bash -exec s6-setuidgid root saslauthd -a ldap -O /etc/saslauthd.conf -c -m /var/run/saslauthd -n 5 -d +if [[ -f /etc/saslauthd.conf ]]; then + exec s6-setuidgid root saslauthd -a ldap -O /etc/saslauthd.conf -c -m /var/run/saslauthd -n 5 -d +else + # if saslauthd should not be started, + # prevent s6 from restarting this script again and again + s6-svc -O /var/run/s6/services/10-saslauthd +fi diff --git a/transcriber.yml b/transcriber.yml new file mode 100644 index 0000000000..cd49a34dfa --- /dev/null +++ b/transcriber.yml @@ -0,0 +1,75 @@ +version: '3.5' + +services: + transcriber: + image: jitsi/jigasi:${JITSI_IMAGE_VERSION:-stable-9955} + restart: ${RESTART_POLICY:-unless-stopped} + volumes: + - ${CONFIG}/transcriber:/config:Z + - ${CONFIG}/transcripts:/tmp/transcripts:Z + environment: + - AUTOSCALER_SIDECAR_KEY_FILE + - AUTOSCALER_SIDECAR_KEY_ID + - AUTOSCALER_SIDECAR_GROUP_NAME + - AUTOSCALER_SIDECAR_HOST_ID + - AUTOSCALER_SIDECAR_INSTANCE_ID + - AUTOSCALER_SIDECAR_PORT + - AUTOSCALER_SIDECAR_REGION + - AUTOSCALER_SIDECAR_SHUTDOWN_POLLING_INTERVAL + - AUTOSCALER_SIDECAR_STATS_POLLING_INTERVAL + - AUTOSCALER_URL + - BOSH_URL_PATTERN + - XMPP_AUTH_DOMAIN + - XMPP_GUEST_DOMAIN + - XMPP_MUC_DOMAIN + - XMPP_INTERNAL_MUC_DOMAIN + - XMPP_SERVER + - XMPP_PORT + - XMPP_HIDDEN_DOMAIN + - XMPP_RECORDER_DOMAIN + - XMPP_DOMAIN + - PUBLIC_URL + - JIGASI_CONFIGURATION + - JIGASI_JVB_TIMEOUT + - JIGASI_LOCAL_REGION + - JIGASI_LOG_FILE + - JIGASI_MODE=transcriber + - JIGASI_XMPP_USER + - JIGASI_XMPP_PASSWORD + - JIGASI_BREWERY_MUC + - JIGASI_TRANSCRIBER_ADVERTISE_URL + - JIGASI_TRANSCRIBER_CUSTOM_SERVICE + - JIGASI_TRANSCRIBER_CUSTOM_TRANSLATION_SERVICE + - JIGASI_TRANSCRIBER_LIBRETRANSLATE_URL + - JIGASI_TRANSCRIBER_ENABLE_SAVING + - JIGASI_TRANSCRIBER_ENABLE_TRANSLATION + - JIGASI_TRANSCRIBER_FILTER_SILENCE + - JIGASI_TRANSCRIBER_OCI_COMPARTMENT + - JIGASI_TRANSCRIBER_OCI_REGION + - JIGASI_TRANSCRIBER_PASSWORD + - JIGASI_TRANSCRIBER_RECORD_AUDIO + - JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL + - JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL_KEY_PATH + - JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL_KEY_ID + - JIGASI_TRANSCRIBER_REMOTE_CONFIG_URL_AUD + - JIGASI_TRANSCRIBER_SEND_TXT + - JIGASI_TRANSCRIBER_USER + - JIGASI_TRANSCRIBER_VOSK_URL + - JIGASI_TRANSCRIBER_WHISPER_URL + - JIGASI_TRANSCRIBER_WHISPER_PRIVATE_KEY + - JIGASI_TRANSCRIBER_WHISPER_PRIVATE_KEY_NAME + - GC_PROJECT_ID + - GC_PRIVATE_KEY_ID + - GC_PRIVATE_KEY + - GC_CLIENT_EMAIL + - GC_CLIENT_ID + - GC_CLIENT_CERT_URL + - SHUTDOWN_REST_ENABLED + - SENTRY_DSN="${JIGASI_SENTRY_DSN:-0}" + - SENTRY_ENVIRONMENT + - SENTRY_RELEASE + - TZ + depends_on: + - prosody + networks: + meet.jitsi: diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf index 8cca7565c3..d0a1271949 100644 --- a/web/rootfs/defaults/meet.conf +++ b/web/rootfs/defaults/meet.conf @@ -60,7 +60,7 @@ location = /_api/room-info { {{ end }} # ensure all static content can always be found first -location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$ { +location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known|transcripts)/(.*)$ { add_header 'Access-Control-Allow-Origin' '{{ $CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN }}'; alias /usr/share/jitsi-meet/$1/$2; diff --git a/web/rootfs/defaults/nginx.conf b/web/rootfs/defaults/nginx.conf index 3e1cf9fa08..acfbbe5227 100644 --- a/web/rootfs/defaults/nginx.conf +++ b/web/rootfs/defaults/nginx.conf @@ -17,7 +17,7 @@ http { sendfile on; tcp_nopush on; tcp_nodelay on; - keepalive_timeout 65; + keepalive_timeout {{ .Env.NGINX_KEEPALIVE_TIMEOUT | default "65" }}; types_hash_max_size 2048; server_tokens off; diff --git a/web/rootfs/defaults/settings-config.js b/web/rootfs/defaults/settings-config.js index ff38be0912..dddca58a09 100644 --- a/web/rootfs/defaults/settings-config.js +++ b/web/rootfs/defaults/settings-config.js @@ -1,5 +1,7 @@ {{ $DEPLOYMENTINFO_USERREGION := .Env.DEPLOYMENTINFO_USERREGION | default "" -}} +{{ $ENABLE_ADAPTIVE_MODE := .Env.ENABLE_ADAPTIVE_MODE | default "true" | toBool -}} {{ $ENABLE_AUDIO_PROCESSING := .Env.ENABLE_AUDIO_PROCESSING | default "true" | toBool -}} +{{ $ENABLE_AUTOMATIC_GAIN_CONTROL := .Env.ENABLE_AUTOMATIC_GAIN_CONTROL | default "true" | toBool -}} {{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool -}} {{ $ENABLE_CALENDAR := .Env.ENABLE_CALENDAR | default "false" | toBool -}} {{ $ENABLE_FILE_RECORDING_SHARING := .Env.ENABLE_FILE_RECORDING_SHARING | default "false" | toBool -}} @@ -48,7 +50,7 @@ {{ $DESKTOP_SHARING_FRAMERATE_MIN := .Env.DESKTOP_SHARING_FRAMERATE_MIN | default 5 -}} {{ $DESKTOP_SHARING_FRAMERATE_MAX := .Env.DESKTOP_SHARING_FRAMERATE_MAX | default 5 -}} {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} -{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}} +{{ $XMPP_HIDDEN_DOMAIN := .Env.XMPP_HIDDEN_DOMAIN | default "hidden.meet.jitsi" -}} {{ $DISABLE_DEEP_LINKING := .Env.DISABLE_DEEP_LINKING | default "false" | toBool -}} {{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}} {{ $DISABLE_REACTIONS := .Env.DISABLE_REACTIONS | default "false" | toBool -}} @@ -63,7 +65,10 @@ {{ $DISABLE_PROFILE := .Env.DISABLE_PROFILE | default "false" | toBool -}} {{ $ROOM_PASSWORD_DIGITS := .Env.ROOM_PASSWORD_DIGITS | default "false" -}} {{ $WHITEBOARD_ENABLED := or (.Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL | default "" | toBool) (.Env.WHITEBOARD_COLLAB_SERVER_URL_BASE | default "" | toBool) }} -{{ $TESTING_AV1_SUPPORT := .Env.TESTING_AV1_SUPPORT | default "false" | toBool -}} +{{ $CODEC_ORDER_JVB := .Env.CODEC_ORDER_JVB | default "[\"AV1\", \"VP9\", \"VP8\", \"H264\"]" -}} +{{ $CODEC_ORDER_JVB_MOBILE := .Env.CODEC_ORDER_JVB_MOBILE | default "[\"VP8\", \"VP9\", \"H264\", \"AV1\"]" -}} +{{ $CODEC_ORDER_P2P := .Env.CODEC_ORDER_JVB | default "[\"AV1\", \"VP9\", \"VP8\", \"H264\"]" -}} +{{ $CODEC_ORDER_P2P_MOBILE := .Env.CODEC_ORDER_JVB_MOBILE | default "[\"VP8\", \"VP9\", \"H264\", \"AV1\"]" -}} // Video configuration. // @@ -104,6 +109,7 @@ config.desktopSharingFrameRate = { config.enableNoAudioDetection = {{ $ENABLE_NO_AUDIO_DETECTION }}; config.enableTalkWhileMuted = {{ $ENABLE_TALK_WHILE_MUTED }}; config.disableAP = {{ not $ENABLE_AUDIO_PROCESSING }}; +config.disableAGC = {{ not $ENABLE_AUTOMATIC_GAIN_CONTROL }}; config.audioQuality = { stereo: {{ $ENABLE_STEREO }} @@ -126,9 +132,15 @@ config.enableNoisyMicDetection = {{ $ENABLE_NOISY_MIC_DETECTION }}; // config.p2p = { - enabled: {{ $ENABLE_P2P }} + enabled: {{ $ENABLE_P2P }}, + codecPreferenceOrder: {{ $CODEC_ORDER_P2P }}, + mobileCodecPreferenceOrder: {{ $CODEC_ORDER_P2P_MOBILE }} }; +{{ if .Env.P2P_STUN_SERVERS -}} +config.p2p.stunServers = '{{ .Env.P2P_STUN_SERVERS }}'.split(',').map(url => ({ urls: 'stun:' + url })); + +{{ end -}} // Breakout Rooms // @@ -149,9 +161,12 @@ config.etherpad_base = '{{ $PUBLIC_URL }}/etherpad/p/'; // Recording. // -{{ if $ENABLE_RECORDING -}} +{{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}} + +config.hiddenDomain = '{{ $XMPP_HIDDEN_DOMAIN }}'; +{{ end -}} -config.hiddenDomain = '{{ $XMPP_RECORDER_DOMAIN }}'; +{{ if $ENABLE_RECORDING -}} config.recordingService = { // Whether to enable file recording or not using the "service" defined by the finalizer in Jibri @@ -224,11 +239,11 @@ config.analytics.matomoSiteID = '{{ .Env.MATOMO_SITE_ID }}'; {{ if .Env.ANALYTICS_SCRIPT_URLS -}} // Array of script URLs to load as lib-jitsi-meet "analytics handlers". -config.analytics.scriptURLs = [ '{{ join "','" (splitList "," .Env.ANALYTICS_SCRIPT_URLS) }}' ]; +config.analytics.scriptURLs = [ '{{ join "','" (splitList "," .Env.ANALYTICS_SCRIPT_URLS | compact) }}' ]; {{ end -}} {{ if .Env.ANALYTICS_WHITELISTED_EVENTS -}} -config.analytics.whiteListedEvents = [ '{{ join "','" (splitList "," .Env.ANALYTICS_WHITELISTED_EVENTS) }}' ]; +config.analytics.whiteListedEvents = [ '{{ join "','" (splitList "," .Env.ANALYTICS_WHITELISTED_EVENTS | compact) }}' ]; {{ end -}} @@ -296,7 +311,7 @@ config.prejoinConfig = { // List of buttons to hide from the extra join options dropdown on prejoin screen. {{ if .Env.HIDE_PREJOIN_EXTRA_BUTTONS -}} -config.prejoinConfig.hideExtraJoinButtons = [ '{{ join "','" (splitList "," .Env.HIDE_PREJOIN_EXTRA_BUTTONS) }}' ]; +config.prejoinConfig.hideExtraJoinButtons = [ '{{ join "','" (splitList "," .Env.HIDE_PREJOIN_EXTRA_BUTTONS | compact) }}' ]; {{ end -}} // Welcome page. @@ -403,6 +418,10 @@ config.p2p.preferredCodec = '{{ .Env.P2P_PREFERRED_CODEC }}'; // config.videoQuality = {}; +config.videoQuality.codecPreferenceOrder = {{ $CODEC_ORDER_JVB }}; +config.videoQuality.mobileCodecPreferenceOrder = {{ $CODEC_ORDER_JVB_MOBILE }}; +config.videoQuality.enableAdaptiveMode = {{ $ENABLE_ADAPTIVE_MODE }}; + {{ if .Env.VIDEOQUALITY_PREFERRED_CODEC -}} config.videoQuality.preferredCodec = '{{ .Env.VIDEOQUALITY_PREFERRED_CODEC }}'; {{ end -}} @@ -519,12 +538,12 @@ config.disablePolls = {{ $DISABLE_POLLS }}; // Configure toolbar buttons {{ if .Env.TOOLBAR_BUTTONS -}} -config.toolbarButtons = [ '{{ join "','" (splitList "," .Env.TOOLBAR_BUTTONS) }}' ]; +config.toolbarButtons = [ '{{ join "','" (splitList "," .Env.TOOLBAR_BUTTONS | compact) }}' ]; {{ end -}} // Hides the buttons at pre-join screen {{ if .Env.HIDE_PREMEETING_BUTTONS -}} -config.hiddenPremeetingButtons = [ '{{ join "','" (splitList "," .Env.HIDE_PREMEETING_BUTTONS) }}' ]; +config.hiddenPremeetingButtons = [ '{{ join "','" (splitList "," .Env.HIDE_PREMEETING_BUTTONS | compact) }}' ]; {{ end -}} // Configure remote participant video menu @@ -560,7 +579,57 @@ config.whiteboard = { {{ end -}} }; +// JaaS support: pre-configure image if JAAS_APP_ID was set. +{{ if .Env.JAAS_APP_ID -}} +{{ $JAAS_USE_STAGING := .Env.JAAS_USE_STAGING | default "false" | toBool -}} +{{ $JAAS_DOMAIN := $JAAS_USE_STAGING | ternary "stage.8x8.vc" "8x8.vc" -}} + +config.hosts.domain = '{{ $JAAS_DOMAIN }}'; +config.hosts.muc = 'conference.{{ .Env.JAAS_APP_ID }}.{{ $JAAS_DOMAIN }}'; +config.hosts.focus = 'focus.{{ $JAAS_DOMAIN }}'; + +config.analytics.rtcstatsEnabled = true; +config.analytics.rtcstatsStoreLogs = true; +config.analytics.rtcstatsUseLegacy = false; +config.analytics.rtcstatsEndpoint = 'wss://rtcstats-server-8x8.jitsi.net/'; +config.analytics.rtcstatsPollInterval = 10000; +config.analytics.rtcstatsSendSdp = true; + +config.bosh = 'https://{{ $JAAS_DOMAIN }}/{{ .Env.JAAS_APP_ID }}/http-bind'; +config.websocket = 'wss://{{ $JAAS_DOMAIN }}/{{ .Env.JAAS_APP_ID }}/xmpp-websocket'; +config.websocketKeepAliveUrl = 'https://{{ $JAAS_DOMAIN }}/{{ .Env.JAAS_APP_ID }}/_unlock'; +config.conferenceRequestUrl = 'https://{{ $JAAS_DOMAIN }}/{{ .Env.JAAS_APP_ID }}/conference-request/v1'; + +config.hiddenDomain = 'recorder.{{ $JAAS_DOMAIN }}'; +config.hiddenFromRecorderFeatureEnabled = true; +config.enableEmailInStats = true; + +config.jaasActuatorUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/jaas-actuator'; +config.jaasTokenUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/token-mapping'; +config.jaasConferenceCreatorUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/vmms-conference-mapper/v1/access/conference-creator'; +config.webhookProxyUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/webhook-proxy'; +config.billingCounterUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/billing-counter/v1/connection'; +config.brandingDataUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/branding/public/v1/conferences'; +config.dialInNumbersUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/vmms-conference-mapper/access/v1/dids'; +config.dialInConfCodeUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/vmms-conference-mapper/v1/access'; +config.dialOutAuthUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/phone-authorize'; +config.dialOutRegionUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/customer-configs/v1/outbound-destination'; +config.peopleSearchUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/v1/directory/search'; +config.inviteServiceUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/v1/meeting/invite'; +config.recordingSharingUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/jaas-recordings/link'; +config.peopleSearchQueryTypes = ['user','conferenceRooms']; +config.sipInviteUrl = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/sip-jibri-gateway/jibris/invite'; +config.jaasFeedbackMetadataURL = 'https://{{ $JAAS_DOMAIN }}/v1/_jaas/webhook-proxy/feedback'; + +{{ if $JAAS_USE_STAGING -}} +config.whiteboard.collabServerBaseUrl = 'https://eght-excalidraw-backend-pilot.cloudflare.jitsi.net'; +{{ else -}} +config.whiteboard.collabServerBaseUrl = 'https://eght-excalidraw-backend.cloudflare.jitsi.net'; +{{ end -}} +config.whiteboard.userLimit = 25; +{{ end -}} + // Testing config.testing = { - enableAv1Support: {{ $TESTING_AV1_SUPPORT }} + enableCodecSelectionAPI: true }; diff --git a/web/rootfs/defaults/system-config.js b/web/rootfs/defaults/system-config.js index 1a0bff8c97..04ac8f20c9 100644 --- a/web/rootfs/defaults/system-config.js +++ b/web/rootfs/defaults/system-config.js @@ -1,3 +1,4 @@ +{{ $CONFIG_PREFIX := .Env.WEB_CONFIG_PREFIX | default "// Jitsi Meet configuration.\n" -}} {{ $BOSH_RELATIVE := .Env.BOSH_RELATIVE | default "false" | toBool -}} {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "false" | toBool -}} {{ $ENABLE_AUTH_DOMAIN := .Env.ENABLE_AUTH_DOMAIN | default "true" | toBool -}} @@ -12,13 +13,11 @@ {{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 -}} {{ $JVB_PREFER_SCTP := .Env.JVB_PREFER_SCTP | default "1" | toBool -}} -// Jitsi Meet configuration. +{{ join "\n" (splitList "\\n" $CONFIG_PREFIX) }} var config = {}; config.hosts = {}; - config.hosts.domain = '{{ $XMPP_DOMAIN }}'; -config.focusUserJid = 'focus@{{$XMPP_AUTH_DOMAIN}}'; {{ if $ENABLE_SUBDOMAINS -}} var subdir = ''; diff --git a/web/rootfs/etc/cont-init.d/10-config b/web/rootfs/etc/cont-init.d/10-config index 318dfa750d..4a025121cb 100644 --- a/web/rootfs/etc/cont-init.d/10-config +++ b/web/rootfs/etc/cont-init.d/10-config @@ -107,6 +107,9 @@ if [ -z "$COLIBRI_WEBSOCKET_REGEX" ]; then fi fi +# maintain backward compatibility with older variable +[ -z "${XMPP_HIDDEN_DOMAIN}" ] && export XMPP_HIDDEN_DOMAIN="$XMPP_RECORDER_DOMAIN" + # copy config files tpl /defaults/nginx.conf > /config/nginx/nginx.conf