diff --git a/docker-compose.yaml b/docker-compose.yaml index 2137ba3662901f7464e6138bf9abbb22b9ee022e..68f84bb3b53a38c555f2e10c7f6a538468266566 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 7be4c4cbf448df9aba4e660b68dcd91380a5de68..65a222de5745c1b68478cef7d0865f23431bb8c2 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"