{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-services/heka/issues/1574","labels_url":"https://api.github.com/repos/mozilla-services/heka/issues/1574/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-services/heka/issues/1574/comments","events_url":"https://api.github.com/repos/mozilla-services/heka/issues/1574/events","html_url":"https://github.com/mozilla-services/heka/pull/1574","id":89198564,"number":1574,"title":"Update Schema InfluxDB Write Encoder to use InfluxDB 0.9.x+ line protocol","user":{"login":"acesaro","id":236515,"avatar_url":"https://avatars.githubusercontent.com/u/236515?v=3","gravatar_id":"","url":"https://api.github.com/users/acesaro","html_url":"https://github.com/acesaro","followers_url":"https://api.github.com/users/acesaro/followers","following_url":"https://api.github.com/users/acesaro/following{/other_user}","gists_url":"https://api.github.com/users/acesaro/gists{/gist_id}","starred_url":"https://api.github.com/users/acesaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acesaro/subscriptions","organizations_url":"https://api.github.com/users/acesaro/orgs","repos_url":"https://api.github.com/users/acesaro/repos","events_url":"https://api.github.com/users/acesaro/events{/privacy}","received_events_url":"https://api.github.com/users/acesaro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-18T04:48:38Z","updated_at":"2015-06-19T02:26:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla-services/heka/pulls/1574","html_url":"https://github.com/mozilla-services/heka/pull/1574","diff_url":"https://github.com/mozilla-services/heka/pull/1574.diff","patch_url":"https://github.com/mozilla-services/heka/pull/1574.patch"},"body":"This PR updates the Schema InfluxDB Write Encoder to format metrics into the line protocol instead of the JSON format that was originally proposed for the 0.9.0 release.  This also makes sure that proper formatting is done for the various fields to escape spaces, commas and double quotes as defined by the line protocol.  There is also a somewhat hacky implementation to overcome the fact that Lua converts float values of 0.0 into an integer based on its internal representation of numerical data types.  I've also added a couple of new configuration items that provide more flexibility in the naming of measurements as they are sent to InfluxDB.  There is now more emphasis on utilizing tags instead of the Graphite style \"paths\" to uniquely identify series, so the defaults have been blanked out to work with this recommendation more naturally."},"comment":{"url":"https://api.github.com/repos/mozilla-services/heka/issues/comments/113344664","html_url":"https://github.com/mozilla-services/heka/pull/1574#issuecomment-113344664","issue_url":"https://api.github.com/repos/mozilla-services/heka/issues/1574","id":113344664,"user":{"login":"acesaro","id":236515,"avatar_url":"https://avatars.githubusercontent.com/u/236515?v=3","gravatar_id":"","url":"https://api.github.com/users/acesaro","html_url":"https://github.com/acesaro","followers_url":"https://api.github.com/users/acesaro/followers","following_url":"https://api.github.com/users/acesaro/following{/other_user}","gists_url":"https://api.github.com/users/acesaro/gists{/gist_id}","starred_url":"https://api.github.com/users/acesaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acesaro/subscriptions","organizations_url":"https://api.github.com/users/acesaro/orgs","repos_url":"https://api.github.com/users/acesaro/repos","events_url":"https://api.github.com/users/acesaro/events{/privacy}","received_events_url":"https://api.github.com/users/acesaro/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T02:26:17Z","updated_at":"2015-06-19T02:26:17Z","body":"I started thinking about this a bit more and this encoder is very similar to functionality that I've been wanting to build for Graphite formatted metrics to send to Carbon.  I've actually already implemented it by adding a boolean config variable `carbon_line_format` and some if statements to just format the same data differently (and skip tag generation steps that aren't relevant).\r\n\r\nWhat are some thoughts about shifting the focus of this encoder to a common InfluxDB/Carbon line protocol encoder rather than copying most of the script and trimming it down for Carbon only?  Perhaps move some of the common functionality int a lua module instead and then have the two encoders reference common functions with that and be trimmed down to the essentials within them?"}}