Explitely run JmxFetch app as a daemon

This commit is contained in:
Luca Abbati 2019-07-03 15:24:51 +02:00
parent 2afc6069a8
commit 2027027e46
No known key found for this signature in database
GPG Key ID: 74DBB952D9BA17F2
2 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,7 @@ plugins {
apply from: "${rootDir}/gradle/java.gradle"
dependencies {
compile('com.datadoghq:jmxfetch:0.29.0'){
compile('com.datadoghq:jmxfetch:0.30.0--------------yet-to-be-released'){
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'log4j', module: 'log4j'
}

View File

@ -74,6 +74,8 @@ public class JMXFetch {
final AppConfig.AppConfigBuilder configBuilder =
AppConfig.builder()
.action(ImmutableList.of(ACTION_COLLECT))
// App should be run as daemon otherwise CLI apps would not exit once main method exits.
.daemon(true)
.confdDirectory(jmxFetchConfigDir)
.yamlFileList(jmxFetchConfigs)
.targetDirectInstances(true)