Plot metrics for each cps-and-ncmp instance separately in Grafana 43/139643/2
authorhalil.cakal <halil.cakal@est.tech>
Wed, 4 Dec 2024 10:12:02 +0000 (10:12 +0000)
committerhalil.cakal <halil.cakal@est.tech>
Wed, 4 Dec 2024 11:04:27 +0000 (11:04 +0000)
- assing port range to cps-and-ncmp service to plot metrics
   separately

Issue-ID: CPS-2536

Change-Id: Ic097017bbcca25f28341e8e77f658a0a4e8964d7
Signed-off-by: halil.cakal <halil.cakal@est.tech>
docker-compose/config/endurance.env
docker-compose/config/prometheus.yml
docker-compose/docker-compose.yml

index 0ca1a11..be33721 100644 (file)
@@ -3,6 +3,7 @@ DB_PORT=5433
 
 NGINX_CONTAINER_NAME=endurance-nginx-loadbalancer
 CPS_CORE_PORT=8884
+CPS_PORT_RANGE=8798-8799
 
 ZOOKEEPER_CONTAINER_NAME=endurance-zookeeper
 ZOOKEEPER_PORT=2182
index e1aa476..8db07c8 100644 (file)
@@ -3,7 +3,7 @@ global:
   evaluation_interval: 5s
 
 scrape_configs:
-- job_name: 'cps-and-ncmp'
+- job_name: 'cps-and-ncmp-kpi'
   metrics_path: '/actuator/prometheus'
   scrape_interval: 5s
   static_configs:
@@ -11,4 +11,13 @@ scrape_configs:
     # - 'docker-compose-cps-and-ncmp-1:8080'
     # - 'docker-compose-cps-and-ncmp-2:8080'
     - targets:
-      - 'cps-and-ncmp:8080'
\ No newline at end of file
+      - '172.17.0.1:8698'
+      - '172.17.0.1:8699'
+
+- job_name: 'cps-and-ncmp-endurance'
+  metrics_path: '/actuator/prometheus'
+  scrape_interval: 5s
+  static_configs:
+    - targets:
+        - '172.17.0.1:8798'
+        - '172.17.0.1:8799'
\ No newline at end of file
index ae34fc3..604cfe9 100644 (file)
@@ -49,6 +49,8 @@ services:
 
   cps-and-ncmp:
     image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-and-ncmp:${CPS_VERSION:-latest}
+    ports:
+      - ${CPS_PORT_RANGE:-8698-8699}:8080
     environment:
       CPS_USERNAME: ${CPS_CORE_USERNAME:-cpsuser}
       CPS_PASSWORD: ${CPS_CORE_PASSWORD:-cpsr0cks!}