This is a Gitlab for NZOSS Members

Unverified Commit da5026fd authored by Tim McNamara's avatar Tim McNamara
Browse files

Add setup process and meeting polling to version control

\ No newline at end of file
user := env_var_or_default("BBB_USER", "ubuntu")
host := env_var_or_default("BBB_HOST", "")
remote_path := env_var_or_default("REMOTE_PATH", "/home/" + user + "/meetings-monitoring")
exe := "ssh " + user + "@" + host
# lists the files at REMOTE_PATH (for testing)
{{exe}} ls {{remote_path}}
rsync -av {{user}}@{{host}}:{{remote_path}} .
\ No newline at end of file
# meeting-monitoring
This repository contains scripts and other resources for
monitoring NZOSS's BigBlueButton instance at
In particular, it builds a dashboard that monitors usage.
Yes we could use grafana and Prometheus, but this is more fun.
# Setup
You need an Ubuntu system running. The fastest way to get one
is by installing [multipass][].
Install all necessary dependencies via ``
$ chmod +x
Note: if something goes wrong, please set the DEBUG variable and run the script again. See the **Contact** section for where to send this output to for help:
$ DEBUG=yes ./
# Project Structure
## Justfile
We use [`just`][] as a task runner.
## Makefile
The Makefile is used exclusively for building things.
We use GNU `make`, although we don't make heavy use of extensions,
so any POSIX-compatible makefile should work.
# Admin
## Licence
All rights reserved.
(This will change shortly)
## Contact
The preferred method is the [#technical][] channel within
## Maintainers
- Tim McNamara <>
\ No newline at end of file
# contact Tim (@tim.m in
set -e
set -x
save_to=Raw/bbb-active-meetings-$(date -I).xml
shared_secret=$(bbb-conf --secret | grep Secret: | cut -d':' -f2 | sed s/[[:space:]]//g)
# calculate checksum as a SHA1 of endpoint, params (none for this call) and the shared secret
checksum=$(python3 -c "import hashlib; print(hashlib.sha1(b'getMeetings$shared_secret').digest().hex())")
# download and clean
response=$(curl "$checksum" | tr '\n' ' ')
# sidenote: let's hope no usernames or room names contain newline characters
# add a timestamp
content="<poll><time>$(date -Is)</time>$response</poll>"
echo $content >> "$save_to"
# debugging aid
echo content
set -e # abort early if there's an error with the script
if [ -n "$DEBUG" ]; then
set -x # trace execution output
lsb_release -d
uname -a
# TODO: factor the command checking into its own function
install-curl() {
local cmd=$( command -v curl )
if [ -n "$cmd" ]; then
return 0
sudo apt install -y curl
install-make() {
local cmd=$( command -v make )
if [ -n "$cmd" ]; then
return 0
sudo apt install -yq make
install-ssh() {
local cmd=$( command -v ssh )
if [ -n "$cmd" ]; then
return 0
sudo apt install -y ssh
install-rsync() {
local cmd=$( command -v rsync )
if [ -n "$cmd" ]; then
return 0
sudo apt install -y rsync
install-gnuplot() {
# TODO: check minimum required version
local cmd=$( command -v gnuplot )
if [ -n "$cmd" ]; then
return 0
sudo apt install -y gnuplot
install-rust() {
local cmd=$( command -v rustc )
if [ -n "$cmd" ]; then
return 0
curl --proto '=https' --tlsv1.2 -sSf > /tmp/
sudo chmod +x /tmp/
/tmp/ --profile minimal -y
rm /tmp/
install-just() {
cargo install -q just
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment