[UPDATE] README

This commit is contained in:
Prof Isen 2022-03-16 13:21:13 +01:00
parent 9b2ae01b4a
commit 3841e8f585
5 changed files with 110 additions and 52 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
client/web/index.html

110
README.md
View File

@ -1,11 +1,117 @@
# MoniThor
## A propos
MoniThor is a simple monitoring tools in bash.
It used netcat encrypted version :
You can use it with netcat or cryptcat
You can see result on the client from a web page (self hosted python web server)
## Server Configuration
The configuration files for the server are :
### serivce.cfg
- ./server/conf-server/service.cfg
```
cryptcat
LocalIp is the IP adresse to used on the server (can used 127.0.0.1)
LocalPort is the local port to used on the server
#########
Crypted can used netcrypt (yes) or netcat (no)
LocalPassword is to set if you used Crypted
```
### sonde.cfg
- ./server/conf-server/sonde.cfg
```
SONDE#SCRIPT
```
SONDE is get by the server and it exec SCRIPT with ARG get from the client
### tree
- Tree for server
```
└── server
├── conf-server
│   ├── scripts
│   │   ├── file-present.sh
│   │   └── FunctionOutput
│   ├── service.cfg
│   └── sonde.cfg
└── Daemon.sh
```
## Client Configuration
The configuration files for the client are :
### serivce.cfg
- ./client/conf-client/service.cfg
```
RemoteIp is the server IP address (can be used in localhost with 127.0.0.1)
RemotePort is the port to communicate with the server
LocalPassword can be used if you chose Crypted=yes (process is slow)
Crypted=no (use netcat or cryptcat)
Rotation is the time between the ratation of all sonde
WebPort is the port to see the result on the web interfaces : http://127.0.0.1:PORT
```
### sonde.cfg
- ./client/conf-client/sonde.cfg
```
SONDE#Arguemnent
```
+--------------+------------------+---------------------------------+----------------------+-----------------------------------+
| Client | server | server | server | server |
+-------------==>----------------==>-------------------------------==>--------------------==>----------------------------------+
| SONDE + ARG | Is SONDE exist ? | Get associated SCRIPT for SONDE | Exec SCRIPT With ARG | Push result with FORMAT [0-5]|TXT |
+--------------+------------------+---------------------------------+----------------------+-----------------------------------+
### tree
- Tree for client
```
.
└── client
   ├── conf-client
   │   ├── exec.sh
   │   ├── functions
   │   ├── service.cfg
   │   ├── sonde.cfg
   │   ├── webmonithor.html
   │   └── webserver.sh
   ├── service.sh
   └── web
   ├── index.html
   └── webmonithor.html
```
### WEB
The client start a python sumple http server on localhost on `WebPort`
![](./img/web.png)

View File

@ -1,4 +1,4 @@
file#/tmp/coucou
file#/tmp/nop
file#
tamere#reboot
NotRealSondeName#reboot

View File

@ -1,49 +0,0 @@
<html>
<head>
<title>MoniThor on 127.0.0.1 </title>
<meta http-equiv="refresh" content="1" />
</head>
Date : 2022-03-16 12:55:53
<table border="1" color="#FFFFFF">
<thead>
<tr>
<th colspan="4">MoniThor Result</th>
</tr>
</thead>
<tbody>
<tr>
<td>file</td>
<td>/tmp/coucou</td>
<td style="background-color:green;" > 0 </td>
<td> File /tmp/coucou exist</td>
</tr>
<tr>
<td>file</td>
<td>/tmp/nop</td>
<td style="background-color:red;" > 2 </td>
<td> File /tmp/nop is NOT present</td>
</tr>
<tr>
<td>file</td>
<td></td>
<td style="background-color:red;" > 5 </td>
<td> no argument</td>
</tr>
<tr>
<td>tamere</td>
<td>reboot</td>
<td style="background-color:red;" > 5 </td>
<td> No sonde tamere on serveur 127.0.0.1</td>
</tr>
</tbody>
</table>

BIN
img/web.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB