no message

This commit is contained in:
Diamantis Tziotzios 2021-12-06 15:32:38 +02:00
parent de4c430d91
commit 197de17aa5
2 changed files with 7 additions and 0 deletions

View File

@ -109,6 +109,9 @@ public class MetricsManager {
{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])); }).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(); long files = Files.list(Paths.get(this.environment.getProperty("userguide.path"))).count();
calculateValue(MetricNames.LANGUAGES, (int) files, null); calculateValue(MetricNames.LANGUAGES, (int) files, null);
calculateValue(MetricNames.INSTALLATIONS, 1, null);
calculateValue(MetricNames.NEXUS + MetricNames.INSTALLATIONS, 1, null);
logger.info("Metrics calculation Completed"); logger.info("Metrics calculation Completed");
} }

View File

@ -2,6 +2,7 @@ package eu.eudat.types;
public class MetricNames { public class MetricNames {
public static final String DATASET_TEMPLATE = "argos_dataset_templates"; 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 USERS = "argos_users";
public static final String DMP = "argos_managed_dmps"; public static final String DMP = "argos_managed_dmps";
public static final String DATASET = "argos_managed_dataset_descriptions"; public static final String DATASET = "argos_managed_dataset_descriptions";