From 27979cf989b6767b2a328a5b9b3c7ad93eb11c0c Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Tue, 28 Nov 2023 13:45:25 +0000 Subject: Add policy participant in prometheus configuration Issue-ID: POLICY-4891 Change-Id: I9dc733ed8680302f19d6a029592911f987e83e92 Signed-off-by: FrancescoFioraEst --- .../resources/config/PolicyParticipantParameters.yaml | 4 ++-- .../components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml | 2 +- helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml | 2 +- helm/prometheus/resources/prometheus.yml | 9 +++++++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml b/helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml index 3d0a0a5a..713105bc 100644 --- a/helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml +++ b/helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml @@ -115,13 +115,13 @@ participant: management: endpoints: web: + base-path: / exposure: include: health, metrics, prometheus server: - port: 8085 + port: 6969 servlet: context-path: /onap/policyparticipant ssl: enabled: false - diff --git a/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml b/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml index 2717f986..0924d445 100644 --- a/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml +++ b/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml @@ -102,7 +102,7 @@ spec: command: ["/opt/app/policy/clamp/bin/policy-participant.sh"] args: ["/opt/app/policy/clamp/etc/mounted/PolicyParticipantParameters.yaml"] ports: - - containerPort: 8085 + - containerPort: 6969 name: http-api # disable liveness probe when breakpoints set in debugger # so K8s doesn't restart unresponsive container diff --git a/helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml b/helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml index 37f5244c..bb7be33c 100644 --- a/helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml +++ b/helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml @@ -75,7 +75,7 @@ service: useNodePortExt: true ports: name: http-api - port: 8085 + port: 6969 nodePort: 42 flavor: small diff --git a/helm/prometheus/resources/prometheus.yml b/helm/prometheus/resources/prometheus.yml index 70041c97..04451de3 100644 --- a/helm/prometheus/resources/prometheus.yml +++ b/helm/prometheus/resources/prometheus.yml @@ -94,3 +94,12 @@ scrape_configs: basic_auth: username: "runtimeUser" password: "zb!XztG34" + + - job_name: "acm-participant-metrics" + metrics_path: "/onap/policyparticipant/prometheus" + static_configs: + - targets: + - "policy-clamp-ac-pf-ppnt:6969" + basic_auth: + username: "participantUser" + password: "zb!XztG34" -- cgit 1.2.3-korg