diff --git a/observabilite/observability/loki-wal/00000004 b/observabilite/observability/loki-wal/00000004 deleted file mode 100644 index e69de29..0000000 diff --git a/observabilite/observability/loki-wal/checkpoint.000003/00000000 b/observabilite/observability/loki-wal/checkpoint.000003/00000000 deleted file mode 100644 index e69de29..0000000 diff --git a/observabilite_service/Services/Tuto.txt b/observabilite_service/Services/Tuto.txt new file mode 100644 index 0000000..f801735 --- /dev/null +++ b/observabilite_service/Services/Tuto.txt @@ -0,0 +1,116 @@ +1️⃣ Objectif +Métriques Apache → récupérées via Apache Exporter → Prometheus → Grafana. +Logs Apache → récupérés via Promtail → Loki → Grafana. +Vue complète dans Grafana avec métriques + logs. + +2️⃣ Sur la VM qui héberge Apache (la VM à superviser) + +2.1 Installer Apache Exporter +Télécharger l’exporter et le rendre exécutable : + +wget https://github.com/Lusitaniae/apache_exporter/releases/download/v1.0.10/apache_exporter-1.0.10.linux-amd64.tar.gz +tar -xvf apache_exporter-1.0.10.linux-amd64.tar.gz +sudo mv apache_exporter-1.0.10.linux-amd64/apache_exporter /usr/local/bin/ + +Créer un service systemd pour Apache Exporter : +*** +sudo tee /etc/systemd/system/apache_exporter.service <:3100/loki/api/v1/push + +scrape_configs: + - job_name: apache_access + static_configs: + - targets: ['localhost'] + labels: + job: apache_access + host: apache_vm + __path__: /var/log/apache2/access.log + + - job_name: apache_error + static_configs: + - targets: ['localhost'] + labels: + job: apache_error + host: apache_vm + __path__: /var/log/apache2/error.log + +***** +Remplace par l’IP de la VM où tourne Loki. +**** +Créer le service systemd pour Promtail : +*** +sudo tee /etc/systemd/system/promtail.service <