mozilla-services / heka

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

Support sending multiple fields per line to InfluxDB #1919

Closed karouf closed 1 year ago

karouf commented 8 years ago

As described in InfluxDB docs, the line protocol supports sending multiple fields in one line. When you have multiple values sharing the same measurement, tags and timestamp, sending them all at once ca speed up things.

This PR adds a config option to the Schema InfluxDB Line Encoder and the InfluxDB Batch Filter. If multi_fields is false, the behavior is the same as before. But if it's set to true, all fields that are not skipped will be used as fields with their corresponding values in the line sent to InfluxDB. multi_fields defaults to false.

If, for example, we want to send the fields free and used for a measurement memory, with multi_fields set to false, the lines sent would look like:

free value=858993459 1434932024
used value=3435973836 1434932024

But with multi_fields set to true, there would be only one line:

memory free=858993459,used=3435973836 1434932024

memory would need to be set as the name_prefix.