0

I don't think it's a bug but it's tough to find the correct answer on the Internet to understand what's happening. So I create an RRD(1minute step) database with 3 RRAs:

RRA:AVERAGE:0.5:1m:1d
RRA:AVERAGE:0.5:1h:6M
RRA:AVERAGE:0.5:1d:1y

So I assume when I update the data point I should have the capability to save 1-year data. However, I can see 24 hours data only whenever long I emit the data points to the RRD database.

This is the rrdtool info output from one RRD database I created: https://gist.github.com/meow-watermelon/206a10a83c937c771f6cfc5fa7a2e948

Is there anything I missed or any unknown corner cases that I hit which caused only 24 hours data is shown?

Thanks.

1 Answers1

0

The RRA consolodated data points (cdp) are only written to the RRA when there are sufficient to make one. Thus, with a 1-minute interval, and an xff of 0.5, you would need to be collecting data every minute for more than 12 hours (plus 1 minute!) to make up a full cdp.

In addition, the cdp update on boundaries relative to UCT; this means that for your largest 1d size RRA, you would need to have at least 12 hours of data collected in the 24 hours prior to 00:00 UCT, and then the next update would write the cdp.

This means that you should collect data at the standard interval (60s) for more than 24 hours before you can be certain of seeing your cdp appear in the largest-granularity RRA; the best test is to collect data every minute for 48 hours and then check your 1d-granularity RRA

Steve Shipway
  • 3,754
  • 3
  • 22
  • 39
  • Hi Steve, thanks for your reply. I checked 48 hours data but still can only see only 24 hours data. And this is the latest rrd file info dump: https://gist.github.com/meow-watermelon/5408c7b016de111fa279b4dd9cab06b6. Clearly there's no data update. So my more generic question is, does it mean for the second RRA ``` RRA:AVERAGE:0.5:1h:6M ``` it needs at least 3 months to show the data? But since my app is running for more than 48 hours already I should see more than 24 hours of data somewhere already, right? – meow-watermelon Aug 11 '22 at 04:42
  • Okay, I think this is an interesting issue. I use rrdtool dump to check the RRD file and it seems in the second RRA I do see hourly data stored: https://gist.github.com/meow-watermelon/95a5465fcacc38b5be19f656692ee205, which means there's data stored over 24 hours. Then the issue would be in the graph command I use. In my graph command I use start=end-5d and end=now but I didn't specify any step. Will that be the problem that it didn't show the over 24 hrs graph? Thanks. – meow-watermelon Aug 11 '22 at 06:11
  • I think this is what happened. For the 1st RRA I defined 24 hours which is working as I expected. For the 2nd one it needs at least 3 months data as valid because the xff I defined is 0.5 and so far the data is not accumulated in 3 months so the data is not available to plot in the graph. If I want to have "real" historical data I need to enlarge the 1st RRA to, say 3 months. – meow-watermelon Aug 11 '22 at 21:25
  • No, RRA are managed independently. there is no reason that one would not be written if another is not full. The xff is the fraction of the cdp that needs to have data for that cdp to be written, so if your cdp is 1-day granularity then you need to have 1-minute data for at least half a day before the cdp can be written. – Steve Shipway Aug 12 '22 at 10:44