summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hanrahan <daniel.hanrahan@est.tech>2024-10-10 09:53:47 +0000
committerGerrit Code Review <gerrit@onap.org>2024-10-10 09:53:47 +0000
commit0af02bffdb13debee6a65c803ba680bd921a3cdf (patch)
tree94a288a877371e808dc5cea4556c75eafb969938
parent99f4b02b6092bc9fbb22a797df2ab86731d35a15 (diff)
parent69bd654946ab5512aa282bc8b74b654d80bf5245 (diff)
Merge "Autodiscover cps-and-ncmp containers when load balancing"
-rw-r--r--docker-compose/config/nginx/nginx.conf4
-rw-r--r--docker-compose/config/prometheus.yml16
2 files changed, 10 insertions, 10 deletions
diff --git a/docker-compose/config/nginx/nginx.conf b/docker-compose/config/nginx/nginx.conf
index 7d6b997f77..6e9d102fed 100644
--- a/docker-compose/config/nginx/nginx.conf
+++ b/docker-compose/config/nginx/nginx.conf
@@ -21,9 +21,7 @@ http {
# Add more server entries here for scaling or load balancing
upstream cps-and-ncmp {
least_conn;
- server docker-compose-cps-and-ncmp-1:8080;
- ### DEBUG: Disable next line for easier debugging on 1 instance (see also docker-compose.yml)
- server docker-compose-cps-and-ncmp-2:8080;
+ server cps-and-ncmp:8080;
}
server {
diff --git a/docker-compose/config/prometheus.yml b/docker-compose/config/prometheus.yml
index 89af4a6800..e1aa4763d9 100644
--- a/docker-compose/config/prometheus.yml
+++ b/docker-compose/config/prometheus.yml
@@ -3,10 +3,12 @@ global:
evaluation_interval: 5s
scrape_configs:
- - job_name: 'cps-and-ncmp'
- metrics_path: '/actuator/prometheus'
- scrape_interval: 5s
- static_configs:
- - targets:
- - 'docker-compose-cps-and-ncmp-1:8080'
- - 'docker-compose-cps-and-ncmp-2:8080'
+- job_name: 'cps-and-ncmp'
+ metrics_path: '/actuator/prometheus'
+ scrape_interval: 5s
+ static_configs:
+ # If you want to inject Prometheus into particular containers, the targets should be provided similar to the following examples:
+ # - '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