GithubHelp home page GithubHelp logo

check_jitsi's Introduction

check_jitsi

Icinga check command for jitsi video conference server

Setup

Requirements

This check command depends on Python 3 and the following modules:

  • enum
  • requests
  • argparse

Installation on Debian / Ubuntu

apt install python3 python3-requests

Installation on Redhat 7 / CentOS 7

yum install python36 python36-requests

Installation on FreeBSD

pkg install python3 py37-requests

Activate private rest API on jitsi videobridge

Enable rest api in jitsi videobridge by appending --apis=rest to the JVB_OPTS in /etc/jitsi/videobridge/config:

[...]
JVB_OPTS="--apis=rest,xmpp"
[...]

Edit /etc/jitsi/videobridge/sip-communicator.properties and enable statistics:

[...]
org.jitsi.videobridge.ENABLE_STATISTICS=true
[...]

Restart the jvb and jicofo service

Troubleshooting

If using openjdk and you see lots of errors in your videobridge logs, try to enable jdk.management/com.sun.management, by editing /etc/jitsi/videobridge/config:

before:

JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=videobridge -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi -Djava.util.logging.config.file=/etc/jitsi/videobridge/logging.properties"

after:

JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=videobridge -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi -Djava.util.logging.config.file=/etc/jitsi/videobridge/logging.properties --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED"

More more details see here jitsi/jitsi-videobridge#1127 (comment).

Usage

usage: check_jitsi.py [-h] [-H HOSTNAME] [-p PORT] -m
                      {health,participants,conferences,audiochannels,videochannels,videostreams,total_conferences_completed,total_conferences_created,total_conferences_failed,total_partially_failed_conferences,jitter_aggregate,total_no_payload_channels,total_no_transport_channels}
                      [-w THRESHOLD] [-c THRESHOLD] [--user USER]
                      [--password PASSWORD] [--ignore-metric METRIC]
                      [--append-metric METRIC]
                      
Check command for JVB via API

optional arguments:
  -h, --help            show this help message and exit
  -H HOSTNAME, --hostname HOSTNAME
                        JVB private api hostname
  -p PORT, --port PORT  JVB private api port
  -m {health,participants,conferences,audiochannels,videochannels,videostreams,total_conferences_completed,total_conferences_created,total_conferences_failed,total_partially_failed_conferences,jitter_aggregate,total_no_payload_channels,total_no_transport_channels}, --mode {health,participants,conferences,audiochannels,videochannels,videostreams,total_conferences_completed,total_conferences_created,total_conferences_failed,total_partially_failed_conferences,jitter_aggregate,total_no_payload_channels,total_no_transport_channels}
                        Check mode
  -w THRESHOLD, --warning THRESHOLD
                        Warning threshold for check value
  -c THRESHOLD, --critical THRESHOLD
                        Critical threshold for check value
  --user USER           HTTP Basic Auth User
  --password PASSWORD   HTTP Basic Auth Password
  --all-metrics
  --ignore-metric METRIC
                        Ignore this metric in the performance data
  --append-metric METRIC
                        Append this metric in the performance data

Examples

Check jitsi health

./check_jitsi.py -m health
OK - Jitsi videobridge is healthy 

with all metrics:

./check_jitsi.py -m health --all-metrics 
OK - Jitsi videobridge is healthy |packet_rate_download=0 total_tcp_connections=0 total_packets_sent_octo=0 total_loss_degraded_participant_seconds=0 bit_rate_download=0 videostreams=0 jitter_aggregate=0.0 total_channels=8 total_memory=16821 total_packets_received=13694 rtt_aggregate=0.0 packet_rate_upload=0 conferences=0 participants=0 total_loss_limited_participant_seconds=0 largest_conference=0 total_packets_sent=3030 total_data_channel_messages_sent=609 total_bytes_received_octo=0 total_no_transport_channels=0 total_no_payload_channels=4 used_memory=1518 total_conferences_created=2 threads=82 total_colibri_web_socket_messages_received=0 videochannels=0 total_udp_connections=4 loss_rate_upload=0.0 total_packets_received_octo=0 graceful_shutdown=0 total_colibri_web_socket_messages_sent=0 total_bytes_sent_octo=0 total_data_channel_messages_received=633 loss_rate_download=0.0 total_conference_seconds=802 total_bytes_received=9662349 rtp_loss=0.0 total_loss_controlled_participant_seconds=0 total_partially_failed_conferences=2 bit_rate_upload=0 total_conferences_completed=2 total_bytes_sent=99326 total_failed_conferences=0 cpu_usage=0.005 audiochannels=0

Check specific metric

It's possible to check if a certain metric is within the specified thresholds for warning and critical (full syntax supported):

./check_jitsi.py -m total_conferences_failed -w 5 -c 10
OK - 0 total_conferences_failed |total_conferences_failed=0;;5;10

Other metrics could also be exported within the performance data:

./check_jitsi.py -m total_conferences_failed -w 5 -c 10 --append-metrics conferences
OK - 0 total_conferences_failed |total_conferences_failed=0;;5;10 conferences=2

Integration in Icinga2

Example configuration files for Icinga2 are in the folder icinga/.

check_jitsi's People

Contributors

nbuchwitz avatar ozzi- avatar pfromme25 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

check_jitsi's Issues

Remote connecting

Hi and kudos on the plugin!
While running it from the local jitsi server the plugin works as it should, but when calling it from the monitoring server (or any other server as a script) I get the following error:

./check_jitsi.py -H domainname.local -p 5347 -m health
UNKNOWN - Could not connect to JVB API: Failed to resolve hostname or service is not listenings

I have checked the port to be open from any by modifying the prosody.conf.lua file and adding 0.0.0.0 for this port. is there any other port or configuration to be made to allow it to connect?

Also when trying _telnet domainname.local 5347 I get connected.

Videobridge needs to bind not just on localhost

# netstat -tapn | grep 8080
tcp6       0      0 127.0.0.1:8080                 :::*                    LISTEN      8262/java

org.jitsi.videobridge.rest.private.jetty.host=::in /etc/jitsi/videobridge/sip-communicator.properties is needed to not just bind to 127.0.0.1.

Now you are able to connect remote:

# netstat -tapn | grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN      8338/java

Performace data not correct

Hi
The Plugin output looks like this:

  ./check_jitsi.py -H jitsi1.nts.ch  -m conferences -w 10 -c 30
  OK - 0 conferences |conferences=0;;10;30

Accoring to the icinga performance scheme, it should look like this:

  ./check_jitsi.py -H jitsi1.nts.ch  -m conferences -w 10 -c 30
  OK - 0 conferences |conferences=10;39;0;

See: https://icinga.com/docs/icinga1/latest/en/perfdata.html
'label'=value[UOM];[warn];[crit];[min];[max]

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.