Infractl is a collection of tools which have been developed to monitor & control the network infrastructure at ED1R.
With infractl you can either execute commands through the command line or through a built-in webserver with a REST interface.
- Reset 4G Modem connected to a Microtik Routerboard
- check status of routes (ip/route) on a Microtik Routerboard
- set parameters on routes (ip/route) on a Microtik Routerboard
- Check connectivity (ping) to serveral IP addresses / urls
- Control systemd services
- Get the detailed status of a ZTE MF823 4G USB Modem
The repository contains an example configuration file. By convention it is called
.infractl.[yaml|toml|json]
and is located by default either in the
home directory or the directory where the infractl executable is located.
The format of the file can either be in
yaml,
toml, or
json.
The first line after starting infractl will indicate if / which config file has been found.
You can also use config files located in an arbitray directory using --config flag.
Priority:
- Pflags (e.g. -a 192.168.1.1 -p 6886)
- Values from config file
- Environment variables
- Default values
infractl is published under the permissive MIT license.
The WebUI is written in Typescript, using the Vue.js reactive framework. In order to compile the files to javascript, you need to have node.js (version 10 LTS) and yarn package manager installed.
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt update
$ sudo apt install nodejs
$ sudo apt install yarn
On Linux and MacOS you can leverage the Makefile.
$ make install-deps
$ make generate
$ make dist
The auto generated documentation can be found at godoc.org.