
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.