From a0f337e08d5612dd7db8f45ea33b9dbd6696bc20 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 18 Mar 2025 11:26:53 +0000 Subject: [PATCH] add visuals --- config/prometheus.yml | 36 ++++++++++++++++++---------- docker-compose.yml | 55 +++++++++++++++++++++---------------------- 2 files changed, 51 insertions(+), 40 deletions(-) diff --git a/config/prometheus.yml b/config/prometheus.yml index f78bd99..b5edd6c 100644 --- a/config/prometheus.yml +++ b/config/prometheus.yml @@ -2,7 +2,7 @@ global: scrape_interval: 60s evaluation_interval: 60s scrape_timeout: 10s - sample_limit: 1000 # Limit samples per scrape to prevent overload + sample_limit: 1000 # Rule files rule_files: @@ -14,31 +14,43 @@ alerting: - targets: scrape_configs: - # Prometheus itself + # Prometheus - job_name: 'prometheus' sample_limit: 50000 static_configs: - targets: ['prometheus:9090'] # Container metrics via cAdvisor - - job_name: 'cadvisor' + - job_name: 'ktpv-orch_cadvisor' sample_limit: 50000 static_configs: - targets: ['cadvisor:8080'] metrics_path: /metrics scheme: http + + - job_name: 'ktpv-apps01_cadvisor' + sample_limit: 50000 + static_configs: + - targets: ['10.249.84.41:9050'] + metrics_path: /metrics + scheme: http - # Host metrics via node-exporter - - job_name: 'node-exporter' + # Metrics via node-exporter + - job_name: 'ktpv-orch_node-exporter' sample_limit: 50000 static_configs: - targets: ['node-exporter:9100'] - # Loki metrics - - job_name: 'loki' + - job_name: 'ktpv-apps01_node-exporter' sample_limit: 50000 static_configs: - - targets: ['loki:3100'] + - targets: ['10.249.84.41:9060'] + + # Loki metrics + # - job_name: 'loki' + # sample_limit: 50000 + # static_configs: + # - targets: ['loki:3100'] # Grafana metrics - job_name: 'grafana' @@ -47,7 +59,7 @@ scrape_configs: - targets: ['grafana:3000'] # Alloy metrics - - job_name: 'alloy' - sample_limit: 50000 - static_configs: - - targets: ['alloy:12345'] + # - job_name: 'alloy' + # sample_limit: 50000 + # static_configs: + # - targets: ['alloy:12345'] diff --git a/docker-compose.yml b/docker-compose.yml index f96fd4d..07b1a95 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,40 +24,39 @@ services: - ./config/provisioning/alerting:/etc/grafana/provisioning/alerting - ./config/dashboards:/var/lib/grafana/dashboards depends_on: - - loki - prometheus restart: unless-stopped networks: - monitoring - loki: - image: grafana/loki:latest - container_name: loki - ports: - - "9020:3100" - volumes: - - ./config/loki.yml:/etc/loki/local-config.yaml - - loki-data:/var/loki - restart: unless-stopped - networks: - - monitoring + # loki: + # image: grafana/loki:latest + # container_name: loki + # ports: + # - "9020:3100" + # volumes: + # - ./config/loki.yml:/etc/loki/local-config.yaml + # - loki-data:/var/loki + # restart: unless-stopped + # networks: + # - monitoring - alloy: - image: grafana/alloy:latest - container_name: grafana-alloy - ports: - - "9030:12345" - volumes: - - ./config/alloy.conf:/etc/alloy/config.alloy - - alloy-data:/var/lib/alloy/data - command: - - run - - --server.http.listen-addr=0.0.0.0:12345 - - --storage.path=/var/lib/alloy/data - - /etc/alloy/config.alloy - restart: unless-stopped - networks: - - monitoring + # alloy: + # image: grafana/alloy:latest + # container_name: grafana-alloy + # ports: + # - "9030:12345" + # volumes: + # - ./config/alloy.conf:/etc/alloy/config.alloy + # - alloy-data:/var/lib/alloy/data + # command: + # - run + # - --server.http.listen-addr=0.0.0.0:12345 + # - --storage.path=/var/lib/alloy/data + # - /etc/alloy/config.alloy + # restart: unless-stopped + # networks: + # - monitoring # AlertManager for handling alerts alertmanager: