Giter Club home page Giter Club logo

bigbluebutton-monitoring's Introduction

BigBlueButton Monitoring Web App

Super simple monitoring web app for BigBlueButton that will display a list of all current meetings on your BigBlueButton server.

Docker Image Version (latest semver) Docker Pulls GitHub

Required ENV variables:

  • API_BASE_URL
  • API_SECRET

HTTP server will listen on port: 5000

Docker Hub: https://hub.docker.com/r/greenstatic/bigbluebutton-monitoring


See BigBlueButton-exporter to integrate BigBlueButton metrics into Prometheus and display them in Grafana.

Demo Screenshot

demo-screenshot

Installation

We assume you have docker installed and configured, as well as nginx.

Using docker-compose

Make sure you have docker-compose installed.

  1. On your BigBlueButton server
    mkdir ~/bbb-monitor
  2. Create the file ~/bbb-monitor/docker-compose.yaml and copy the contents of docker-compose.yaml from this repository.
  3. Edit ~/bbb-monitor/docker-compose.yaml and replace the required fields
  4. Create the file ~/bbb-monitor/secrets.env and place your API_SECRET in it. It should look something like this:
    API_SECRET=<TODO: YOUR API SECRET KEY>
    
  5. cd into ~/bbb-monitor and run sudo docker-compose up -d.
    • If you wish a specific version of the docker container run instead:
    sudo BBB_MONITORING_VERSION=<YOUR DESIRED DOCKER IMAGE VERSION> docker-compose up -d

Alternative Installation Without docker-compose

# Example of API BASE URL: https://bbb.example.com/bigbluebutton/api/
# API SECRET KEY can be found by SSH into BBB and running: `$ bbb-conf --secret`
docker run --name bbb-monitoring -d -p 127.0.0.1:4000:5000 --env API_SECRET=<API SECRET KEY> --env API_BASE_URL=<API BASE URL> greenstatic/bigbluebutton-monitoring


# If you wish to configure HTTP Basic Auth
sudo apt-get install apache2-utils
sudo htpasswd -c /etc/nginx/.htpasswd admin  # user: admin
# then enter password

Nginx (Common for Both Installation Methods)

Then you can proxy to the bbb-monitoring container running on port 4000 (localhost only). Example nginx config with HTTP basic auth:

# BigBlueButton Monitoring
        location /_monitoring/ {
           auth_basic "BigBlueButton Monitoring";
           auth_basic_user_file /etc/nginx/.htpasswd;
           proxy_pass         http://127.0.0.1:4000/;
           proxy_redirect     default;
           proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
           client_max_body_size       10m;
           client_body_buffer_size    128k;
           proxy_connect_timeout      90;
           proxy_send_timeout         90;
           proxy_read_timeout         90;
           proxy_buffer_size          4k;
           proxy_buffers              4 32k;
           proxy_busy_buffers_size    64k;
           proxy_temp_file_write_size 64k;
           include    fastcgi_params;
        }

Environment Variables

  • API_BASE_URL
  • API_SECRET
  • DEBUG: - Verbose logging, useful when debugging
    • Values: true/false

Development

# Do not forget to install requirements.txt and have the required ENV variables set!
python3 bbb-mon/server.py

On master push, a build job will automatically build a Docker image on Docker Hub (link to Docker Hub repoistory is above).

bigbluebutton-monitoring's People

Contributors

dependabot[bot] avatar greenstatic avatar hufschmidt 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bigbluebutton-monitoring's Issues

Error 500 'NoneType' object is not subscriptable

Hi,

Thanks for this simple monitoring app :)

With a very simple BBB instance (no Moodle integration) I get 500 errors that seem related to #1

ERROR in app: Exception on /api/meetings [GET]
Traceback (most recent call last):
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "bbb-mon/server.py", line 26, in api_meetings
    return jsonify(views.get_meetings())
  File "/home/bbbmon/bigbluebutton-monitoring/bbb-mon/views.py", line 53, in get_meetings
    origin_server = meeting['metadata']['bbb-origin-server-name']
TypeError: 'NoneType' object is not subscriptable

and the second one once I "fixed" the first one:

ERROR:server:Exception on /api/meetings [GET]
Traceback (most recent call last):
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/bbbmon/venv3/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "bbb-mon/server.py", line 26, in api_meetings
    return jsonify(views.get_meetings())
  File "/home/bbbmon/bigbluebutton-monitoring/bbb-mon/views.py", line 72, in get_meetings
    m['metadata']['origin-context'] = _bbb_context_convert_moodle(meeting['metadata']['bbb-context'])
TypeError: 'NoneType' object is not subscriptable

It seems that meeting['metadata'] is None in my case. As a hack I set it to an empty dict instead and the 500 errors went away.

500 Internal server error

Followed the instructions, page loads, but spins, console shows

jquery-3.4.1.min.js:2 GET http://195.47.197.49/_monitoring/api/meetings 500 (INTERNAL SERVER ERROR)

Are there any logs available?
Any extra ports that needs to be open?

Could be a problem with line:
HTTP server will listen on port: 5000
What exactly does that mean?

image

using bbb-monitoring with scalelite

hi @greenstatic ,
i have istalled scalelite using docker , article referred : https://medium.com/@jesusfederico_39370/scalelite-lazy-deployment-745a7be849f6

i then installed this tool , but iam not able to configure the nginx .
i have the following containers running refer : https://prnt.sc/xczjyk
i bashed into the nginx container and tired adding the bbb-monitor nginx code. but it gives me the following error
https://prnt.sc/xczs0o

any idea on how to fix this.

thanks.

scalelite

Hi,

Did you try on scalelite ? Is it not compatible ?

Regards,

Plans for integration with scalelite?

Hey,
nice work to get an overview for a single bbb instance.
Are there any plans for an integration with scalelite to support multiple bbb instances?

Ububntu 18.04 - Port 4000 already in use

Hi,

i installed the new bbb v2.3 on a fresh installed Ubuntu 18.04. When I try to setup your realy nice monitoring docker, i get a error message, that the port 4000 is already in use:

netstat -ae | grep 4000
tcp 0 0 localhost:4000 0.0.0.0:* LISTEN meteor 27453

I think, meteor use also port 4000: https://www.meteor.com/

I changed the Port from 4000 to 4002, and all works fine for me.

Cheers, Marco

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.