CRXN documentation / babelweb 2

babelweb 2

babelweb 2 is a monitoring tool for Babel. It shows with a web interface the current neighbors, the current routes and a graphical overview of the babel network.

Installation

First you have to download go. You can do this on Debian for example with the following command:

sudo apt install golang

After that you have to clone the current git repo and compile the program:

git clone https://github.com/Vivena/babelweb2
cd babelweb2
go build

Now you have an executable program babelweb2.

By default, the web interface runs on port 8080. You can also specify a different endpoint with the -http parameter.

babelweb2 uses the local configuration interface of babeld. This must have been activated beforehand. babeld assumes that this is active on [::1]:33123. Alternatively, you can specify the endpoint with the -node= flag.

Install as Systemd Unit

In order to install babelweb2 as a systemd unit, we must first install the necessary files into the system. For this we can execute the following commands in the babelweb2 git directory:

sudo cp babelweb2 /usr/local/bin
sudo mkdir -p /usr/share/babelweb2/
sudo cp -r ./static/ /usr/share/babelweb2/

After that we create the unit file /etc/systemd/system/babelweb2.service:

[Unit]
Description=Yet Another Monitoring Tool for the Babel routing daemon
Documentation=https://github.com/Vivena/babelweb2

[Service]
LimitNOFILE=1048576
LimitNPROC=512
DynamicUser=yes
EnvironmentFile=/etc/default/babelweb2
ExecStart=/usr/local/bin/babelweb2 -http $PORT -static $STATIC_DIR
ExecReload=/bin/kill -SIGUSR1 $MAINPID
Restart=on-failure

[Install]
WantedBy=multi-user.target

After that you can reload the units:

systemctl daemon-reload

For babelweb2 to work, we still need to specify the arguments. For this we can create an environment file /etc/default/babelweb2:

PORT=:<port>
STATIC_DIR=/usr/share/babelweb2/static/

Here we replace <port> with the port on which the Babelweb2 interface should be available. The default is 8080, but you can also use 33124, for example.

babelweb2 uses the local configuration interface of babeld. This must have been activated beforehand. babeld assumes that this is active on [::1]:33123. Alternatively, you can specify the endpoint with the -node flag.