Skip to content

Commit

Permalink
[auto-discovery][jmx] handle missing launch file exception
Browse files Browse the repository at this point in the history
  • Loading branch information
truthbk committed Jul 17, 2017
1 parent 25f7acd commit 3411289
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,12 @@ def run(self, config=None):
self._agentConfig).crawl_config_template()

# JMXFetch restarts should prompt reload
jmx_launch = JMXFetch._get_jmx_launchtime()
if self.last_jmx_piped and self.last_jmx_piped < jmx_launch:
self.sd_backend.reload_check_configs = True
try:
jmx_launch = JMXFetch._get_jmx_launchtime()
if self.last_jmx_piped and self.last_jmx_piped < jmx_launch:
self.sd_backend.reload_check_configs = True
except OSError as e:
log.debug("could not stat JMX lunch file: %s", e)

except Exception as e:
log.warn('Something went wrong while looking for config template changes: %s' % str(e))
Expand Down

0 comments on commit 3411289

Please sign in to comment.