aboutsummaryrefslogtreecommitdiffstats
path: root/cps-application/src
diff options
context:
space:
mode:
Diffstat (limited to 'cps-application/src')
-rw-r--r--cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java5
-rw-r--r--cps-application/src/main/resources/application.yml7
-rw-r--r--cps-application/src/test/groovy/org/onap/cps/config/MicroMeterConfigSpec.groovy2
3 files changed, 8 insertions, 6 deletions
diff --git a/cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java b/cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java
index 8481eadf1b..6782669db2 100644
--- a/cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java
+++ b/cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java
@@ -28,6 +28,7 @@ import io.micrometer.core.instrument.Gauge;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.binder.MeterBinder;
import lombok.RequiredArgsConstructor;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -36,7 +37,7 @@ import org.springframework.context.annotation.Configuration;
public class MicroMeterConfig {
private static final String STATE_TAG = "state";
- private static final String CM_HANDLE_STATE_GAUGE = "cmHandlesByState";
+ private static final String CM_HANDLE_STATE_GAUGE = "cps_ncmp_inventory_cm_handles_by_state";
final IMap<String, Integer> cmHandlesByState;
@Bean
@@ -45,11 +46,13 @@ public class MicroMeterConfig {
}
@Bean
+ @ConditionalOnProperty("cps.monitoring.micrometer-jvm-extras")
public MeterBinder processMemoryMetrics() {
return new ProcessMemoryMetrics();
}
@Bean
+ @ConditionalOnProperty("cps.monitoring.micrometer-jvm-extras")
public MeterBinder processThreadMetrics() {
return new ProcessThreadMetrics();
}
diff --git a/cps-application/src/main/resources/application.yml b/cps-application/src/main/resources/application.yml
index 0b5d59ecc9..6eb9e108be 100644
--- a/cps-application/src/main/resources/application.yml
+++ b/cps-application/src/main/resources/application.yml
@@ -106,6 +106,7 @@ app:
cm-subscription-dmi-out: ${CM_SUBSCRIPTION_DMI_OUT_TOPIC:dmi-ncmp-cm-avc-subscription}
cm-subscription-ncmp-out: ${CM_SUBSCRIPTION_NCMP_OUT_TOPIC:subscription-response}
cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events}
+ inventory-events-topic: ncmp-inventory-events
lcm:
events:
topic: ${LCM_EVENTS_TOPIC:ncmp-events}
@@ -152,6 +153,8 @@ security:
password: ${CPS_PASSWORD:cpsr0cks!}
cps:
+ monitoring:
+ micrometer-jvm-extras: false
tracing:
sampler:
jaeger_remote:
@@ -245,10 +248,6 @@ ncmp:
trust-level:
dmi-availability-watchdog-ms: 30000
- modules-sync-watchdog:
- async-executor:
- parallelism-level: 10
-
model-loader:
maximum-attempt-count: 20
diff --git a/cps-application/src/test/groovy/org/onap/cps/config/MicroMeterConfigSpec.groovy b/cps-application/src/test/groovy/org/onap/cps/config/MicroMeterConfigSpec.groovy
index b9302ccd72..faef32b04b 100644
--- a/cps-application/src/test/groovy/org/onap/cps/config/MicroMeterConfigSpec.groovy
+++ b/cps-application/src/test/groovy/org/onap/cps/config/MicroMeterConfigSpec.groovy
@@ -53,7 +53,7 @@ class MicroMeterConfigSpec extends Specification {
objectUnderTest.deletedCmHandles(simpleMeterRegistry)
then: 'each state has the correct value when queried'
['ADVISED', 'READY', 'LOCKED', 'DELETING', 'DELETED'].each { state ->
- def gaugeValue = simpleMeterRegistry.get('cmHandlesByState').tag('state',state).gauge().value()
+ def gaugeValue = simpleMeterRegistry.get(objectUnderTest.CM_HANDLE_STATE_GAUGE).tag('state',state).gauge().value()
assert gaugeValue == 1
}
}