diff --git a/h origin 82cf40e:develop b/h origin 82cf40e:develop new file mode 100644 index 0000000..b8ebba3 --- /dev/null +++ b/h origin 82cf40e:develop @@ -0,0 +1,35 @@ +82cf40e (HEAD -> develop) 28/10/25 +3fb910b 24/10/25 +94a1c8a 24/10/25 +dc4f1fc Merge branch 'develop' of http://20.19.88.39/Ornel_Zply/PFE_Infrastrastruture_Observabilite into develop +31f2628 (origin/develop) mise a jour +bc1a17a Merge branch 'develop' of http://20.19.88.39/Ornel_Zply/PFE_Infrastrastruture_Observabilite into develop +6604b6d maj1 +890a2fa maj +4a2a0b0 tuto_miseàjour +3b6e6b9 24/10/25 +209a53c 23/10/25 +5f461b7 23/10/25 +ea5a00a 23/10/25 +566d390 23/10/25 +ec6060c 23/10/25 +b01e5c5 23/10/25 +d5ed210 23/10/25 +4eb41d0 23/10/25 +afbe59c 23/10/25 +edcc697 (origin/main, origin/HEAD, main) 16/10 +9fd9083 10/10 +d73bf44 10/10 +95914d8 03/2025 +60e9398 03/10/25 +1affade 03/10/25 +fdf04b7 03/10/2025 +31f4c1b 03/10/2025 +c30146e commit 29/09 +ef8a93d commit 25/09 +1e41d55 commit 25/09 +baf9071 commit 25/09 +ce0b45c update +a60b38d update +091664a Update README.md +a0e2214 Initial commit diff --git a/observabilite_service/Machine_service/scripts/monitoring.sh b/observabilite_service/Machine_service/scripts/monitoring.sh new file mode 100755 index 0000000..25c0925 --- /dev/null +++ b/observabilite_service/Machine_service/scripts/monitoring.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +set -e + +# Variables +APACHE_EXPORTER_VERSION="1.0.10" +PROMTAIL_VERSION="2.9.0" +PROMTAIL_CONFIG="/etc/promtail-config.yaml" +LOKI_URL="http://192.168.56.20:3100/loki/api/v1/push" + +echo "=== Installation des dépendances ===" +sudo apt update +sudo apt install -y wget unzip apache2 + +echo "=== Installation et configuration de apache_exporter ===" +cd /opt +wget https://github.com/Lusitaniae/apache_exporter/releases/download/v${APACHE_EXPORTER_VERSION}/apache_exporter-${APACHE_EXPORTER_VERSION}.linux-amd64.tar.gz +tar -xvf apache_exporter-${APACHE_EXPORTER_VERSION}.linux-amd64.tar.gz +sudo mv apache_exporter-${APACHE_EXPORTER_VERSION}.linux-amd64/apache_exporter /usr/local/bin/ + +# Création du service systemd pour apache_exporter +sudo tee /etc/systemd/system/apache_exporter.service > /dev/null < /dev/null < /dev/null <