README Completion

main
pporcheret 2023-06-30 14:33:27 +02:00
parent 8de31b77ca
commit 55c34e9375
1 changed files with 21 additions and 5 deletions

View File

@ -1,3 +1,19 @@
# About
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/) [![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/) [![AGPL License](https://img.shields.io/badge/license-AGPL-blue.svg)](http://www.gnu.org/licenses/agpl-3.0)
```mermaid
graph LR
Webpage[Web page] <--Flask--> Server[Server]
Server <-- Push agent and execute --> Client((Client))
Server[Square Rect] <----> Client2((Client2))
Server[Square Rect] <----> Client3((Client3))
```
Simple monitoring script.
It will push an agent (agent.py) on remote servers to get info about ressources (CPU, Disk, Memories..)
And display it on a webpage.
# Screenshot # Screenshot
![ScreenShot](./image/Pymonit.PNG) ![ScreenShot](./image/Pymonit.PNG)
@ -11,7 +27,7 @@ On server :
apt install python3-flask python3-paramiko python3-psutil apt install python3-flask python3-paramiko python3-psutil
``` ```
On nodes : On nodes (if needed):
```bash ```bash
apt install python3-psutil apt install python3-psutil
``` ```
@ -30,7 +46,7 @@ If you prefer (recommended), you can run in an python env
```bash ```bash
apt install python3-venv apt install python3-venv
python3 -m venv Pymonit python3 -m venv Pymonit --system-site-packages
. /Pymonit/bin/activate . /Pymonit/bin/activate
pip3 install psutil flask paramiko pip3 install psutil flask paramiko
@ -41,7 +57,7 @@ pip3 install psutil flask paramiko
## Clients ## Clients
Add your client in the python list client: Add your clients in the python list in config.py:
```bash ```bash
client = ['192.168.0.1','server.local','server.mydns'] client = ['192.168.0.1','server.local','server.mydns']
@ -65,7 +81,7 @@ ssh-copy-id -i <home_user>/.ssh/id_rsa.pub <user>@<client>
## Configuration on application ## Configuration on application
You have to report these info on the application : You have to report these info on config.py :
```bash ```bash
class ssh_conf: class ssh_conf:
@ -86,7 +102,7 @@ class ssh_conf:
## Flask configuration ## Flask configuration
Configure the flask configuration according to your needs (port,host,...) Configure the flask configuration according to your needs (port,host,...) in config.py
```bash ```bash
class flask_conf: class flask_conf:
port = 8090 port = 8090