Just run `bbbmon` and it will tell you what it needs.
Run `bbbmon config --new` to create a new default configuration file. bbbmon will always ask you before it creates or overwrites anything.
You can define one or more endpoints in the `bbbmon.properties` file at the path bbbmon tells you about. In this file you can specify multiple bbb servers each with it's secret and bigbluebutton-URL. You can find the secret on your server in it's config-file via `cat /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties | grep securitySalt=`
Within the config you can define one or more endpoints with running bbb instances – each with it's secret and bigbluebutton-URL. You can find the secret on your server in it's config-file via
The section names in the square brackets will be used as display names (these support utf-8)
The section names in the square brackets can be chosen arbitrarily (as long as they are unique) and will be used as display names (they support utf-8). It makes sense to keep them short as they can be used for filtering and/or ordering:
Read the config either from the servers bigbluebutton.properties-file or from
the user config path. Display a message if neither of these files exist.
"""
# Get OS dependend properties file
user_config_path=get_user_config_path()
# Check if we are on the server and try to read that properties file first
ifos.path.isfile(SERVER_PROPERTIES_FILE):
returnConfig().from_server()
elifos.path.isfile(user_config_path):
returnConfig().from_config(user_config_path)
else:
new_config(user_config_path)
defnew_config(user_config_path:str):
click.echo("{} There was no config file found. Make sure it exists and is readable at either location:".format(click.style('Error:',fg='red',bold=True),click.style("Error:",fg='red',bold=True)))
print(" [0] {}".format(SERVER_PROPERTIES_FILE))
print(" [1] {}".format(user_config_path))
print()
print("For now the file just needs to contain three lines:")
forlineinEXAMPLE_CONFIG.splitlines():
click.echo(click.style((line),fg="bright_black"))
print()
ifclick.confirm(click.style('Do you want to create a config file at {}?'.format(user_config_path),fg="green"),abort=True):
# Create all directories in the path to the config, if they don't exist yet
"""BBBMON is a small CLI utility to monitor bbb usage
...
...
@@ -318,7 +262,7 @@ def main():
Examples: bbbmon config --edit
bbbmon meetings --watch 20 --endpoint bbb
Internally bbbmon relies on the offical bbb-API, which means you need to have the server's secret in order to create a valid request.
Internally bbbmon relies on the offical bbb-API, which means you need to have the server's secret in order to create a valid request. Create a new configuration with: bbbmon config --new
Warn users that there was no config file found, and then ask them if they want to create one.
The skip_prompt flag can be used to invoke this without asking or printing (e.g.
if asking and printing should be done elsewhere)
"""
ifnotskip_prompt:
click.echo("{} There was no config file found. Make sure it exists and is readable at either location:".format(click.style('Error:',fg='red',bold=True),click.style("Error:",fg='red',bold=True)))
print(" [0] {}".format(SERVER_PROPERTIES_FILE))
print(" [1] {}".format(user_config_path))
print()
print("For now the file just needs to contain three lines:")
forlineinEXAMPLE_CONFIG.splitlines():
click.echo(click.style((line),fg="bright_black"))
print()
ifskip_promptorclick.confirm(click.style('Do you want to create a config file at {}?'.format(user_config_path),fg="green"),abort=True):
# Create all directories in the path to the config, if they don't exist yet