diff --git a/README.md b/README.md index ad4899d..3220f94 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ Role Variables | jitsi_public_url | The public URL under which Jitsi Meet can be accessed | http://localhost | | jitsi_timezone | | Europe/Amsterdam | | jitsi_virtual_host | The virtual host that is e.g. used by Traefik, usually part of the public url | localhost | +| jitsi_expose_metrics | Determine whether an additional expoerter for the Jitsi metrics shall be run | False | \* It is important to provide a dedicated secure password for each service. Generate passwords with e.g. `openssl rand -hex 16` diff --git a/defaults/main.yml b/defaults/main.yml index 62eab06..1df8945 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -18,5 +18,6 @@ jitsi_timezone: Europe/Amsterdam jitsi_jvb_stun_servers: meet-jit-si-turnrelay.jitsi.net:443 jitsi_web_channel_last_n: 3 jitsi_enable_third_party_requests: no +jitsi_expose_metrics: False # Internal variables jitsi_multitenant_postfix: "{{ '_' + jitsi_multitenant_label if (jitsi_multitenant_label) else '' }}" \ No newline at end of file diff --git a/src b/src index eae3f5c..9b686c6 160000 --- a/src +++ b/src @@ -1 +1 @@ -Subproject commit eae3f5ce2d7627afe4115f52a61cc7ae3e3e8a31 +Subproject commit 9b686c6f4aa74cd33ddcd4dd35decc76a9470e1e diff --git a/tasks/main.yml b/tasks/main.yml index fc79769..1912265 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -62,6 +62,16 @@ mode: '0640' tags: config +- name: Provide metric exporter environment + template: + src: templates/exporter.env.j2 + dest: "{{ jitsi_install_path }}/jitsi/exporter.env" + owner: "{{ jitsi_install_user }}" + group: "{{ jitsi_install_user }}" + mode: '0640' + tags: config + when: jitsi_expose_metrics + - name: "docker-compose: Teardown existing Jitsi service" docker_compose: project_src: "{{ jitsi_install_path }}/jitsi/" diff --git a/templates/docker-compose.jitsi.yml.j2 b/templates/docker-compose.jitsi.yml.j2 index 21b622e..5e6b8a0 100644 --- a/templates/docker-compose.jitsi.yml.j2 +++ b/templates/docker-compose.jitsi.yml.j2 @@ -179,6 +179,20 @@ services: networks: meet.jitsi: + {% if jitsi_expose_metrics %} + # Data exporter + exporter: + image: goberle/jitsi-prom-exporter + restart: unless-stopped + env_file: exporter.env + depends_on: + - jicofo + networks: + # Expose the data exporter to the public network managed by traefik + public: + meet.jitsi: + {% endif %} + # Custom network so all services can communicate using a FQDN networks: meet.jitsi: diff --git a/templates/exporter.env.j2 b/templates/exporter.env.j2 new file mode 100644 index 0000000..fdc04ff --- /dev/null +++ b/templates/exporter.env.j2 @@ -0,0 +1,6 @@ +XMPP_USER={{ jitsi_jicofo_auth_user }} +XMPP_PW={{ jitsi_jicofo_auth_password }} +XMPP_SERVER=xmpp.meet.jitsi +XMPP_PORT=5222 +XMPP_AUTH_DOMAIN=auth.meet.jitsi +XMPP_INTERNAL_MUC_DOMAIN=internal-muc.meet.jitsi \ No newline at end of file