Cactiusers.org


It is currently Tue Feb 07, 2012 5:30 pm




Post new topic Reply to topic  [ 5 posts ] 
 Realtime Viewer sorta working 
Author Message
New User

Joined: Fri Jun 19, 2009 10:07 pm
Posts: 8
Post Realtime Viewer sorta working
The realtime viewer works fine on graphing CPU and memory graphs but it will not graph interface traffic. The box pops up and starts counting down and a red X appears. I set the cache folder permissions to 777 with theuser apache and tried turning Axjax on and off. I tried using I.E. 7, 6 Google Chrome and Firefox all experience the same issue. I'm thinking something might be wrong with the snmp traffic template. Any help with this issue would be most appreicated.

--Ben Tyler


Attachments:
File comment: Error
err.JPG
err.JPG [ 23.73 KiB | Viewed 2531 times ]
File comment: Working graph memory
working.JPG
working.JPG [ 43.63 KiB | Viewed 2531 times ]
Tue Jan 26, 2010 10:25 am
New User

Joined: Thu Jan 28, 2010 9:45 am
Posts: 2
Post Re: Realtime Viewer sorta working
I spent few hours fighting the same issue. Now I read your post and it made me understand where the problem is, so I cannot flully solve the issue but I can suggest a workaround.
Looking at the Apache error log when an interface traffic realtime window is open, I can see errors like these:

Quote:
ERROR: I don't understand ': 41.8 KB\n' in command: 'COMMENT:Total In: 41.8 KB\n'.


If I open a realtime window for a CPU usage graph there's no error and the image appears, as you have reported.
So the difference is in the string printed below the graph: in the interface traffic graph a ":" is printed but it is not escaped in the php code, this is the mistake!
A quick workaround consists in modifyng the interface traffic graph templates adding an escape character: where you read "Total In:" it must be changed in "Total In\:".
But the mistake is in the plugin code. The graph_image_rt.php page checks the rrdtool version used: if it is "rrdtool-1.2.x" then an additional escape is added before ":" in the COMMENT string. You are probably using rrdtool-1.3.x as I am doing and it requires the additional escape, as 1.2.x, but the realtime code checks only if "rrdtool_version" is "rrd-1.2.x" and not "1.2.x or higher".
If you look at the graph_image_rt.php you can see where the "rrdtool_version" string is checked. As far as I can understand this string can have only 3 values: "rrdtool-1.0.x", "rrdtool-1.2.x" and "rrdtool-1.3.x" (you can verify looking at the cacti settings panel, where you select the rrdtool version installed). Since rrdtool manual states that beginning with rrdtool 1.2 you have to escape colons in COMMENT text, my suggestion is to modify the graph_image_rt.php so that the check is against release 1.0.x and if it is not matched then the escape is added.
So, in graph_image_rt.php find all lines with the following statement:

if (read_config_option("rrdtool_version") == "rrd-1.2.x") {

and change them to:

if (read_config_option("rrdtool_version") != "rrd-1.0.x") {

You will find many occurrencies of the first statement and not all of them are related to escaping the colon in COMMENT text, but I think you can change them all safely. In fact I suspect that this plugin wase made when rrdtool 1.3 wasn't still released and all what is made for rrdtool 1.2 should work in the same way with newer releases. I tested the modified page for few graphs with no problems.

I hope this could help other people and that the author of this plugin will soon publish a new patched release.


Thu Jan 28, 2010 10:48 am
New User

Joined: Thu Jan 28, 2010 9:45 am
Posts: 2
Post Re: Realtime Viewer sorta working
I have an update.

I have found that there is a new release of the realtime plugin on the cacti plugin site. In the "supported plugins" you can find version 0.4 that solves all the issues we have found.

http://docs.cacti.net/plugin:realtime#realtime


Fri Jan 29, 2010 2:54 am
New User

Joined: Fri Jun 19, 2009 10:07 pm
Posts: 8
Post Re: Realtime Viewer sorta working
Thanks again for your help. The update DID WORK !!!!! Everything is now graphing.


Fri Jan 29, 2010 11:47 am
New User

Joined: Mon Jun 07, 2010 10:28 am
Posts: 2
Post Re: Realtime Viewer sorta working
Hey folks. I'm running the latest version, but still getting the red 'x' for images. Not really sure where to look, I've created the cache directory and configured it under the Cacti Misc page for Realtime, everyone has access, yet I still get the red 'x'. Any ideas on where to look?


Attachments:
Prob.JPG
Prob.JPG [ 50.22 KiB | Viewed 2210 times ]
Tue Jun 08, 2010 7:47 am
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: