Subject: | Wrong creation of archived data points leads to nonsense data on charts |
Hi, a year ago, I have started collecting data with RRD and used this
tool to create my RRD files. Now I need to tune my RRD and somehow
think, that the RRD contains wrong data. Moreover I recall, that charts
for 7 days do not show peaks, that I can see on 28 days chart - and this
is strange.
I have used this code to create my RRDs:
my $creator = new RRDTool::Creator::DayPDP(-step => "1h");
... many DS added ....
$creator->add(-CF => "LAST");
$creator->add_RRA(-duration => "week");
$creator->add_RRA(-duration => "month");
$creator->add_RRA(-duration => "year");
Using rrdtool info we can see, the reason, why 7 days chart hides peaks
- it stores data every 7 hours and keeps 24 samples. This crosses
boundaries of days. On monthly bases it is slightly better - it takes 30
hours and makes 24 points - the numbers are close to it, but it will
skew it too. And yearly view is crazy too - it takes 15 days and stores
24 values. I would understand if it took a point every week or every
month, but 15 days is not expected.
I think that it needs a refactoring which would change the interface so
that people can understand what actually will be stored - for instance:
$creator->add_RRA(-point-every => "day", -keep-for = "month");
$creator->add_RRA(-point-every => "month", -keep-for = "year");
$creator->add_RRA(-point-every => "year", -keep-for = "10years");
Best regards,
Ondrej