On Thu, Jun 11, 2015 at 3:14 PM Mat Schaffer <[email protected]> wrote:

> Can you maybe string.format the value to always have a fixed number of
> decimal places when encoding for influx?
>

unfortunately not. both integers and floats are flowing through this
encoder.

i was hoping to open up this encoder plus the steps to set it up in case
others might benefit, but we're probably going to have to lean on luajit
and a different json module to make this work. the libraries are all
internal, not necessarily secret, but for sure a barrier to sharing w/
others since build steps would be required and another repo of ours would
have to be pilfered and made ready for public consumption.


>
> 2015年6月12日金曜日、David Birdsong<[email protected]>さんは書きました:
>
>> I set out to convert a stream of json objects that are plumbed to my
>> shiny new influxdb 9.0 cluster and reached for my favorite tool: heka.
>>
>> Influxdb 9.0 RC32 and later want a new line protocol specific to Influx.
>> I as thinking that I would keep the original json format around until the
>> last hop before writing to influx as a useful data exposition format that
>> other tools could read ie. heka and friends of heka.
>>
>> Given that the new line protocol needs string representations of numbers
>> to infer types, lua is really screwing me here:
>>
>> > print(cjson.encode(6.0))
>>
>> 6
>>
>>
>> Influx won't take a row that was originally typed as a float if it sees
>> an integer next. Any suggestions?
>>
>>
>
> --
>
> -Mat
>
> about.me/matschaffer
>
>
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to