diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..608ec1a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +client/web/index.html diff --git a/README.md b/README.md index bb31528..8f0fba4 100644 --- a/README.md +++ b/README.md @@ -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` + + + + diff --git a/client/conf-client/sonde.cfg b/client/conf-client/sonde.cfg index db28b66..3fd4222 100644 --- a/client/conf-client/sonde.cfg +++ b/client/conf-client/sonde.cfg @@ -1,4 +1,4 @@ file#/tmp/coucou file#/tmp/nop file# -tamere#reboot +NotRealSondeName#reboot diff --git a/client/web/index.html b/client/web/index.html deleted file mode 100644 index 72138ec..0000000 --- a/client/web/index.html +++ /dev/null @@ -1,49 +0,0 @@ - - -
-| MoniThor Result | -|||
|---|---|---|---|
| file | -/tmp/coucou | -0 | -File /tmp/coucou exist | -
| file | -/tmp/nop | -2 | -File /tmp/nop is NOT present | -
| file | -- | 5 | -no argument | -
| tamere | -reboot | -5 | -No sonde tamere on serveur 127.0.0.1 | -