122 lines
2.7 KiB
Markdown
122 lines
2.7 KiB
Markdown
# MoniThor
|
||
|
||
## A propos
|
||
|
||
MoniThor is a simple monitoring tools in bash.
|
||
|
||
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
|
||
|
||
```
|
||
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
|
||
TimeOut is the number of second before the interrogation failed
|
||
|
||
```
|
||
|
||
### 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`
|
||
|
||

|
||
|
||
|