yamot is a web-based server-monitoring tool built for small environments with just a handful servers. It takes a minimum of resources which allows the execution on almost every machine, also very old ones. It works best with Linux or BSD. Windows is not part of the server scope.
You could use it for example to monitor your Raspberry Pi Servers running at home. It takes only a few steps of configuration and after that it displays much relevant server measurement data in your browser:
+ System Load
+ Memory Usage
+ Uptime / Boot Time
+ Costs (calculated)
+ Battery (e.g. for monitoring a mobile device)
+ WiFi Signal Strength
+ Processor (Cores, Speed, Usages, …)
+ System (Distro, Version, Architecture, …)
+ Network Services (Open Listening Ports)
+ Network Devices & Addresses
+ Network Interfaces IO (bytes sent/received)
+ Disk Storage Usage (used & total space)
+ Disk Device IO (bytes read/written)
+ Users logged in (name, login date, …)
The architecture is divided up into three parts (original MVC)
* Server Component
This component needs to be executed on the server-system which you want to monitor. It’s basically a simple webserver. For security reasons it just has readonly access to the system. The Auth is done via HTTP Basic Auth, so don’t use it in untrusted networks!
The Server component provides realtime data only. There are no cyclical background tasks or other stuff running which occupy the processor/memory/disk. If you don’t access the server it will take up almost no resources. The server is built with Python3, which of course needs to be installed. Default server port is 9393.
* Controller Component
One server needs to have the additional role of the controller. The controller is also just a webserver which provides a REST-API to manage the application.
The Auth is also done via HTTP Basic Auth, so also don’t use it in untrusted networks! The controller is built with node.js and express.js. If you don’t have those installed, you could also use the Docker-Image called prod. Default controller port is 8080.
* Client Component
Finally the client represents the web-page and gets served by the Controller (on port 8080). The client is built with Angular, some Bootstrap CSS and a subset of FontAwesome Icons. A refresh-cycle to display new data (every 3sec per default) incurs requesting all your servers to get updates of the measured data.
git clone https://github.com/knrdl/yamot && cd yamot
1. Install python3 and psutil and ujson on every server with sudo apt-get install python3-psutil python3-ujson. If you are not running an apt-based system (Debian or Ubuntu) use sudo pip3 install psutil instead.
2. Copy the file yamot_server.py to your server (e.g. under /opt/yamot) and add it to /etc/rc.local as sudo -u username dash -c 'cd /opt/yamot && python3 /opt/yamot/yamot_server.py' & in front of the “exit 0”-line (enable autostart)
3. Run the server once interactively via python3 yamot_server.py to generate a config file (needs one-time write permission in the same folder).
4. If you are running a firewall on your server (like ufw) open the specified port sudo ufw allow 9393 (default port is 9393)
Client & Controller
1. The controller-component needs to be running on a server in your network (the same network where also the servers are running). The server which runs the controller can also run the server component at the same time.
2. There you will need a node.js installation with express.js (or docker, if you use the prod image)
3. Use node controller.js to start the controller and check if it is working
4. The login credentials will be provided by the controller on startup in the shell.
5. Now you could also add it to the autostart of the system. Don’t forget to open the port if you are using a firewall.
6. If you are done, open browser and navigate to http://ip-of-the-controller-device:8080 (8080 is the default controller port)
+ Username: yamot
+ Password: test123