mozilla-services / heka

DEPRECATED: Data collection and processing made easy.
http://hekad.readthedocs.org/
Other
3.4k stars 531 forks source link

added support for 'replace_dot_with' flag in ES encoders #1947

Closed jxstanford closed 8 years ago

jxstanford commented 8 years ago

This PR adds a new replace_dots_with parameter to ESJsonEncoder and ESLogstashV0Encoder. The parameter value is a string that will be substituted for all . characters in all keys of the unmarshalled JSON value found in the message Payload. Tests have been updated accordingly.

Here is an example encoder config:

[ESJsonEncoder]
index = "gke-%{Logger}-%{%Y.%m.%d}"
es_index_from_timestamp = false
type_name = "%{Type}"
replace_dots_with = "_"

Closes: #1946

rafrombrc commented 8 years ago

Thanks for your contribution. In addition to the inline comment I made, you'll want to update the documentation (see esjson.rst and eslogstashv0.rst files in the docs/source/config/encoders folder) and add an entry to the CHANGES.txt changelog.

jxstanford commented 8 years ago

@rafrombrc no problem. really excited about working with Heka. all comments addressed...

rafrombrc commented 8 years ago

Great, thanks!