/Swarm

Server Monitor

Primary LanguageKotlin

Swarm Server Monitor

Swarm is an application aggregating hardware data from a swarm of servers.

Screenshots

Desktop

Mobile

Components

  • A web server built with Ktor, written in Kotlin
  • Dragonfly, a script aggregating and sending hardware data to Swarm, written in bash
  • A client application displaying data retrieved from the web server, build with React and D3.js

Goals

Usage

You need to host your own instance of Swarm.

Swarm

Build

git clone https://github.com/Ribesg/Swarm.git
cd Swarm
mvn

Run

Get the resulting jar file (target/Swarm.jar), move it where you want and run it

cd ..
mv Swarm/target/Swarm.jar .
java -jar Swarm.jar

On the first run, Swarm will generate a configuration file (config.yml). Edit it then restart Swarm.

All available arguments:

         -d, --debug - Enable debug output
       -v, --verbose - Enable verbose output
--dev, --development - Enable development mode

Dragonfly

Install

wget https://raw.githubusercontent.com/Ribesg/Swarm/master/dragonfly.sh
chmod +x dragonfly.sh
./dragonfly.sh --install --key $KEY --api $API_URL
rm dragonfly.sh

All available Dragonfly arguments:

           -a, --api - Configure the Swarm instance URL
          -h, --help - Show this help
       -i, --install - Install the Dragonfly Client
           -k, --key - Configure the key used to send data to the Swarm instance
         -l, --login - Configure the HTTP user used to send data to the Swarm instance
-o, --run-one-minute - Run the Dragonfly Client for 1 minute
      -p, --password - Configure the HTTP password used to send data to the Swarm instance
  -r, --run-infinite - Run the Dragonfly Client forever (i.e. until killed)
     -u, --uninstall - Uninstall the Dragonfly Client

Options -i, -o and -r requires options -a and -k.

Dragonfly installs itself in /opt/var/dragonfly and as a cron task, starting every minute and running for one minute.

Uninstall

/opt/var/dragonfly/dragonfly.sh --uninstall