Merge pull request #905 from DataDog/labbati/jmx-as-daemon

Run JmxFetch app as a daemon
This commit is contained in:
Luca Abbati 2019-07-15 08:18:09 -04:00 committed by GitHub
commit 5b3d4b8e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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'){
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)