Can you maybe string.format the value to always have a fixed number of decimal places when encoding for influx?
2015年6月12日金曜日、David Birdsong<[email protected] <javascript:_e(%7B%7D,'cvml','[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

