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
9b215df4
Commit
9b215df4
authored
Feb 06, 2018
by
Jon Schneider
Committed by
Stephane Nicoll
Feb 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add influx property to govern whether db is auto-created or not
parent
29b29e7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
InfluxProperties.java
...autoconfigure/metrics/export/influx/InfluxProperties.java
+12
-0
InfluxPropertiesConfigAdapter.java
.../metrics/export/influx/InfluxPropertiesConfigAdapter.java
+4
-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 @
9b215df4
...
@@ -67,6 +67,11 @@ public class InfluxProperties extends StepRegistryProperties {
...
@@ -67,6 +67,11 @@ public class InfluxProperties extends StepRegistryProperties {
*/
*/
private
Boolean
compressed
;
private
Boolean
compressed
;
/**
* Check if Influx database exists before attempting to publish metrics to it, creating it if it does not exist.
*/
private
Boolean
autoCreateDb
;
public
String
getDb
()
{
public
String
getDb
()
{
return
this
.
db
;
return
this
.
db
;
}
}
...
@@ -123,4 +128,11 @@ public class InfluxProperties extends StepRegistryProperties {
...
@@ -123,4 +128,11 @@ public class InfluxProperties extends StepRegistryProperties {
this
.
compressed
=
compressed
;
this
.
compressed
=
compressed
;
}
}
public
Boolean
getAutoCreateDb
()
{
return
this
.
autoCreateDb
;
}
public
void
setAutoCreateDb
(
Boolean
autoCreateDb
)
{
this
.
autoCreateDb
=
autoCreateDb
;
}
}
}
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxPropertiesConfigAdapter.java
View file @
9b215df4
...
@@ -70,4 +70,8 @@ class InfluxPropertiesConfigAdapter extends
...
@@ -70,4 +70,8 @@ class InfluxPropertiesConfigAdapter extends
return
get
(
InfluxProperties:
:
getCompressed
,
InfluxConfig
.
super
::
compressed
);
return
get
(
InfluxProperties:
:
getCompressed
,
InfluxConfig
.
super
::
compressed
);
}
}
@Override
public
boolean
autoCreateDb
()
{
return
get
(
InfluxProperties:
:
getAutoCreateDb
,
InfluxConfig
.
super
::
autoCreateDb
);
}
}
}
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