Giter VIP home page Giter VIP logo

bbbstats's Introduction

BigBlueButtonStatistics for Zabbix

bbbstats provides some basic usage statistics of a BigBlueButton installation.

Installation

The script can but has not to be run on the same host as the bbb installation.

Prerequisites

Software dependencies

bbbstats requires python >= 3.2 and the python module requests.

Ubuntu, Debian
apt install python3-requests
Fedora
dnf install python3-requests
Arch
pacman -S python-requests

API secret

To obtain an api secret log into to your bbb server and run the following command on the cli:

bbb-conf --secret

Beside the secret it will also tell you the URL of your API. For more details please see the BigBlueButton API documentation.

Installing bbbstats

Copy bbbstats.py to the desired location. /usr/bin/bbbstats.py might be a good choice.

sudo cp bbbstats.py /usr/bin/bbbstats.py

Set the permissions for bbbstats.py that it can be executed by zabbix.

sudo chown zabbix /usr/bin/bbbstats.py
sudo chmod u+x /usr/bin/bbbstats.py

Make a copy of config.example.json and move it to /etc/bbbstats/config.json or <zabbix_user_home>/.config/bbbstats/config.json. You first have to create the directory.

sudo mkdir /etc/bbbstats
sudo cp config.example.json /etc/bbbstats/config.json

Paste the secret you obtained in an earlier step into the config file and set the URL of the API.

ApiUrl

The base URL of your BigBlueButton installation.

ApiSecret

The secret you obtained in an earlier step.

Ensure that the config file is only readable by the zabbix user as it holds your API secret.

sudo chown -R zabbix /etc/bbbstats
sudo chmod 400 /etc/bbbstats/config.json
sudo chmod 500 /etc/bbbstats/

Copy bbbstats.conf to /etc/zabbix/zabbix_agentd.d/bbbstats.conf and assign the proper permissions. The file needs to be readable by the zabbix processes.

sudo cp bbbstats.conf /etc/zabbix/zabbix_agentd.d/bbbstats.conf
sudo chown zabbix /etc/zabbix_agentd.d/bbbstats.confd
sudo chmod u+r /etc/zabbix_agentd.d/bbbstats.conf

Try it

To verify everything works as expected run the following command from your cli:

sudo -u zabbix /usr/bin/bbbstats.py

It should return something like this:

There are 0 users (0 unique) online in 0 meetings in 0 regular rooms and 0 breakout rooms.

Alternatively you can try the json output, which is used by the items in the zabbix template:

sudo -u zabbix /usr/bin/bbbstats.py --json

And this one should return:

{"unique_users": 0, "breakout_rooms": 0, "regular_rooms": 0, "total_rooms": 0, "total_users": 0}
Note
The order of the fields might be different on each call of the script.

Zabbix integration

Head to your Zabbix frontend and go to Configuration โ†’ Templates and import the zbx_bbbstats_template.xml with the default settings.

Than select the host on which you just installed the scripts and apply the template Template App BigBlueButton Statistics to it. After a couple of minutes the first values should be visible in Latest data.

bbbstats's People

Contributors

jfqd avatar mikafinja avatar

Watchers

 avatar

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.