|
|
| Author |
Message |
Guest
|
Posted: Mon Sep 23, 2002 8:26 am Post subject: Design problem |
|
|
Cacti seems to store a number of characteristics of the RRA files in its SQL DB. IMO, this is really problematic as the same characteristics are also stored in the RRA files themselves.
A number of reasons may lead to these two sets to diverge and be inconsistent which then leads to more problems/headaches.
This shouldn't be done this way, unless there is a real good reason for it, but generally there is no good reason for having 2 authoritative sources for the same data. |
|
| Back to top |
|
 |
bulek Cacti Pro User
Joined: 20 May 2002 Posts: 852 Location: Poland
|
Posted: Mon Sep 23, 2002 10:26 am Post subject: |
|
|
Having RRA settings duplicated in SQL DB has some advantages:
Reading settings is much quicker from SQL than parsing RRD file for the same info
SQL stored info allows for restoring RRA file structure in case of broken or deleted RRA files
Of course one has to ensure good synchronization (i.e. if you change something in SQL then this should be written to RRA).
- bulek |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Sep 23, 2002 11:10 am Post subject: |
|
|
| bulek wrote: | Having RRA settings duplicated in SQL DB has some advantages:
.... |
i don't believe these advantages outweigh the problems i'm facing right now. But then again, some compromise (where the data is duplicated but consistency enforced as well!) could certainly be found if speed is such an issue. |
|
| Back to top |
|
 |
yid Cacti User
Joined: 20 Apr 2002 Posts: 83
|
Posted: Fri Sep 27, 2002 4:55 pm Post subject: |
|
|
The RRAs are in SQL because that's how we determine how many graphs to make, and what time ranges to make them, both actions happen in the graph_image.php. I think those are the only two things (let me know if I'm missing something).
Getting this information out of the RRD file instead can certainly be done.
The questions are:
* Do we want the graph_image.php to look at the RRD file for RRAs everytime, or do we want another mechanism to check occaisionally
* If the answer is occaisionally, what process runs the counter that decides when to check for RRAs
Once those two questions are answered, I don't think it would be difficult to bang it out. You could even write a simple cron job to check the RRAs every so often. |
|
| Back to top |
|
 |
|