All,
I accidentally deleted a device through the web interface (Yes, I'm stupid!). Fortunately I didn't delete the rrd files. I also had a MySQL dump file from the night before (I guess I'm not THAT stupid!).
By doing diffs with dumps from the current Cacti database, I mostly restored the device. I can look at the device's graphs, and see that it is updating again (there is, alas, a gap from while I was trying to restore it). I can change time scale of the graphs and see that all my old data is there. But I still managed to break something.
When I click on a graph for that device, the page that is supposed to show graphs over several time periods opens (day, week, month, year), but the no graphs don't appear. It still works for other devices. There must be a database problem, but I can't find it. Would someone with an understanding of Cacti's internals point me in the right direction?
Thanks,
Rich
Trying to repair Cacti database
Moderators: Developers, Moderators
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
First, I wouldn't "restore" the individual records.... Bad idea.
What I would do is recreate the device and overwrite the existing RRD's over the new RRD's for that device.
What I would do is recreate the device and overwrite the existing RRD's over the new RRD's for that device.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
I've already done the restore, and it pretty much worked. I really can't afford to loose the historical data. The data is there. I need to figure out what how those to restore those particular graphs to the web page.
Your idea of recreating the device (and all 20 graphs) sounds tedious, but likely to work. I'll probably do it that way, but I'd really like to know how the database determines the creations of these graphs. Is the schema documented anywhere?
Your idea of recreating the device (and all 20 graphs) sounds tedious, but likely to work. I'll probably do it that way, but I'd really like to know how the database determines the creations of these graphs. Is the schema documented anywhere?
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
I've taken a look at the rrdtool commands that generates the missing graphs and found things like:
/usr/local/rrdtool/bin/rrdtool graph - \
> --imgformat=PNG \
> --start=1114006386 \
> --end=1114006196 \
....
Note that the start time is greater than the end time. Does any one know where/how these numbers are generated? Why does th problem only afffect this device?
/usr/local/rrdtool/bin/rrdtool graph - \
> --imgformat=PNG \
> --start=1114006386 \
> --end=1114006196 \
....
Note that the start time is greater than the end time. Does any one know where/how these numbers are generated? Why does th problem only afffect this device?
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
/boggle
Um....
Can you export and email me you cacti database?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Rony,
Do you really want my whole Cacti database? it 120kb compressed.
I've gone through the process of copying the rrd files onto my recreated device, and it's all working smoothly. Thanks for the help!
Rich
P.S. It sounds lame, but I'll ask my boss before I can release the database. It's got propriatary info, network topology, and stuff.
Do you really want my whole Cacti database? it 120kb compressed.
I've gone through the process of copying the rrd files onto my recreated device, and it's all working smoothly. Thanks for the help!
Rich
P.S. It sounds lame, but I'll ask my boss before I can release the database. It's got propriatary info, network topology, and stuff.
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Not lame, very good policy.P.S. It sounds lame, but I'll ask my boss before I can release the database. It's got propriatary info, network topology, and stuff.
If you fixed it, no... But if that bug was created from something you did in the interface, I would be curious to see. Otherwise, no..
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Who is online
Users browsing this forum: No registered users and 1 guest