Graphics are gone...

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Graphics are gone...

Post by TheGrudge »

Hi,

I moved cacti to a new server and into a new folder. Then I installed the database backup and put all rrd files into the new folder.
But after logging into cacti, all my graphics were gone.

I realized that all rrd files were put into a database table called "poller_item" with its absolute path (/srv/www/htdocs/cacti/rra/bla.rrd).
So I edited my dump with a text editor and changed the paths
/srv/www/htdocs/ -> /home/httpd/html/,
after that I reinstalled the database dump and again: no graphics!
Image

If I click on the link representing the graphic, it works:
Image

If I try to zoom one of these graphics, its gone again:
Image

But one thing is even stranger:
If I go to the graphics management tab, the graph can be seen and it is even updated by the poller:
Image

So what is wrong? I need those graphics in the graph tree or my boss will kill me!
8)
warnesj
Cacti User
Posts: 173
Joined: Sun May 29, 2005 7:34 pm

Post by warnesj »

You ran into what I ran into when I moved between servers. For each data source the location of the RRA files is in the poller_item table in a field called rrd_path. You need to modify that rrd_path field for each item in the poller_item table. The way I did it for my install was export the Cacti database (using mysqldump) and then using VI I did a search for all instances of my old path and replaced it with my new path. Then I imported the new data and wholla! Everything started working again. But don't modify your original dump file!! Use a copy (just in case everything goes to crap).
User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Post by TheGrudge »

Hmmm, that is exactly what I did but it doesn't work so I started this thread... (all described in my first post) ;-)
warnesj
Cacti User
Posts: 173
Joined: Sun May 29, 2005 7:34 pm

Post by warnesj »

Ah, you want me to completely read your post. ;) LOL. Sorry about that.

The broken images, if you right-click on the image what are it's properties? Is the URL right?
User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Post by TheGrudge »

These are the properties:
Image

The strange thing is that if I click on the picture url I get some graphics like described before...
warnesj
Cacti User
Posts: 173
Joined: Sun May 29, 2005 7:34 pm

Post by warnesj »

If you go to that URL for the image, does it show up? If not, is there an entry in your httpd error_log file that says what may have happened?

This is a dumb question, but could it be your memory_limit setting in your php.ini file? But I'm grasping at straws here.
User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Post by TheGrudge »

hmm whats wrong here...? my post is gone...
Last edited by TheGrudge on Tue Feb 27, 2007 5:54 pm, edited 2 times in total.
User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Post by TheGrudge »

If I go to
http://10.49.1.10/cacti/graph.php?actio ... rra_id=all
I get the graphs shown above:
Image

If I go to
http://10.49.1.10/cacti/graph_image.php ... 1172616496
I get the following:
The image cannot be displayed, because it contains errors.
User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Post by TheGrudge »

I created a new device, still the same problem: I can see the graph in "graph management", but not in the graph tree view... I don't get it.
User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Post by TheGrudge »

Ok, found something:

If I use the regular link, I get an error:
http://10.49.1.10/cacti/graph_image.php ... 1172621443

But if I delete the variables graph_start and graph_end, I can see the graph:
http://10.49.1.10/cacti/graph_image.php ... _type=tree

So what can this mean?
warnesj
Cacti User
Posts: 173
Joined: Sun May 29, 2005 7:34 pm

Post by warnesj »

Is the time right on your server and on your workstation? The "graph_start" and "graph_end" numbers are epoch times, so my guess is that either your server or your workstation is asking for times that one or the other doesn't have yet. But again, totally guessing. :)
User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Post by TheGrudge »

I'm running a timeserver (ntpd) on the server, time is correct... :cry:

I've installed the official patches now because one patch fixes some issue with displaying the thumbnail graphics, but this doesn't solve my problem either.

Cacti doesn't seem to work if I set a start and end time, whatever time that is.
User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Post by TheGrudge »

Could it be that my database dump is responsible for that?
The server the dump was taken from was shutdown 1 day ago so between the last run on the old server and the first run on the new one there is a 1 day period. Could this broke my cacti installation?
User avatar
TheGrudge
Posts: 37
Joined: Tue Feb 27, 2007 12:51 pm

Post by TheGrudge »

Hmmm I started Cacti with a fresh database and reinstalled my database dump... still the same... my boss is not amused :-(

The only solution I found is leaving the fields "from" and "to" blank:
Image

But this is no solution, because I can't zoom the graphs... :(
warnesj
Cacti User
Posts: 173
Joined: Sun May 29, 2005 7:34 pm

Post by warnesj »

TheGrudge wrote:I'm running a timeserver (ntpd) on the server, time is correct...
Darn. :( It was worth a try.

Come to think about it, I ran into something similar in this post (http://forums.cacti.net/viewtopic.php?t=18524), but my end result had to do with the way I created a CDEFs and how it reacted the timespan at the top of the tree-view page. If I had no times in there, or manually chose times from a little while ago then I had prober numeric values in my counters, otherwise I kept getting zero's as values.

From my post to test my theory I modified the /cacti/include/html/inc_timespan_settings.php file and changed one line. I changed

Code: Select all

$timespan["end_now"] = time();
to

Code: Select all

$timespan["end_now"] = time() - 300;
When I made that change my numbers started working. For the hell of it do you want to try and make a similar change and see what the results are? If it works then I still am thinking you're dealing with a time issue. Not sure what it could be since the default time spans are set by the Cacti server when you view the Tree View page.

But see what that does and we'll see what we can do. It's most definately not a permanent solution if it works, but it might lead us into what the root problem could be.
TheGrudge wrote:Could it be that my database dump is responsible for that?
I don't think so. Because I've done the same thing on other servers that you've done and haven't had an issue (once I knew to modify the rrd_path field in the poller_item table).
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests