This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Influxdb logging intervals
#1
I have three measurements logging to Influxdb as shown here:

   

The problem is that if I look at the timestamps in data explorer the interval I've selected does not match what I am seeing in the database. It seems that  whatever I select, the actual logging frequency is rounded to the nearest multiple of 4 minutes.

For instance temperature, I select 10m but logging happens every 8 minutes
For humidity, I select 15m but the logging happens every 16 minutes
For pressure, I select 10 seconds just as a test and logging happens every 4 minutes.

   

   

   

I can't see what I am doing wrong or perhaps I am misunderstanding it.

Is this working as designed?

Pi4
OPV3 64 bit
Influxdb v2.7.8
Reply
#2
Please ignore the above. I have come across an anomaly I need to investigate further.
Reply
#3
thanks for debugging that.
Reply
#4
OK I see what's going on now, importantly there is no bug. The anomaly arises from a feature of the Data Explorer.

When viewing and downloading data from Influxdb's Data Explorer, even though you select "raw" data, what is shown is not actually the raw data. It is by default aggregated over a period which can be set in the Explorer page. I was selecting data for a 24 hour period and as you can see here, the default Window Period is automatically set to 4 minutes. That accounts for the multiples of 4 minutes issue I was seeing. That means that the data is aggregated over each 4m period and the timestamps are modified accordingly.

   


If I select a custom value below 4 minutes, say 5 seconds then again the aggregation takes place but as it's below the frequency of sampling is doesn't distort the timestamp so much.

These three show the same data with different timestamps, the first with data downloaded using Explorer with a 4 minute window period. Here the data is timestamped at each 16 minutes (4 times 4 minutes) when I am actually sampling every 15 minutes.

   

The second picture shows the data with a window period of 5 seconds. Here the timestamps are at 15 minute intervals which is what I have set in OP but they are rounded to around 15 minutes and 5 seconds due to the aggregation function.

   

The third picture shows the data as downloaded not via Explorer but from the CLI so it is not subject to any aggregation. Here it shows the timestamps at around 15 minutes which is what I set up. This is the true raw data, the other two are not true raw data despite that being selected in Explorer, it's manipulated.

   

So if you want real raw data download it from the CLI. You don't lose any data points when downloading from Explorer so it may not be an issue but if accurate timestamps are important then beware of the issue and select a Window Period less than your sampling period.

The issue is mentioned here:
https://github.com/influxdata/influxdb/issues/23771
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)