From a643ad58e5cc071bb18dce455780dbad4fc48659 Mon Sep 17 00:00:00 2001 From: Jose Henrique Date: Sat, 7 Jun 2025 14:21:16 -0300 Subject: [PATCH] changing monitoring ports to 6xxx family --- docker-compose.yaml | 17 +++++++++-------- .../provisioning/datasources/datasources.yaml | 4 ++-- monitoring/loki-config.yaml | 6 +++--- monitoring/prometheus.yml | 4 ++-- monitoring/promtail-config.yaml | 4 ++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index c30f790..c3c343e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -106,8 +106,8 @@ services: # ────────────────────── container_name: opencand_loki restart: unless-stopped ports: - - "127.0.0.1:3100:3100" - - "10.8.0.3:3100:3100" + - "127.0.0.1:6100:3100" + - "10.8.0.3:6100:3100" command: -config.file=/etc/loki/local-config.yaml volumes: - ./monitoring/loki-config.yaml:/etc/loki/local-config.yaml @@ -131,14 +131,15 @@ services: # ────────────────────── command: -config.file=/etc/promtail/config.yml depends_on: - loki + # Prometheus - Metrics collection prometheus: image: prom/prometheus:v2.45.0 container_name: opencand_prometheus restart: unless-stopped ports: - - "127.0.0.1:9090:9090" - - "10.8.0.3:9090:9090" + - "127.0.0.1:6090:9090" + - "10.8.0.3:6090:9090" command: - "--config.file=/etc/prometheus/prometheus.yml" - "--storage.tsdb.path=/prometheus" @@ -156,8 +157,8 @@ services: # ────────────────────── container_name: opencand_node_exporter restart: unless-stopped ports: - - "127.0.0.1:9100:9100" - - "10.8.0.3:9100:9100" + - "127.0.0.1:6100:9100" + - "10.8.0.3:6100:9100" volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro @@ -173,8 +174,8 @@ services: # ────────────────────── container_name: opencand_grafana restart: unless-stopped ports: - - "127.0.0.1:3000:3000" - - "10.8.0.3:3000:3000" + - "127.0.0.1:6000:3000" + - "10.8.0.3:6000:3000" environment: - GF_SECURITY_ADMIN_PASSWORD=admin - GF_USERS_ALLOW_SIGN_UP=false diff --git a/monitoring/grafana/provisioning/datasources/datasources.yaml b/monitoring/grafana/provisioning/datasources/datasources.yaml index 6cb888c..aab29db 100644 --- a/monitoring/grafana/provisioning/datasources/datasources.yaml +++ b/monitoring/grafana/provisioning/datasources/datasources.yaml @@ -4,7 +4,7 @@ datasources: - name: Loki type: loki access: proxy - url: http://loki:3100 + url: http://loki:6100 isDefault: false jsonData: maxLines: 1000 @@ -12,5 +12,5 @@ datasources: - name: Prometheus type: prometheus access: proxy - url: http://prometheus:9090 + url: http://prometheus:6090 isDefault: true diff --git a/monitoring/loki-config.yaml b/monitoring/loki-config.yaml index f63f155..21ded88 100644 --- a/monitoring/loki-config.yaml +++ b/monitoring/loki-config.yaml @@ -1,8 +1,8 @@ auth_enabled: false server: - http_listen_port: 3100 - grpc_listen_port: 9096 + http_listen_port: 6100 + grpc_listen_port: 6096 common: path_prefix: /loki @@ -34,7 +34,7 @@ schema_config: period: 24h ruler: - alertmanager_url: http://localhost:9093 + alertmanager_url: http://localhost:6093 # By default, Loki will send anonymous, but uniquely-identifiable usage and configuration # analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/ diff --git a/monitoring/prometheus.yml b/monitoring/prometheus.yml index 670cb30..30b1f5d 100644 --- a/monitoring/prometheus.yml +++ b/monitoring/prometheus.yml @@ -9,11 +9,11 @@ rule_files: scrape_configs: - job_name: 'prometheus' static_configs: - - targets: ['localhost:9090'] + - targets: ['localhost:6090'] - job_name: 'node-exporter' static_configs: - - targets: ['node-exporter:9100'] + - targets: ['node-exporter:6100'] - job_name: 'opencand-api' static_configs: diff --git a/monitoring/promtail-config.yaml b/monitoring/promtail-config.yaml index b276f4c..73d83f3 100644 --- a/monitoring/promtail-config.yaml +++ b/monitoring/promtail-config.yaml @@ -1,12 +1,12 @@ server: - http_listen_port: 9080 + http_listen_port: 6080 grpc_listen_port: 0 positions: filename: /tmp/positions.yaml clients: - - url: http://loki:3100/loki/api/v1/push + - url: http://loki:6100/loki/api/v1/push scrape_configs: # Docker container logs