Skip to content

Commit

Permalink
[auto-discovery][jmx] write SD pipe terminator.
Browse files Browse the repository at this point in the history
[auto-discovery] typo in terminator.
  • Loading branch information
truthbk committed Jul 11, 2017
1 parent 110f469 commit 6033c5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
JMX_GRACE_SECS = 2
SERVICE_DISCOVERY_PREFIX = 'SD-'
SD_CONFIG_SEP = "#### SERVICE-DISCOVERY ####\n"
SD_CONFIG_TERM = "#### SERVICE-DISCOVERY TERM ####\n"

DEFAULT_SUPERVISOR_SOCKET = '/opt/datadog-agent/run/datadog-supervisor.sock'
DEFAULT_COLLECTOR_PROFILE_INTERVAL = 20
Expand Down Expand Up @@ -450,6 +451,7 @@ def _submit_jmx_service_discovery(self, jmx_sd_configs):
# will block if len(buffer) > OS pipe buffer.
# JMX will unblock when it reads on the other end.
os.write(self.sd_pipe, buffer)
os.write(self.sd_pipe, SD_CONFIG_TERM)
except Exception as e:
log.exception("unable to submit YAML via pipe: %s", e)
else:
Expand Down

0 comments on commit 6033c5a

Please sign in to comment.