Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVB instance should be recognized by MUC_NICKNAME instead of USERNAME #10

Open
slykar opened this issue Apr 1, 2020 · 2 comments
Open

Comments

@slykar
Copy link

slykar commented Apr 1, 2020

To make the configuration of JVB auto-scaling easier, you can reuse the same username and password for JVB to enter the MUC room. This is even suggested by the maintainers on the Jitsi forums. The thing that needs to be unique is the MUC_NICKNAME.

Right now the exporter identifies instances by the USERNAME, which in my case is always jvb.
It would be great if the instance was recognized by the MUC_NICKNAME instead, which in my case is the machine hostname assigned by AWS, e.g. ip-10-0-0-78.

Note: I'm running jitsi-videobridge2

@MiningPickaxe
Copy link

Yup, with the current setup the output switches between the two bridges, depending on which bridge just published its information. This is currently a deal breaker for multi-jvb jitsi meet installations

@chaosbiber
Copy link

There are different methods to integrate other videobridge instances, but yes, I had the same problem. Quick hack:

diff --git a/exporter/main.go b/exporter/main.go
index f2c5287..0b6030c 100644
--- a/exporter/main.go
+++ b/exporter/main.go
@@ -216,7 +216,7 @@ func handlePresence(s xmpp.Sender, p stanza.Packet) {
        }

        if presence.Get(&Stats{}) && presence.Get(&User{}) {
-               var jvbJid string
+               // var jvbJid string
                var stats *Stats

                //check extensions
@@ -224,15 +224,15 @@ func handlePresence(s xmpp.Sender, p stanza.Packet) {
                        switch extension := e.(type) {
                        case *Stats:
                                stats = extension
-                       case *User:
+                               /*case *User:
                                for _, i := range extension.Items {
                                        jvbJid = i.Jid
-                               }
+                               }*/
                        }
                }

                //we want to keep track of jvbs across their reconnects of autoscaled sets
-               jvbCollector.Update(strings.Split(jvbJid, "@")[0], stats)
+               jvbCollector.Update(strings.Split(presence.From, "/")[1], stats)
        }
 }

nosmicek pushed a commit to nosmicek/jitsi-prom-exporter that referenced this issue Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants