2022-03-17 08:50:36 +01:00
2022-03-16 13:21:13 +01:00
2022-03-17 08:51:10 +01:00
2022-03-17 08:50:36 +01:00

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
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
IP:PORT#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 |
| are send to  |                  |                                 |                      |                                   |
|  IP port     |                  |                                 |                      |                                   |
+--------------+------------------+---------------------------------+----------------------+-----------------------------------+

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

Description
bash simple monitoring tools
Readme 289 KiB
Languages
Shell 100%