diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusProperties.java index f467a24833a5..792aa629c16c 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusProperties.java @@ -20,7 +20,6 @@ import java.util.HashMap; import java.util.Map; -import org.springframework.boot.actuate.metrics.export.prometheus.PrometheusPushGatewayManager.ShutdownOperation; import org.springframework.boot.context.properties.ConfigurationProperties; /** @@ -45,12 +44,6 @@ public class PrometheusProperties { */ private boolean descriptions = true; - /** - * Configuration options for using Prometheus Pushgateway, allowing metrics to be - * pushed when they cannot be scraped. - */ - private final Pushgateway pushgateway = new Pushgateway(); - /** * Additional properties to pass to the Prometheus client. */ @@ -85,123 +78,8 @@ public void setEnabled(boolean enabled) { this.enabled = enabled; } - public Pushgateway getPushgateway() { - return this.pushgateway; - } - public Map getProperties() { return this.properties; } - /** - * Configuration options for push-based interaction with Prometheus. - */ - public static class Pushgateway { - - /** - * Enable publishing over a Prometheus Pushgateway. - */ - private Boolean enabled = false; - - /** - * Base URL for the Pushgateway. - */ - private String baseUrl = "http://localhost:9091"; - - /** - * Login user of the Prometheus Pushgateway. - */ - private String username; - - /** - * Login password of the Prometheus Pushgateway. - */ - private String password; - - /** - * Frequency with which to push metrics. - */ - private Duration pushRate = Duration.ofMinutes(1); - - /** - * Job identifier for this application instance. - */ - private String job; - - /** - * Grouping key for the pushed metrics. - */ - private Map groupingKey = new HashMap<>(); - - /** - * Operation that should be performed on shutdown. - */ - private ShutdownOperation shutdownOperation = ShutdownOperation.NONE; - - public Boolean getEnabled() { - return this.enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - public String getBaseUrl() { - return this.baseUrl; - } - - public void setBaseUrl(String baseUrl) { - this.baseUrl = baseUrl; - } - - public String getUsername() { - return this.username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return this.password; - } - - public void setPassword(String password) { - this.password = password; - } - - public Duration getPushRate() { - return this.pushRate; - } - - public void setPushRate(Duration pushRate) { - this.pushRate = pushRate; - } - - public String getJob() { - return this.job; - } - - public void setJob(String job) { - this.job = job; - } - - public Map getGroupingKey() { - return this.groupingKey; - } - - public void setGroupingKey(Map groupingKey) { - this.groupingKey = groupingKey; - } - - public ShutdownOperation getShutdownOperation() { - return this.shutdownOperation; - } - - public void setShutdownOperation(ShutdownOperation shutdownOperation) { - this.shutdownOperation = shutdownOperation; - } - - } - }