Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
ecb8da25
Commit
ecb8da25
authored
Jul 24, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Upgrade to Micrometer 1.0.6"
Closes gh-13819
parent
f478911c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
26 deletions
+40
-26
InfluxProperties.java
...autoconfigure/metrics/export/influx/InfluxProperties.java
+31
-26
InfluxPropertiesTests.java
...onfigure/metrics/export/influx/InfluxPropertiesTests.java
+6
-0
appendix-application-properties.adoc
...cs/src/main/asciidoc/appendix-application-properties.adoc
+3
-0
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxProperties.java
View file @
ecb8da25
...
...
@@ -58,17 +58,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)
* Time period for which Influx should retain data in the current database. For
* instance 7d, check the influx documentation for more details on the duration
* format.
*/
private
String
retentionDuration
;
/**
* How many copies of the data are stored in the cluster. Must be 1 for a single node instance.
* 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).
* Time range covered by a shard group. For instance 2w, check the influx
* documentation for more details on the duration format.
*/
private
String
retentionShardDuration
;
...
...
@@ -128,6 +132,30 @@ public class InfluxProperties extends StepRegistryProperties {
this
.
retentionPolicy
=
retentionPolicy
;
}
public
String
getRetentionDuration
()
{
return
this
.
retentionDuration
;
}
public
void
setRetentionDuration
(
String
retentionDuration
)
{
this
.
retentionDuration
=
retentionDuration
;
}
public
Integer
getRetentionReplicationFactor
()
{
return
this
.
retentionReplicationFactor
;
}
public
void
setRetentionReplicationFactor
(
Integer
retentionReplicationFactor
)
{
this
.
retentionReplicationFactor
=
retentionReplicationFactor
;
}
public
String
getRetentionShardDuration
()
{
return
this
.
retentionShardDuration
;
}
public
void
setRetentionShardDuration
(
String
retentionShardDuration
)
{
this
.
retentionShardDuration
=
retentionShardDuration
;
}
public
String
getUri
()
{
return
this
.
uri
;
}
...
...
@@ -152,27 +180,4 @@ public class InfluxProperties extends StepRegistryProperties {
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
;
}
}
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxPropertiesTests.java
View file @
ecb8da25
...
...
@@ -39,6 +39,12 @@ public class InfluxPropertiesTests extends StepRegistryPropertiesTests {
assertThat
(
properties
.
getUserName
()).
isEqualTo
(
config
.
userName
());
assertThat
(
properties
.
getPassword
()).
isEqualTo
(
config
.
password
());
assertThat
(
properties
.
getRetentionPolicy
()).
isEqualTo
(
config
.
retentionPolicy
());
assertThat
(
properties
.
getRetentionDuration
())
.
isEqualTo
(
config
.
retentionDuration
());
assertThat
(
properties
.
getRetentionReplicationFactor
())
.
isEqualTo
(
config
.
retentionReplicationFactor
());
assertThat
(
properties
.
getRetentionShardDuration
())
.
isEqualTo
(
config
.
retentionShardDuration
());
assertThat
(
properties
.
getUri
()).
isEqualTo
(
config
.
uri
());
assertThat
(
properties
.
isCompressed
()).
isEqualTo
(
config
.
compressed
());
assertThat
(
properties
.
isAutoCreateDb
()).
isEqualTo
(
config
.
autoCreateDb
());
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
View file @
ecb8da25
...
...
@@ -1371,7 +1371,10 @@ content into your application. Rather, pick only the properties that you need.
management.metrics.export.influx.num-threads=2 # Number of threads to use with the metrics publishing scheduler.
management.metrics.export.influx.password= # Login password of the Influx server.
management.metrics.export.influx.read-timeout=10s # Read timeout for requests to this backend.
management.metrics.export.influx.retention-duration= # Time period for which Influx should retain data in the current database.
management.metrics.export.influx.retention-shard-duration= # Time range covered by a shard group.
management.metrics.export.influx.retention-policy= # Retention policy to use (Influx writes to the DEFAULT retention policy if one is not specified).
management.metrics.export.influx.retention-replication-factor= # How many copies of the data are stored in the cluster.
management.metrics.export.influx.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.influx.uri=http://localhost:8086 # URI of the Influx server.
management.metrics.export.influx.user-name= # Login user of the Influx server.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment