Strange behavior http with -precision ms and ns


it’s not really a problem just something weird or i’m seeing it wrong.

But if i write data to InfluxDB through a http post and i set my precision on ns it writes the 2 highest lines, but if i set my precision on ms it writes the lowest line (which has more data and the extra zero’s it produces you get the ns format). It should be the other way around and i double checked the data.

The command i use is the following:

Btw if i don’t set a precision it store it also like the 2 at top.

Kind regards,

The precision url parameter indicates the units of the included timestamps - it does not truncate or round. This can be a little confusing. When you use ms you are saying there are 160164594846 milliseconds since the start of the epoch for your data point. All timestamps are represented internally as nanoseconds.

So if i understand correctly. If i give a timestamp in ms but i set my precision in ns then influxdb thinks that there are only 160164594846 ns instead of ms. So the 2 lines above has the wrong timestamp?

Oke now it makes sense thanks for the reply.