Skip to content

Commit

Permalink
fix graphite listener payload serialization (fixes #415)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlo Cabanilla committed Mar 19, 2013
1 parent 56990e1 commit a3ee658
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ddagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from tornado.options import define, parse_command_line, options

# agent import
from util import Watchdog, get_uuid, get_hostname
from util import Watchdog, get_uuid, get_hostname, json
from emitter import http_emitter, format_body
from config import get_config
from checks.check_status import ForwarderStatus
Expand Down Expand Up @@ -330,7 +330,8 @@ def _postMetrics(self):
self._metrics['uuid'] = get_uuid()
self._metrics['internalHostname'] = get_hostname(self._agentConfig)
self._metrics['apiKey'] = self._agentConfig['api_key']
MetricTransaction(self._metrics, {})
MetricTransaction(json.dumps(self._metrics),
headers={'Content-Type': 'application/json'})
self._metrics = {}

def run(self):
Expand Down

0 comments on commit a3ee658

Please sign in to comment.