Changes to make the forwarder work.

This commit is contained in:
Tim Kuhlman 2014-04-28 09:02:05 -06:00
parent 1eb4561af4
commit 050c206a69
4 changed files with 8 additions and 18 deletions

View File

@ -114,6 +114,8 @@ def _unix_config_path():
path = os.path.join('/etc/dd-agent', DATADOG_CONF)
if os.path.exists(path):
return path
elif os.path.exists('./%s' % DATADOG_CONF):
return './%s' % DATADOG_CONF
raise PathNotFound(path)
@ -231,9 +233,6 @@ def get_config(parse_args=True, cfg_path=None, options=None):
else:
agentConfig['use_web_info_page'] = True
# Which API key to use
agentConfig['api_key'] = config.get('Main', 'api_key')
# local traffic only? Default to no
agentConfig['non_local_traffic'] = False
if config.has_option('Main', 'non_local_traffic'):

View File

@ -219,7 +219,7 @@ class Forwarder(tornado.web.Application):
self._agentConfig = agentConfig
self._metrics = {}
MetricTransaction.set_application(self)
api_endpoint = MonAPI(agentConfig)
api_endpoint = MonAPI(agentConfig['Api'])
MetricTransaction.set_endpoints(api_endpoint)
self._tr_manager = TransactionManager(MAX_WAIT_FOR_REPLAY,
MAX_QUEUE_SIZE, THROTTLING_DELAY)

View File

@ -36,11 +36,10 @@ source:
mkdir -p $(ROOT)
cp -r $(SRC)/monagent/checks $(ROOT)/
cp -r $(SRC)/monagent/dogstream $(ROOT)/
cp -r $(SRC)/monagent/pup $(ROOT)/
cp -r $(SRC)/monagent/checks.d $(ROOT)/
cp -r $(SRC)/conf.d $(ROOT)/
cp -r $(SRC)/monagent/resources $(ROOT)/
cp -r $(SRC)/monagent/mon_lib $(ROOT)/
cp -r $(SRC)/monagent/api $(ROOT)/
cp -r $(SRC)/monagent/*.py $(ROOT)/
cp -r $(SRC)/LICENSE* $(ROOT)/
cp -r $(SRC)/datadog.conf.example $(ROOT)/
@ -61,10 +60,10 @@ install_base: source
cp -r $(ROOT)/* $(BUILD)/usr/share/datadog/agent/
cp $(ROOT)/datadog.conf.example $(BUILD)/etc/dd-agent
cp -r $(ROOT)/conf.d/* $(BUILD)/etc/dd-agent/conf.d/
cp -r $(ROOT)/mon_lib/mon_mapping.json $(BUILD)/etc/dd-agent/
cp -r $(ROOT)/api/mapping.json $(BUILD)/etc/dd-agent/
# Install the common executables.
ln -sf ../share/datadog/agent/dogstatsd.py $(BUILD)/usr/bin/dogstatsd
ln -sf ../share/datadog/agent/agent.py $(BUILD)/usr/bin/dd-agent
ln -sf ../share/datadog/agent/collector.py $(BUILD)/usr/bin/dd-agent
chmod 755 $(BUILD)/usr/bin/dogstatsd
chmod 755 $(BUILD)/usr/bin/dd-agent
chmod 755 $(BUILD)/var/log/mon-agent
@ -72,7 +71,7 @@ install_base: source
install_full: source
# Install the forwarder.
mkdir -p $(BUILD)/usr/bin
ln -sf ../share/datadog/agent/ddagent.py $(BUILD)/usr/bin/dd-forwarder
ln -sf ../share/datadog/agent/forwarder.py $(BUILD)/usr/bin/dd-forwarder
chmod 755 $(BUILD)/usr/bin/dd-forwarder
# =====================

View File

@ -38,13 +38,5 @@ redirect_stderr=true
priority=998
startsecs=3
[program:pup]
command=python pup/pup.py
exitcodes=0
stdout_logfile=pup.log
redirect_stderr=true
priority=998
startsecs=1
[group:datadog-agent]
programs=forwarder,collector,dogstatsd,pup
programs=forwarder,collector,dogstatsd