Skip to content

ALPHA - This is an alpha version, major functions are already working but many changes will appear soon

Notifications You must be signed in to change notification settings

ogb4n/monit-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Monit-App

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 »

About The Project

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.

(back to top)

Built With

  • Python and most of native libraries, psutil, pyMongo, Flask
  • mongodb

Built For

  • Linux debian based systems (tested ✅)
  • RockyLinux (tested ✅)
  • Windows (not implemented ❌)

(back to top)

Getting Started

Clone the repository on your machine

Be sure having python installed on your machine

Prerequisites

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

Installation

  1. Clone the repo

    git clone https://github.com/ogb4n/alpha_monit-app.git
  2. 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


  1. 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.

You disabled the local_api_mode

Otherwise, you can run the app with the command

monit

and use monit -h to see the available commands.

(back to top)

Usage

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.

(back to top)

Roadmap

  • Add logs
  • Add local_api_mode
  • Add web interface
  • POST to webhook when cursor hit data (-alerting)
  • Add clustering
  • Add Additional Templates & routes

(back to top)

Contact

Github: ogb4n

(back to top)

About

ALPHA - This is an alpha version, major functions are already working but many changes will appear soon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published