diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxProperties.java index 0706c305ef15..94898d5645ec 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxProperties.java @@ -57,6 +57,21 @@ public class InfluxProperties extends StepRegistryProperties { */ private String retentionPolicy; + /** + * Time period for which influx should retain data in the current database (e.g. 2h, 52w) + */ + private String retentionDuration; + + /** + * How many copies of the data are stored in the cluster. Must be 1 for a single node instance. + */ + private Integer retentionReplicationFactor; + + /** + * The time range covered by a shard group (e.g. 2h, 52w). + */ + private String retentionShardDuration; + /** * URI of the Influx server. */ @@ -137,4 +152,27 @@ public void setAutoCreateDb(boolean autoCreateDb) { this.autoCreateDb = autoCreateDb; } + public String getRetentionDuration() { + return retentionDuration; + } + + public void setRetentionDuration(String retentionDuration) { + this.retentionDuration = retentionDuration; + } + + public Integer getRetentionReplicationFactor() { + return retentionReplicationFactor; + } + + public void setRetentionReplicationFactor(Integer retentionReplicationFactor) { + this.retentionReplicationFactor = retentionReplicationFactor; + } + + public String getRetentionShardDuration() { + return retentionShardDuration; + } + + public void setRetentionShardDuration(String retentionShardDuration) { + this.retentionShardDuration = retentionShardDuration; + } } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxPropertiesConfigAdapter.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxPropertiesConfigAdapter.java index e5145d3cfdf5..1b8713348a43 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxPropertiesConfigAdapter.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxPropertiesConfigAdapter.java @@ -60,6 +60,24 @@ public String retentionPolicy() { InfluxConfig.super::retentionPolicy); } + @Override + public Integer retentionReplicationFactor() { + return get(InfluxProperties::getRetentionReplicationFactor, + InfluxConfig.super::retentionReplicationFactor); + } + + @Override + public String retentionDuration() { + return get(InfluxProperties::getRetentionDuration, + InfluxConfig.super::retentionDuration); + } + + @Override + public String retentionShardDuration() { + return get(InfluxProperties::getRetentionShardDuration, + InfluxConfig.super::retentionShardDuration); + } + @Override public String uri() { return get(InfluxProperties::getUri, InfluxConfig.super::uri); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/signalfx/SignalFxPropertiesConfigAdapter.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/signalfx/SignalFxPropertiesConfigAdapter.java index 721c1a52d8a5..a3feda0fe635 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/signalfx/SignalFxPropertiesConfigAdapter.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/signalfx/SignalFxPropertiesConfigAdapter.java @@ -32,6 +32,7 @@ public class SignalFxPropertiesConfigAdapter public SignalFxPropertiesConfigAdapter(SignalFxProperties properties) { super(properties); + accessToken(); // validate that an access token is set } @Override diff --git a/spring-boot-project/spring-boot-dependencies/pom.xml b/spring-boot-project/spring-boot-dependencies/pom.xml index 5962b5f55ba7..4efd056f8191 100644 --- a/spring-boot-project/spring-boot-dependencies/pom.xml +++ b/spring-boot-project/spring-boot-dependencies/pom.xml @@ -122,7 +122,7 @@ 1.2.3 1.16.22 2.2.5 - 1.0.5 + 1.0.6 2.15.0 1.7.1 3.6.4