project is in alpha and have only been tested on debian/rockyLinux systems
next major changes whill be windows implementation, and alerting system
A python app that monitors your system
Explore the docs »
This is a school project that aims to monitor a system. It is written in python and uses the flask library to create an api and a web interface. It also uses the psutil library to monitor the system and the pymongo library to store the data in a mongodb database.
This app will receive updates in the future since it is a projetct i'd loved to work on.
- Python and most of native libraries, psutil, pyMongo, Flask
- mongodb
- Linux debian based systems (tested ✅)
- RockyLinux (tested ✅)
- Windows (not implemented ❌)
Clone the repository on your machine
Be sure having python installed on your machine
You will need python installed on your machine.
If you want to use the docker-compose.yml file provided in the /api folder, be sure having docker installed and ready on the machine
-
Clone the repo
git clone https://github.com/ogb4n/alpha_monit-app.git
-
Go into the /app folder and edit the
config.json.example
file
it should look like this:{ "ports":[ {your list of ports} ], "log_dir" : "/var/log/monit/", "rapport_dir" : "/var/monit/reports/", "local_api_mode": true }
You can change the ports to monitor, the log directory and the report directory. You can also change the local_api_mode to false if you want to use the web interface on another machine, or to turn it off.
More values will be added in the future
-
Still in the /app folder, run the ./install.sh script as admin to install the app
sudo ./install.sh
This will install the app as a service and will start it.
The api will be available at 'http://localhost:8085/'
If you enabled the local_api_mode, you can now go to http://localhost:8085/ to see the web interface.
Otherwise, you can run the app with the command
monit
and use monit -h
to see the available commands.
This app is meant to be used as a service. It will monitor the system and store the data in a mongodb database. You can then use the web interface to see the data.
You can also use the command line to see the data, especially if you do not want to export your datas but prefer storing it on the system. Use monit -h
to see the available commands.
- Add logs
- Add local_api_mode
- Add web interface
- POST to webhook when cursor hit data (-alerting)
- Add clustering
- Add Additional Templates & routes
Github: ogb4n