diff --git a/build/monithor-client_1.0-rebuild_all.deb b/build/monithor-client_1.0-rebuild_all.deb new file mode 100644 index 0000000..31fdd7f Binary files /dev/null and b/build/monithor-client_1.0-rebuild_all.deb differ diff --git a/build/monithor-client_1.1-rebuild_all.deb b/build/monithor-client_1.1-rebuild_all.deb new file mode 100644 index 0000000..88e784c Binary files /dev/null and b/build/monithor-client_1.1-rebuild_all.deb differ diff --git a/build/monithor-client_1.3-rebuild_all.deb b/build/monithor-client_1.3-rebuild_all.deb new file mode 100644 index 0000000..62487df Binary files /dev/null and b/build/monithor-client_1.3-rebuild_all.deb differ diff --git a/build/monithor-client_1.4-rebuild_all.deb b/build/monithor-client_1.4-rebuild_all.deb new file mode 100644 index 0000000..3ddd903 Binary files /dev/null and b/build/monithor-client_1.4-rebuild_all.deb differ diff --git a/build/monithor-client_1.6-rebuild_all.deb b/build/monithor-client_1.6-rebuild_all.deb new file mode 100644 index 0000000..0aa8332 Binary files /dev/null and b/build/monithor-client_1.6-rebuild_all.deb differ diff --git a/build/monithor-client_1.7-rebuild_all.deb b/build/monithor-client_1.7-rebuild_all.deb new file mode 100644 index 0000000..124ec81 Binary files /dev/null and b/build/monithor-client_1.7-rebuild_all.deb differ diff --git a/build/monithor-client_1.8-rebuild_all.deb b/build/monithor-client_1.8-rebuild_all.deb new file mode 100644 index 0000000..abea827 Binary files /dev/null and b/build/monithor-client_1.8-rebuild_all.deb differ diff --git a/build/monithor-server_1.0-rebuild_all.deb b/build/monithor-server_1.0-rebuild_all.deb new file mode 100644 index 0000000..fc6594b Binary files /dev/null and b/build/monithor-server_1.0-rebuild_all.deb differ diff --git a/build/monithor-server_1.1-rebuild_all.deb b/build/monithor-server_1.1-rebuild_all.deb new file mode 100644 index 0000000..c3d669e Binary files /dev/null and b/build/monithor-server_1.1-rebuild_all.deb differ diff --git a/build/monithor-server_1.3-rebuild_all.deb b/build/monithor-server_1.3-rebuild_all.deb new file mode 100644 index 0000000..1559b18 Binary files /dev/null and b/build/monithor-server_1.3-rebuild_all.deb differ diff --git a/build/monithor-server_1.4-rebuild_all.deb b/build/monithor-server_1.4-rebuild_all.deb new file mode 100644 index 0000000..c2761e1 Binary files /dev/null and b/build/monithor-server_1.4-rebuild_all.deb differ diff --git a/build/monithor-server_1.6-rebuild_all.deb b/build/monithor-server_1.6-rebuild_all.deb new file mode 100644 index 0000000..4dd5c97 Binary files /dev/null and b/build/monithor-server_1.6-rebuild_all.deb differ diff --git a/build/monithor-server_1.7-rebuild_all.deb b/build/monithor-server_1.7-rebuild_all.deb new file mode 100644 index 0000000..7067294 Binary files /dev/null and b/build/monithor-server_1.7-rebuild_all.deb differ diff --git a/build/monithor-server_1.8-rebuild_all.deb b/build/monithor-server_1.8-rebuild_all.deb new file mode 100644 index 0000000..edc3714 Binary files /dev/null and b/build/monithor-server_1.8-rebuild_all.deb differ diff --git a/monithor-client/usr/share/man/fr/man1/monithor-client b/doc/monithor-client.md similarity index 88% rename from monithor-client/usr/share/man/fr/man1/monithor-client rename to doc/monithor-client.md index 2490930..2f9bf56 100644 --- a/monithor-client/usr/share/man/fr/man1/monithor-client +++ b/doc/monithor-client.md @@ -1,15 +1,28 @@ -monithor-client(1) -- Client bash de monitoring de système d'information -==== +--- +Title: MONITHOR-CLIENT +section: 1 +header: Serveur bash de monitoring +footer: monithor-server 1.7 +date: January 13, 2022 +--- -## SYNOPSIS +NAME +===== + +** monithor-client ** - service + + +SYNOPSIS +===== `/usr/local/bin/monithor-client [start/stop]` `/etc/init.d/monithor-c [start/stop]` -## DESCRIPTION +DESCRIPTION +===== monithor-client(1) permet de surveiller votre système d'information @@ -19,7 +32,8 @@ monithor-client(1) permet de surveiller votre système d'information - un serveur web en python est lancé sur votre machine de monitoring -## INIT.D +INIT.D +====== le service peut être démarré et arrêté via system V @@ -31,7 +45,8 @@ le service peut être démarré et arrêté via system V `/etc/init.d/monithor-c start` -## CONFIGURATION SERVICE +CONFIGURATION SERVICE +===== - Le fichier responsable de la gestion IP/PORT est : service.cfg @@ -61,7 +76,8 @@ le service peut être démarré et arrêté via system V * WebPort : correpond au port utilisé pour lancer le serveur web python -## CONFIGURATION SONDE +CONFIGURATION SONDE +===== - La configuration des sondes est stocké dans le répertoires : diff --git a/monithor-server/usr/share/man/fr/man1/monithor-server b/doc/monithor-server.md similarity index 87% rename from monithor-server/usr/share/man/fr/man1/monithor-server rename to doc/monithor-server.md index 31ee5a1..6ea0b55 100644 --- a/monithor-server/usr/share/man/fr/man1/monithor-server +++ b/doc/monithor-server.md @@ -1,15 +1,28 @@ -monithor-server(1) -- Serveur bash de monitoring de système d'information -==== +--- +Title: MONITHOR-SERVER +section: 1 +header: Serveur bash de monitoring +footer: monithor-server 1.7 +date: January 13, 2022 +--- -## SYNOPSIS +NAME +===== + +** monithor-server ** - service + +SYNOPSIS +====== + `/usr/local/bin/monithor-server [start/stop]` `/etc/init.d/monithor-c [start/stop]` -## DESCRIPTION +DESCRIPTION +===== monithor-server(1) permet d'accépter des requêtes venant d'un instance monithor-client @@ -29,7 +42,8 @@ le service peut être démarré et arrêté via system V `/etc/init.d/monithor-c start` -## CONFIGURATION SERVICE +CONFIGURATION SERVICE +===== - Le fichier responsable de la gestion IP/PORT est : service.cfg @@ -49,7 +63,8 @@ le service peut être démarré et arrêté via system V * Crypted : si la valeur est à "yes" le binnaire crypcat est utilisé, si non netcat est utilisé -## CONFIGURATION SONDE +CONFIGURATION SONDE +===== - La configuration des sondes est stocké dans le répertoires : @@ -63,13 +78,15 @@ Chaque sonde est composé de cette manière : * SCRIPT : Script éxecuté sur l'instance avec le(s) argument(s) reçu(s) de monithor client -## SCRIPT +SCRIPT +======= les scripts sont tous stocké dans le répertoire : /usr/local/bin/monithor-server.d/ -## Exemple : +Exemple +====== * Configuration server : diff --git a/generate.sh b/generate.sh index 99c1b95..12fa427 100755 --- a/generate.sh +++ b/generate.sh @@ -42,7 +42,9 @@ SedControl() { BuildDeb(){ echo -n "Gen monithor-${1} [$2] : " cd /tmp/ &> /dev/null - dpkg-deb --build --root-owner-group monithor-${1}_${2}_all &> /dev/null + Dist=$(lsb_release -a 2> /dev/null | grep Distributor |awk '{print $NF}' |tr '[:upper:]' '[:lower:]') + [[ $Dist == "ubuntu" ]] && Compress=' -z 0' + dpkg-deb ${Compress} --build --root-owner-group monithor-${1}_${2}_all &> /dev/null [[ "$?" -eq "0" ]] && echo "OK" || echo "FAILED" } @@ -53,6 +55,21 @@ CleanTemp() { rm -Rf monithor-* } +ManPage() { + + if [[ $2 == "create" ]] + then + pandoc -s -t man ${Wai}/doc/monithor-${1}.md -o ${Wai}/doc/monithor-${1}.1 + gzip ${Wai}/doc/monithor-${1}.1 + cp ${Wai}/doc/monithor-${1}.1.gz ${Wai}/monithor-${1}/usr/local/man/fr/man1/ + fi + if [[ $2 == "delete" ]] + then + rm ${Wai}/monithor-${1}/usr/local/man/fr/man1/* + rm ${Wai}/doc/monithor-${1}.1.gz + fi +} + [[ ! -z $1 ]] && usage CheckDep @@ -62,6 +79,11 @@ CpArchName server $NewTag CpArchName client $NewTag SedControl server $NewTag SedControl client $NewTag +ManPage client create +ManPage server create BuildDeb client $NewTag BuildDeb server $NewTag +ManPage client delete +ManPage server delete + CleanTemp diff --git a/monithor-client/DEBIAN/postinst b/monithor-client/DEBIAN/postinst new file mode 100755 index 0000000..d610295 --- /dev/null +++ b/monithor-client/DEBIAN/postinst @@ -0,0 +1,3 @@ +#!/bin/bash + +mandb diff --git a/monithor-client/DEBIAN/postrm b/monithor-client/DEBIAN/postrm new file mode 100755 index 0000000..d610295 --- /dev/null +++ b/monithor-client/DEBIAN/postrm @@ -0,0 +1,3 @@ +#!/bin/bash + +mandb diff --git a/monithor-client/usr/share/man/fr/man1/monithor-client.1 b/monithor-client/usr/share/man/fr/man1/monithor-client.1 deleted file mode 100644 index 9f86578..0000000 --- a/monithor-client/usr/share/man/fr/man1/monithor-client.1 +++ /dev/null @@ -1,98 +0,0 @@ -.\" generated with Ronn-NG/v0.9.1 -.\" http://github.com/apjanke/ronn-ng/tree/0.9.1 -.TH "MONITHOR\-CLIENT" "1" "March 2022" "" -.SH "NAME" -\fBmonithor\-client\fR \- Client bash de monitoring de système d'information -.SH "SYNOPSIS" -\fB/usr/local/bin/monithor\-client [start/stop]\fR -.P -\fB/etc/init\.d/monithor\-c [start/stop]\fR -.SH "DESCRIPTION" -monithor\-client(1) permet de surveiller votre système d'information -.IP "\[ci]" 4 -l'ensemble du service est basé sur l'ourverture d'une socket TCP via netcat -.IP "\[ci]" 4 -il peut aussi utiliser cryptcat (chiffré) -.IP "\[ci]" 4 -un serveur web en python est lancé sur votre machine de monitoring -.IP "" 0 -.SH "INIT\.D" -le service peut être démarré et arrêté via system V -.IP "\[ci]" 4 -Démarrage -.IP "" 0 -.P -\fB/etc/init\.d/monithor\-c start\fR -.IP "\[ci]" 4 -Arrêt -.IP "" 0 -.P -\fB/etc/init\.d/monithor\-c start\fR -.SH "CONFIGURATION SERVICE" -.IP "\[ci]" 4 -Le fichier responsable de la gestion IP/PORT est : service\.cfg -.IP "" 0 -.P -\fB$ cat etc/monithor\-client/service\.cfg\fR -.P -\fBRemoteIp=10\.10\.10\.3:1666\fR -.P -\fBLocalPassword='Evil@MonitoR\-666'\fR -.P -\fBCrypted=no\fR -.P -\fBRotation=1\fR -.P -\fBTimeOut=2\fR -.P -\fBWebPort=80\fR -.IP "\[ci]" 4 -RemoteIp : correspond au couple adresse IP/Port de l'interface réseau utilisée -.IP "\[ci]" 4 -LocalPassword : correspond au mot de passe utilisé pour chiffré la connexion si Crypted est à "yes" -.IP "\[ci]" 4 -Crypted : si la valeur est à "yes" le binnaire crypcat est utilisé, si non netcat est utilisé -.IP "\[ci]" 4 -Rotation : correspond à la valeur en seconde (float) entre chaque éxécution complète des sondes -.IP "\[ci]" 4 -TimeOut : correspond à la valeur en seconde (float) du temps maximal d'éxécution de chaque sonde -.IP "\[ci]" 4 -WebPort : correpond au port utilisé pour lancer le serveur web python -.IP "" 0 -.SH "CONFIGURATION SONDE" -.TP -La configuration des sondes est stocké dans le répertoires : - -.P -/etc/monithor\-client/conf/ -.P -Tous les fichiers *\.cfg sont lus\. -.TP -Chaque sonde est composée de cette manière : - -.P -\fBIP:PORT#SONDE#arg1|arg2|arg3\fR -.IP "\[ci]" 4 -IP:PORT : correspond à l'adresse et le prot de communication du erveur monithor\-server distant\. -.IP "\[ci]" 4 -SONDE : correspond au nom de sonde envoyé sur le serveur monithor\-server distant\. -.IP "\[ci]" 4 -# : séparateur entre le nom de la sonde et les arguments -.IP "\[ci]" 4 -arg1|arg2|arg3 : ensemble des arguments envoyé sur le serveur monithor\-server distant\. Le séparateur est "|" -.IP "\[ci]" 4 -Exemple : -.IP "" 0 -.P -\fB$ cat etc/monithor\-client/conf/Card_10\.10\.10\.3\-1666\.cfg\fR -.P -\fB10\.10\.10\.3:1666#file#/tmp/test\fR -.P -\fB10\.10\.10\.3:1666#part#/home/isen|50|80\fR -.P -\fB10\.10\.10\.3:1666#process#sshd\fR -.IP "\[ci]" 4 -Multiple cible -.IP "" 0 -.P -Chaque fichier peut s'organiser par cible ou par type de sonde ou tout mélangé diff --git a/monithor-client/usr/share/man/fr/man1/monithor-client.1.html b/monithor-client/usr/share/man/fr/man1/monithor-client.1.html deleted file mode 100644 index 69f5a1c..0000000 --- a/monithor-client/usr/share/man/fr/man1/monithor-client.1.html +++ /dev/null @@ -1,213 +0,0 @@ - - -
- - -
- monithor-client - Client bash de monitoring de système d'information
-
/usr/local/bin/monithor-client [start/stop]
/etc/init.d/monithor-c [start/stop]
monithor-client(1) permet de surveiller votre système d'information
- -l'ensemble du service est basé sur l'ourverture d'une socket TCP via netcat
-il peut aussi utiliser cryptcat (chiffré)
-un serveur web en python est lancé sur votre machine de monitoring
-le service peut être démarré et arrêté via system V
- -/etc/init.d/monithor-c start
/etc/init.d/monithor-c start
$ cat etc/monithor-client/service.cfg
RemoteIp=10.10.10.3:1666
LocalPassword='Evil@MonitoR-666'
Crypted=no
Rotation=1
TimeOut=2
WebPort=80
RemoteIp : correspond au couple adresse IP/Port de l'interface réseau utilisée
-LocalPassword : correspond au mot de passe utilisé pour chiffré la connexion si Crypted est à "yes"
-Crypted : si la valeur est à "yes" le binnaire crypcat est utilisé, si non netcat est utilisé
-Rotation : correspond à la valeur en seconde (float) entre chaque éxécution complète des sondes
-TimeOut : correspond à la valeur en seconde (float) du temps maximal d'éxécution de chaque sonde
-WebPort : correpond au port utilisé pour lancer le serveur web python
-/etc/monithor-client/conf/
- -Tous les fichiers *.cfg sont lus.
- -IP:PORT#SONDE#arg1|arg2|arg3
IP:PORT : correspond à l'adresse et le prot de communication du erveur monithor-server distant.
-SONDE : correspond au nom de sonde envoyé sur le serveur monithor-server distant.
-# : séparateur entre le nom de la sonde et les arguments
-arg1|arg2|arg3 : ensemble des arguments envoyé sur le serveur monithor-server distant. Le séparateur est "|"
-Exemple :
-$ cat etc/monithor-client/conf/Card_10.10.10.3-1666.cfg
10.10.10.3:1666#file#/tmp/test
10.10.10.3:1666#part#/home/isen|50|80
10.10.10.3:1666#process#sshd
Chaque fichier peut s'organiser par cible ou par type de sonde ou tout mélangé
- -
- monithor-server - Serveur bash de monitoring de système d'information
-
/usr/local/bin/monithor-server [start/stop]
/etc/init.d/monithor-c [start/stop]
monithor-server(1) permet d'accépter des requêtes venant d'un instance monithor-client
- -l'ensemble du service est basé sur l'ourverture d'une socket TCP via netcat
-il peut aussi utiliser cryptcat (chiffré)
-le service peut être démarré et arrêté via system V
- -/etc/init.d/monithor-c start
/etc/init.d/monithor-c start
LocalIp=10.10.10.4
LocalPort=1666
Crypted=no
LocalPassword='Evil@MonitoR-666'
LocalIp : correspond à l'adresse IP de l'interface réseau en écoute
-LocalPort : correspond au port de communication du client monithor
-LocalPassword : correspond au mot de passe utilisé pour chiffré la connexion si Crypted est à "yes"
-Crypted : si la valeur est à "yes" le binnaire crypcat est utilisé, si non netcat est utilisé
-/etc/monithor-server/sonde.cfg
- -Chaque sonde est composé de cette manière :
- -SONDE#SCRIPT
SONDE : Nom de la sonde envoyé par monithor server et reçu par monithor client
-SCRIPT : Script éxecuté sur l'instance avec le(s) argument(s) reçu(s) de monithor client
-les scripts sont tous stocké dans le répertoire :
- -/usr/local/bin/monithor-server.d/
- -cat /etc/monithor-server/sonde.cfg
part#part-space.sh
$ cat /etc/monithor-client/etc/monithor-client/conf/Card_10.10.10.3-1666.cfg
10.10.10.3:1666#part#/home/isen|50|80
| CLIENT envoi à SERVEUR : part#/home/isen | -50 | -80 | -
SERVEUR compare la chaine part à son fichier de configuration /etc/monithor-server/sonde.cfg
- -SERVEUR associe part#part-space.sh
- -SERVEUR exécute : /usr/local/bin/monithor-server.d/part-space.sh /home/isen 50 80
- -SERVEUR renvoie les valeur récupéré à CLIENT
- -