Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When exporting data, Start date for RRDfile does not match start date of first data row #3533

Closed
trytrytogo opened this issue May 4, 2020 · 12 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@trytrytogo
Copy link

trytrytogo commented May 4, 2020

Cacti 1.2.10
Centos 7.2
Mysql:mysql Ver 15.1 Distrib 10.4.12-MariaDB
rrdtool:RRDtool 1.7.2
i exported Previous month datas. i saw the "start time",it's wrong. it's start at 2020/4/1 0:10:00.

Snipaste_2020-05-04_11-43-01
Snipaste_2020-05-04_11-42-21

it's a bug or new change?
can you help me to reslove it. thanks.

@trytrytogo trytrytogo added bug Undesired behaviour unverified Some days we don't have a clue labels May 4, 2020
@netniV
Copy link
Member

netniV commented May 4, 2020

I'm slightly confused because your filters suggest at 00:00 not 00:10, was that a typo?

@trytrytogo
Copy link
Author

I'm slightly confused because your filters suggest at 00:00 not 00:10, was that a typo?

i select from "Previous month",it means the start date is 00:00, the first point should start at 00:05,
but it's first point started at 00:10,and not 00:05.

the end point is errors too.

@TheWitness
Copy link
Member

The real issue here is that the dates are set when you first insert into the RRDfile. So, for example, you could get a daily RRA that has a timestamp that is not midnight, but say 2:00am or 4:00am, etc.

The way we do this is that at create time always initilize the first date:

rrdtool create some_rrd.rrd  --start 0 ...

The important part is "--start 0". Right now, that is not being done. Easy fix.

@TheWitness
Copy link
Member

There is not much we can do about files that have already been created. You might consider using the splice_rrd.php function in the cli directory, but it'll take a long time to complete.

@TheWitness TheWitness added this to the 1.2.13 milestone May 5, 2020
@TheWitness TheWitness changed the title error start date Start date for RRDfile is different between RRDfile in a Cacti install May 5, 2020
@trytrytogo
Copy link
Author

There is not much we can do about files that have already been created. You might consider using the splice_rrd.php function in the cli directory, but it'll take a long time to complete.

thanks your replies. all cacti has same problems?

@TheWitness
Copy link
Member

As far as I can tell. Looks like it was introduced post Cacti 1.x. Before it was never being set. I have a patch ready. Just waiting on the call to see where it should go.

TheWitness added a commit that referenced this issue May 5, 2020
Start date for RRDfile is different between RRDfile in a Cacti install
@TheWitness TheWitness added resolved A fixed issue and removed unverified Some days we don't have a clue labels May 5, 2020
@TheWitness
Copy link
Member

This has been fixed. If you are on 1.2.12, you can pull the files directly from the 1.2.x branch.

@trytrytogo
Copy link
Author

This has been fixed. If you are on 1.2.12, you can pull the files directly from the 1.2.x branch.

thanks,i will have a try to test it . thanks.

@trytrytogo
Copy link
Author

This has been fixed. If you are on 1.2.12, you can pull the files directly from the 1.2.x branch.

it's ok. thanks all person. @netniV @TheWitness

@trytrytogo
Copy link
Author

i install a new cacti(1.2.12) on an old server( it' installed cacti.1.2.10), i exported Previous month datas.
the start time is 2020/4/1 0:10:00.
The new 1.2.x branch need to have a new installed rrdtool? @TheWitness

@netniV
Copy link
Member

netniV commented May 5, 2020

The fix above will be in the next release it is not in .12

If you want that fix you need to apply it either manually or download the latest sources from the 1.2.X branch

@trytrytogo
Copy link
Author

thanks all.
i hope to the next veriosn to fix those problems.

@netniV netniV changed the title Start date for RRDfile is different between RRDfile in a Cacti install When exporting data, Start date for RRDfile does not match start date of first data row Jul 12, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants