From 0fa2f40abc67edd7c3f62e1387e1dfb27e2f83ce Mon Sep 17 00:00:00 2001 From: Olivier Vielpeau Date: Mon, 21 Mar 2016 17:40:37 -0400 Subject: [PATCH] [jmxfetch] Pass value of `bind_host` to JMXFetch command --- jmxfetch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jmxfetch.py b/jmxfetch.py index 50072184c0..af048c5143 100644 --- a/jmxfetch.py +++ b/jmxfetch.py @@ -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: