Skip to content

Commit

Permalink
[jmx] fix configuration name typo for jmx_restart_interval (DataDog…
Browse files Browse the repository at this point in the history
…#2898)

* [jmx] fix configuration name typo for `jmx_restart_interval`

* [reno][skip ci] updating release note for accuracy

* [jmx] actually print values in log line
  • Loading branch information
truthbk authored Jan 16, 2019
1 parent 1aebc81 commit d315aaf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func initConfig(config Config) {
config.BindEnvAndSetDefault("jmx_custom_jars", []string{})
config.BindEnvAndSetDefault("jmx_use_cgroup_memory_limit", false)
config.BindEnvAndSetDefault("jmx_max_restarts", int64(3))
config.BindEnvAndSetDefault("jmx_max_restart_interval", int64(5))
config.BindEnvAndSetDefault("jmx_restart_interval", int64(5))

// Go_expvar server port
config.BindEnvAndSetDefault("expvar_port", "5000")
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ api_key:
# Number of JMX restarts allowed in the restart-interval before giving up
# jmx_max_restarts: 3
#
# Duration of the restart interval in secons
# jmx_max_restart_interval: 5
# Duration of the restart interval in seconds
# jmx_restart_interval: 5
#
#
{{ end -}}
Expand Down
2 changes: 1 addition & 1 deletion pkg/jmxfetch/jmxfetch_nix.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (j *JMXFetch) Monitor() {
// stopTimes here will only start yielding values potentially <= ival _after_ the first
// maxRestarts attempts, which is fine and consistent.
if stopTimes[idx].Sub(stopTimes[oldestIdx]).Seconds() <= ival {
log.Errorf("Too many JMXFetch restarts (%v) in time interval (%vs) - giving up")
log.Errorf("Too many JMXFetch restarts (%v) in time interval (%vs) - giving up", maxRestarts, ival)
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
#
# Each section note must be formatted as reStructuredText.
---
enhancements:
- |
Adding process reaping for children in docker environments.
fixes:
- |
Reintroducing JMXFetch process management and healthcheck.
Reintroducing JMXFetch process lifecycle management on Linux.
Adding JMXFetch healthcheck for docker environments.

0 comments on commit d315aaf

Please sign in to comment.