commit | 03e98f936a626370f403c480436ab878e39189d1 | [log] [tgz] |
---|---|---|
author | Ilya Tyaptin <ityaptin@mirantis.com> | Wed May 17 18:05:13 2017 +0400 |
committer | Ilya Tyaptin <ityaptin@mirantis.com> | Thu May 18 15:52:07 2017 +0400 |
tree | 3fcd783e5f2a7f6a9028165bd525184cad208778 | |
parent | a07d251bc176bc072609225813a648ed221bf62a [diff] |
Prefer point timestamp in InfluxDB accumulator This commit implements of using point timestamp, if it exists, for InfluxDB records. Earlier, we used timestamp of Heka message. Change-Id: Ib830ada5659799ab7ff3bb80fd5ec00942805290
diff --git a/heka/files/lua/filters/influxdb_accumulator.lua b/heka/files/lua/filters/influxdb_accumulator.lua index 470bdef..9bdeec8 100644 --- a/heka/files/lua/filters/influxdb_accumulator.lua +++ b/heka/files/lua/filters/influxdb_accumulator.lua
@@ -111,9 +111,10 @@ point.tags[k] = v end end + accumulator:append( encoder:encode_datapoint( - msg_timestamp, + point["timestamp"] or msg_timestamp, point.name, point.value or point.values, point.tags))