Coder Social home page Coder Social logo

jitsi-prom-exporter's Introduction

Jitsi Prometheus exporter

Exporter that grabs various metrics from Jitsi, especially form the video bridges, and publishes them as Prometheus metrics. The basic idea is to enter the jvbbrewery MUC room and listen to the presence broadcasts from the JVBs.

There is a documentation of the published statistics by the video bridges.

Run

There are multiple ways to run the exporter. Once it is running, it will publish the collected metrics on :8080/metrics.

Register user in prosody

You will have to create a XMPP user in Prosody, do this with:

prosodyctl --config <abs path to jitsi-meet.cfg.lua> register <user> <auth-domain> <password>

Binary

Clone this repo into your $GOPATH/src/ directory. In the exporter directroy run go get ./... which creates the exporter binary in $GOPTAH/bin/. You can run this binary, it will still pull its configuration (see below) from the environment.

Docker container

There is an image available on docker hub karrieretutor/jitsi:prom-exporter-latest. Alternatively build it yourself with the provided dockerfile. The configuration is provided via environment (see below). By running it as a docker container you gain the advantage of choosing the port which is used for publishing the metrics, see docker cli reference.

env configuration

env description default value
XMPP_USER xmpp user for authentication
XMPP_PW xmpp password for authentication
XMPP_AUTH_DOMAIN xmpp domain to authenticate against
XMPP_SERVER xmpp server host name
XMPP_PORT xmpp port to use 5222
JVB_BREWERY_MUC name of jvbbrewery MUC room to join; it will join with prom-exporter as nickname -> JVB_BREWERY_MUC@INTERNAL_MUC_DOMAIN/prom-exporter jvbbrewery
XMPP_INTERNAL_MUC_DOMAIN internal muc domain (this is where the jvbbrewery muc resides)
JVB_METRIC_SUBSYSTEM Allows you to customize the metric names: [<subsystem>_][<namespace>_]metricname; both are optional
JVB_METRIC_NAMESPACE see JVB_METRIC_SUBSYSTEM

XMPP_USER and XMPP_AUTH_DOMAIN are used to construct the JID XMPP_USER@XMPP_AUTH_DOMAIN

jitsi-prom-exporter's People

Contributors

kroev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jitsi-prom-exporter's Issues

Usage

How am I supposed to get the metrics to Prometheus?

JVB instance should be recognized by MUC_NICKNAME instead of USERNAME

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

Unable to compile

Hello! I'm trying to compile jitsi-prom-exporter using your README but without any success.

go version go1.13.4 linux/amd64

Error:

# exporter
./main.go:150:3: cannot use promoted field TransportConfiguration.Address in struct literal of type xmpp.Config
./main.go:152:3: unknown field 'Password' in struct literal of type xmpp.Config
./main.go:155:3: cannot use promoted field TransportConfiguration.TLSConfig in struct literal of type xmpp.Config

Cannot access web metrics

I was able to connect to prometheus ass a target but icannot acess the web ui of the metrics through port 8080

Problem Building

Hi,

got stuck with this Message:

root@jitsi:/usr/local/go/src/jitsi-prom-exporter/exporter# go get ./...
go: jitsi-prom-exporter/exporter imports
        github.com/FluuxIO/go-xmpp: github.com/FluuxIO/[email protected]: parsing go.mod:
        module declares its path as: gosrc.io/xmpp
                but was required as: github.com/FluuxIO/go-xmpp

Hope you can help.

Compiling issue: nhooyr.io/websocket

Hi,

have this issue when trying to compile:

sacha@echo:~/go/src/jitsi-prom-exporter/exporter$ go get ./...
\# nhooyr.io/websocket
../../nhooyr.io/websocket/close.go:72:5: undefined: errors.As
../../nhooyr.io/websocket/dial.go:152:12: undefined: http.NewRequestWithContext
../../nhooyr.io/websocket/dial.go:153:30: opts.HTTPHeader.Clone undefined (type http.Header has no field or method Clone)
../../nhooyr.io/websocket/read.go:377:5: undefined: errors.Is

Missing Metrics

Hi,

i installed and running exporter but seen i don't have all metrics
Perhaps i missed something

Can you say me what missing ?

thanks
metrics.txt

Dead project?

Ok guys, there are some pull requests waiting to be merged, with no reponse from author. These PR are crucial to even build this thing. I'll leave my PR's be, so anyone can at least see, how outdated it is.

We are using jitsi-prometheus-exporter in my company, so i'll support it as long as possible in my forked repository
https://github.com/nosmicek/jitsi-prom-exporter, i already updated to latest metrics available and removed those that are no longer available.

You are all welcome to report isuess or even propose new features there.

unable to connect with jitsi xmpp server

when i try to run the docker image, i get the following error and unable to connect to an XMPP server that is running on localhost ( non-docker version).
Could you pl. help to resolve the issue ?

docker run --env-file a.txt -p 8050:8050 karrieretutor/jitsi:prom-exporter-latest
starting streammanger
Could not connect to server 127.0.0.1:5222: dial tcp 127.0.0.1:5222: connect: connection refused
exiting

Could not connect to XMPP_SERVER: dial tcp: i/o timeout

Hi everyone,
I deployed Jitsi on my Kubernetes cluster.
Jicofo - Prosody - Web containers are deployed in same pod (supposed as jitsi-server pod), and jvb container is in another pod.
I used a Service (name: prosody) to expose jitsi-server pod, so XMPP_SERVER in my case is prosody."namespace".svc.cluster.local
I deployed jitsi-prom-exporter in another pod and connect to XMPP_SERVER (prosody."namespace".svc.cluster.local).
It is succeded to connect but few minutes later, I received an error:
Could not connect to server prosody.jitsi.svc.cluster.local:5222: dial tcp: i/o timeout

It is disconnected and reconnected multiple times.

Anyone have the same issue? and is there a solution for this?

Thanks in advance for your response and sorry for my english grammar.

Metrics are missing

Hi,
It seems that there are some metrics missing from what I can compare with your output. Am I missing any variable to make it working?

docker run -d -p 8080:8080 -e XMPP_USER=prometheus-user -e XMPP_PW=4asdfMasdfow -e XMPP_AUTH_DOMAIN=auth.meet.domain.com -e XMPP_SERVER=10.12.3.241 -e XMPP_INTERNAL_MUC_DOMAIN=conference.meet.domain.com karrieretutor/jitsi:prom-exporter-latest
xemacs@alatxa:~$ curl http://meet.domain.com:8080/metrics
# HELP conference_sizes_combined All active conference_sizes summed up into this histogram, see conference_sizes
# TYPE conference_sizes_combined histogram
conference_sizes_combined_bucket{le="+Inf"} 0
conference_sizes_combined_sum 0
conference_sizes_combined_count 0
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 1.1239e-05
go_gc_duration_seconds{quantile="0.25"} 1.5906e-05
go_gc_duration_seconds{quantile="0.5"} 8.882e-05
go_gc_duration_seconds{quantile="0.75"} 0.000156942
go_gc_duration_seconds{quantile="1"} 0.000307765
go_gc_duration_seconds_sum 0.001352204
go_gc_duration_seconds_count 14
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 15
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.12.9"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 3.757032e+06
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 5.1071328e+07
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 1.447803e+06
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 89628
# HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started.
# TYPE go_memstats_gc_cpu_fraction gauge
go_memstats_gc_cpu_fraction 9.703317406112299e-06
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 2.377728e+06
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 3.757032e+06
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 6.1612032e+07
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 4.808704e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 5839
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.
# TYPE go_memstats_heap_released_bytes gauge
go_memstats_heap_released_bytes 0
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 6.6420736e+07
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 1.5846329184590359e+09
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
go_memstats_lookups_total 0
# HELP go_memstats_mallocs_total Total number of mallocs.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 95467
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 6944
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 16384
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 34560
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 81920
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 4.194304e+06
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 1.253757e+06
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 688128
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 688128
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 7.2286456e+07
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 13
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.44
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1.048576e+06
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 9
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 1.462272e+07
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.5846325655e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 1.17485568e+08
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes -1
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 76
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.