Merge remote-tracking branch 'origin/Development' into Development

This commit is contained in:
George Kalampokis 2021-12-07 17:16:41 +02:00
commit 0a39e64f9a
2 changed files with 8 additions and 1 deletions

View File

@ -107,7 +107,10 @@ public class MetricsManager {
{MetricNames.DMP_WITH_GRANT, Gauge.build().name(MetricNames.DMP_WITH_GRANT).help("Number of Grants based on the status of the DMP that is using them").labelNames("status").register(registry.getPrometheusRegistry())},
{MetricNames.NEXUS + MetricNames.DMP_WITH_GRANT, Gauge.build().name(MetricNames.NEXUS + MetricNames.DMP_WITH_GRANT).help("Number of Grants based on the status of the DMP that is using them during Nexus").labelNames("status").register(registry.getPrometheusRegistry())}
{MetricNames.NEXUS + MetricNames.DMP_WITH_GRANT, Gauge.build().name(MetricNames.NEXUS + MetricNames.DMP_WITH_GRANT).help("Number of Grants based on the status of the DMP that is using them during Nexus").labelNames("status").register(registry.getPrometheusRegistry())},
{MetricNames.INSTALLATIONS, Gauge.build().name(MetricNames.INSTALLATIONS).help("Number of Installations").register(registry.getPrometheusRegistry())},
{MetricNames.NEXUS + MetricNames.INSTALLATIONS, Gauge.build().name(MetricNames.NEXUS + MetricNames.INSTALLATIONS).help("Number of Installations").register(registry.getPrometheusRegistry())},
}).collect(Collectors.toMap(data -> (String)data[0], data -> (Gauge) data[1]));
@ -172,6 +175,9 @@ public class MetricsManager {
long files = Files.list(Paths.get(this.environment.getProperty("userguide.path"))).count();
calculateValue(MetricNames.LANGUAGES, (int) files, null);
calculateValue(MetricNames.INSTALLATIONS, 1, null);
calculateValue(MetricNames.NEXUS + MetricNames.INSTALLATIONS, 1, null);
logger.info("Metrics calculation Completed");
}

View File

@ -2,6 +2,7 @@ package eu.eudat.types;
public class MetricNames {
public static final String DATASET_TEMPLATE = "argos_dataset_templates";
public static final String INSTALLATIONS = "installations";
public static final String USERS = "argos_users";
public static final String DMP = "argos_managed_dmps";
public static final String DATASET = "argos_managed_dataset_descriptions";