changes in the response format
This commit is contained in:
parent
7743f944d9
commit
a41d39e974
|
@ -46,6 +46,7 @@ public class MetricsService {
|
||||||
@Scheduled(cron = "0 0 0 * * ?")
|
@Scheduled(cron = "0 0 0 * * ?")
|
||||||
private void calculateMetrics() {
|
private void calculateMetrics() {
|
||||||
logger.info("Calculating metrics...");
|
logger.info("Calculating metrics...");
|
||||||
|
System.out.println("Calculating metrics...");
|
||||||
Metrics metrics = new Metrics();
|
Metrics metrics = new Metrics();
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,13 @@ public class PrometheusMetricsFormatter {
|
||||||
private enum PrometheusMetrics {
|
private enum PrometheusMetrics {
|
||||||
RECORDS("# TYPE explore_total_records gauge\nexplore_total_records %s"),
|
RECORDS("# TYPE explore_total_records gauge\nexplore_total_records %s"),
|
||||||
PUBLICATIONS("# TYPE explore_records gauge\nexplore_records{type=\"publications\"} %s"),
|
PUBLICATIONS("# TYPE explore_records gauge\nexplore_records{type=\"publications\"} %s"),
|
||||||
DATASETS("# TYPE explore_total_datasets gauge\nexplore_records{type=\"datasets\"} %s"),
|
DATASETS("explore_records{type=\"datasets\"} %s"),
|
||||||
SOFTWARE("# TYPE explore_total_software gauge\nexplore_records{type=\"explore_total_software\"} %s"),
|
SOFTWARE("explore_records{type=\"software\"} %s"),
|
||||||
ORP("# TYPE explore_total_otherresearchproducts gauge\nexplore_records{type=\"otherresearchproducts\"} %s"),
|
ORP("explore_records{type=\"otherresearchproducts\"} %s"),
|
||||||
FUNDERS("# TYPE explore_total_funders gauge\nexplore_total_funders %s"),
|
FUNDERS("# TYPE explore_total_funders gauge\nexplore_total_funders %s"),
|
||||||
PROJECTS("#TYPE explore_total_projects gauge\nexplore_total_projects %s"),
|
PROJECTS("# TYPE explore_total_projects gauge\nexplore_total_projects %s"),
|
||||||
CONTENT_PROVIDERS("#TYPE explore_total_contentproviders gauge\nexplore_total_contentproviders %s"),
|
CONTENT_PROVIDERS("# TYPE explore_total_contentproviders gauge\nexplore_total_contentproviders %s"),
|
||||||
ORGANIZATIONS("#TYPE explore_total_organizations gauge \nexplore_total_organizations %s");
|
ORGANIZATIONS("# TYPE explore_total_organizations gauge \nexplore_total_organizations %s");
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
PrometheusMetrics(String value) {
|
PrometheusMetrics(String value) {
|
||||||
|
|
Loading…
Reference in New Issue