From 7156ac8871971cec46b2591d6cc281ff8948a9ae Mon Sep 17 00:00:00 2001
From: Markus Klose <markus.klose@student.reutlingen-university.de>
Date: Tue, 29 Nov 2022 18:00:14 +0100
Subject: [PATCH] More comments

---
 docker-compose.yaml       | 13 +++++++++++--
 prometheus/prometheus.yml |  6 +++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/docker-compose.yaml b/docker-compose.yaml
index 2137ba3..68f84bb 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -1,6 +1,9 @@
 version: '3'
 
 services:
+# Image of node-exporter
+# node-exporter provides detailed metrics to prometheus.
+# It monitors a broad variety of metrics abot the host system, network traffic and physical hardware and more.
   node-exporter:
     image: prom/node-exporter:latest
     container_name: node-exporter
@@ -21,6 +24,8 @@ services:
     deploy:
       mode: global
 
+# Image of mongoDB-exporter
+# mongoDB-exporter will monitor the mongoDB Database and provide an Endpoint, which Prometheus can scrape data from.
   mongodb-exporter:
     image: percona/mongodb_exporter:2.32.0
     container_name: mongodb-exporter
@@ -30,9 +35,11 @@ services:
       - 9216
     #restart: unless-stopped
     command:
-      - '--mongodb.uri=mongodb://mongodb:27017/cloudComputing/admin?ssl=false'
+      - '--mongodb.uri=mongodb://mongodb:27017/cloudComputing/'
     
-
+# Image of Prometheus
+# Prometheus scarpes metric data from html Endpoints
+# Configuration of Prometheus in Prometheus.yml file
   prometheus:
     image: prom/prometheus:latest
     container_name: prometheus
@@ -47,6 +54,8 @@ services:
     command:
       - "--config.file=/etc/prometheus/prometheus.yml"
 
+# Image of Grafana
+# Grafana takes the metric data from Prometheus and visualizes data in web UI
   grafana:
     image: grafana/grafana:latest
     container_name: grafana
diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml
index 7be4c4c..65a222d 100644
--- a/prometheus/prometheus.yml
+++ b/prometheus/prometheus.yml
@@ -14,21 +14,21 @@ scrape_configs:
     scrape_interval: 5s
     # scheme: https
     static_configs:
-      - targets: ['192.168.0.230:5000']
+      - targets: ['192.168.2.34:5000']
 
   - job_name: 'node-exporter'
     honor_labels: true
     scrape_interval: 5s
     # scheme: https
     static_configs:
-      - targets: ['192.168.0.230:9100']
+      - targets: ['192.168.2.34:9100']
 
   - job_name: 'mongodb-exporter'
     honor_labels: true
     scrape_interval: 5s
      #scheme: https
     static_configs:
-      - targets: ['192.168.0.230:9216']
+      - targets: ['192.168.2.34:9216']
 
 #remote_write:
 #- url: "localhost:3000"
-- 
GitLab