Skip to content

Commit

Permalink
[jmxfetch] Pass value of bind_host to JMXFetch command
Browse files Browse the repository at this point in the history
  • Loading branch information
olivielpeau committed Mar 21, 2016
1 parent f76fe9d commit 0fa2f40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jmxfetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,10 @@ def get_configuration(cls, confd_path, checks_list=None):
return (jmx_checks, invalid_checks, java_bin_path, java_options, tools_jar_path, custom_jar_paths)

def _start(self, path_to_java, java_run_opts, jmx_checks, command, reporter, tools_jar_path, custom_jar_paths, redirect_std_streams):
statsd_port = self.agentConfig.get('dogstatsd_port', "8125")
if reporter is None:
reporter = "statsd:%s" % str(statsd_port)
statsd_host = self.agentConfig.get('bind_host', 'localhost')
statsd_port = self.agentConfig.get('dogstatsd_port', "8125")
reporter = "statsd:%s:%s" % (statsd_host, statsd_port)

log.info("Starting jmxfetch:")
try:
Expand Down

0 comments on commit 0fa2f40

Please sign in to comment.