|
|
| Author |
Message |
GZH
Joined: 02 Jul 2008 Posts: 1
|
|
| Back to top |
|
 |
gthe Cacti User
Joined: 29 Jul 2006 Posts: 113 Location: RU
|
Posted: Fri Jul 11, 2008 1:03 am Post subject: |
|
|
For fix error like this:
| Code: |
....
PHP Warning: include(./include/config.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 37
PHP Warning: include(): Failed opening './include/config.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 37
PHP Notice: Undefined variable: config in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 39
PHP Warning: include_once(/lib/snmp.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 39
PHP Warning: include_once(): Failed opening '/lib/snmp.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 39
PHP Notice: Undefined variable: config in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 40
....
|
Change cmd_rt.php and poller_rt.php:
before:
| Code: |
/* we are not talking to the browser */
$no_http_headers = true;
/* start initialization section */
chdir("../../");
if (file_exists("./include/global.php")) {
include("./include/global.php");
} else {
include("./include/config.php");
}
|
after:
| Code: |
/* we are not talking to the browser */
$no_http_headers = true;
/* start initialization section */
$dir = dirname(__FILE__);
chdir($dir);
if (strpos($dir, 'realtime') !== false) {
chdir('../../');
}
if (file_exists("./include/global.php")) {
include("./include/global.php");
} else {
include("./include/config.php");
}
|
|
|
| Back to top |
|
 |
gthe Cacti User
Joined: 29 Jul 2006 Posts: 113 Location: RU
|
Posted: Fri Jul 11, 2008 1:42 am Post subject: |
|
|
May be one more fix.
In my FF 3 realtime window don't open popup, but just like simple page.
I change setup.php, line 140:
before:
| Quote: | | echo "<a href='#' onclick=\"window.open('".$config['url_path']."plugins/realtime/graph_popup_rt.php?local_graph_id=".$local_graph_id."', 'popup_".$local_graph_id."', 'toolbar=no, menubar=no, location=no, scrollbars=no, statusbar=no, titlebar=no, width=650, height=350')\"><img src='".$config['url_path']."plugins/realtime/monitor_rt.gif' border='0' alt='Realtime' title='Realtime' style='padding: 3px;'></a><br/>"; |
after:
| Quote: | | echo "<a href='#' onclick=\"window.open('".$config['url_path']."plugins/realtime/graph_popup_rt.php?local_graph_id=".$local_graph_id."', 'popup_".$local_graph_id."', 'toolbar=no, menubar=no, location=no, scrollbars=no, statusbar=no, titlebar=no, dialog=yes, width=650, height=350')\"><img src='".$config['url_path']."plugins/realtime/monitor_rt.gif' border='0' alt='Realtime' title='Realtime' style='padding: 3px;'></a><br/>"; |
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Wed Jul 23, 2008 6:28 pm Post subject: |
|
|
Hmm, that's new. It seems to work on my ff3 box running on windows.
TheWitness
|
|
| Back to top |
|
 |
chrisgapske Cacti User
Joined: 22 May 2007 Posts: 268 Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL
|
Posted: Thu Aug 07, 2008 9:08 am Post subject: |
|
|
I have installed Realtime and created a temp dir giving RW access to all. when I go to the settings I can see that the DIR has been found.
The Realtime button does not show up .. But I can see in the plugin management it is there.
Any Idea.. I don't see any errors.
|
|
| Back to top |
|
 |
dononeil Cacti User
Joined: 06 Aug 2008 Posts: 72
|
Posted: Mon Aug 11, 2008 12:53 pm Post subject: |
|
|
I'm not able to get graphs to show up with v.34 (the official v.34) version under cacti 0.8.7b...
At one point it was working, and then I updated a bunch of libs, rrd, etc.. and it stopped working, but I don't know why. Everything else works great, just not the realtime.
Here are the symptoms:
You click on the realtime icon and the window comes up, but the graph is just a red X.
There are no files being generated in /cache - Cacti is being run as ROOT, and directory perms are 777 for debug.
When you run debug logging, alot of SQL queries are being made, and a call to rrdtool for the cache file that wasn't generated, no errors anywhere that looks obvious.
It seems that the issue is just that the cache files aren't being created, possibly due to a path issue? Here's the output from the apache logs:
PHP Warning: include(./include/config.php): failed to open stream: No such file or directory in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 32
PHP Warning: include(): Failed opening './include/config.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 32
PHP Notice: Undefined variable: config in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 34
PHP Warning: include_once(/lib/poller.php): failed to open stream: No such file or directory in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 34
PHP Warning: include_once(): Failed opening '/lib/poller.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 34
PHP Notice: Undefined variable: config in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 35
PHP Warning: include_once(/lib/data_query.php): failed to open stream: No such file or directory in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 35
PHP Warning: include_once(): Failed opening '/lib/data_query.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 35
PHP Notice: Undefined variable: config in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 36
PHP Warning: include_once(/lib/graph_export.php): failed to open stream: No such file or directory in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 36
PHP Warning: include_once(): Failed opening '/lib/graph_export.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 36
PHP Notice: Undefined variable: config in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 37
PHP Warning: include_once(/lib/rrd.php): failed to open stream: No such file or directory in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 37
PHP Warning: include_once(): Failed opening '/lib/rrd.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 37
PHP Fatal error: Call to undefined function read_config_option() in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 102
ERROR: opening '/www/cacti/cache/realtime_647_5.rrd': No such file or directory
Anyone have any clues?
|
|
| Back to top |
|
 |
dononeil Cacti User
Joined: 06 Aug 2008 Posts: 72
|
Posted: Mon Aug 11, 2008 1:12 pm Post subject: |
|
|
Ok... I fixed the path issue by changing the includes to be this:
if (file_exists("../../include/global.php")) {
include("../../include/global.php"); }
if (file_exists("../../include/config.php")) {
include("../../include/config.php"); }
However, the rrd files are still not being created in the cache directory:
PHP Fatal error: Call to undefined function read_config_option() in /srv/www/htdocs/cacti/plugins/realtime/poller_rt.php on line 102
ERROR: opening '/www/cacti/cache/realtime_647_5.rrd': No such file or directory
When I changed the other paths, I get that it can't find the libraries, so I hard coded the paths... now I get:
PHP Notice: Undefined variable: colors in /srv/www/htdocs/cacti/lib/graph_export.php on line 1741
PHP Fatal error: Call to undefined function read_config_option() in /srv/www/htdocs/cacti/lib/graph_export.php on line 1742
ERROR: opening '/www/cacti/cache/realtime_647_5.rrd': No such file or directory
Any thoughts where to go from here? The line 1741 is referencing $colors["header_panel"]. I have no idea where that is defined, or what it should be... Maybe this is a bug in Cacti?
|
|
| Back to top |
|
 |
gworg
Joined: 12 Aug 2008 Posts: 2
|
Posted: Tue Aug 12, 2008 5:51 pm Post subject: Access Denied |
|
|
I have looked at this whole list, but I can't seem to find my issue....all I get is this, in the popup window....
You are not permitted to access this section of Cacti. If you feel that you need access to this particular section, please contact the Cacti administrator.
It looks like this is coming from auth.php, but I can't figure it out. I set all of directory perms, correctly, and nothing is showing up in any logs....anyone?
|
|
| Back to top |
|
 |
gworg
Joined: 12 Aug 2008 Posts: 2
|
Posted: Wed Aug 13, 2008 1:12 pm Post subject: Re: Access Denied |
|
|
| gworg wrote: | I have looked at this whole list, but I can't seem to find my issue....all I get is this, in the popup window....
You are not permitted to access this section of Cacti. If you feel that you need access to this particular section, please contact the Cacti administrator.
It looks like this is coming from auth.php, but I can't figure it out. I set all of directory perms, correctly, and nothing is showing up in any logs....anyone? |
Sorry....I found it. I just notice the perm that I need to apply for users...Thanks.
|
|
| Back to top |
|
 |
khufure Cacti User
Joined: 24 Oct 2007 Posts: 164 Location: San Francisco, CA
|
Posted: Tue Aug 26, 2008 4:18 pm Post subject: |
|
|
| gthe wrote: | For fix error like this:
| Code: |
....
PHP Warning: include(./include/config.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 37
PHP Warning: include(): Failed opening './include/config.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 37
PHP Notice: Undefined variable: config in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 39
PHP Warning: include_once(/lib/snmp.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 39
PHP Warning: include_once(): Failed opening '/lib/snmp.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 39
PHP Notice: Undefined variable: config in /var/www/html/cacti/plugins/realtime/cmd_rt.php on line 40
....
|
Change cmd_rt.php and poller_rt.php:
before:
| Code: |
/* we are not talking to the browser */
$no_http_headers = true;
/* start initialization section */
chdir("../../");
if (file_exists("./include/global.php")) {
include("./include/global.php");
} else {
include("./include/config.php");
}
|
after:
| Code: |
/* we are not talking to the browser */
$no_http_headers = true;
/* start initialization section */
$dir = dirname(__FILE__);
chdir($dir);
if (strpos($dir, 'realtime') !== false) {
chdir('../../');
}
if (file_exists("./include/global.php")) {
include("./include/global.php");
} else {
include("./include/config.php");
}
|
|
This fix worked for me. Realtime-0.34, 0.87b + PIA2.1, running on Linux.
Edit : btw, I had to turn off ajax to make firefox3 like it.
Great plug-in, thanks all!
|
|
| Back to top |
|
 |
danwdoo
Joined: 26 Oct 2006 Posts: 38
|
Posted: Thu Sep 18, 2008 11:34 pm Post subject: Fixed mine too |
|
|
khufure's change fixed my realtime that was having the same issues. I have all the same versions as well except mine is running on Windows.
Thanks!
Danny
|
|
| Back to top |
|
 |
dononeil Cacti User
Joined: 06 Aug 2008 Posts: 72
|
Posted: Mon Sep 22, 2008 3:38 pm Post subject: |
|
|
I'm running realtime v.35 (from the SVN on 8/15/08, the last time I updated it) and it's working great EXCEPT that my graphs are being cut off on the bottom (see attached).
Any way to fix this so it scales the window correctly? Seems like it's always cutting off 50 pixels or so.
This is with IE7. Mozilla doesn't seem to have this problem.
| Description: |
|
| Filesize: |
30.03 KB |
| Viewed: |
1414 Time(s) |

|
|
|
| Back to top |
|
 |
abdulcc Cacti User
Joined: 14 Jul 2006 Posts: 52
|
Posted: Fri Sep 26, 2008 1:52 pm Post subject: I keep on getting this sql error when using realtime |
|
|
cmd_rt.php
9/26/2008 05:58:58 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1054', SQL:"select graph_templates_item.id as graph_templates_item_id, graph_templates_item.cdef_id, graph_templates_item.text_format, graph_templates_item.value, graph_templates_item.hard_return, graph_templates_item.consolidation_function_id, graph_templates_item.graph_type_id, graph_templates_gprint.gprint_text, colors.hex, graph_templates_item.alpha, data_template_rrd.id as data_template_rrd_id, data_template_rrd.local_data_id, data_template_rrd.rrd_minimum, data_template_rrd.rrd_maximum, data_template_rrd.data_source_name, data_template_rrd.local_data_template_rrd_id from graph_templates_item left join data_template_rrd on (graph_templates_item.task_item_id=data_template_rrd.id) left join colors on (graph_templates_item.color_id=colors.id) left join graph_templates_gprint on (graph_templates_item.gprint_id=graph_templates_gprint.id) where graph_templates_item.local_graph_id=617 order by graph_templates_item.sequence"
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Fri Sep 26, 2008 10:15 pm Post subject: |
|
|
| dononeil wrote: | I'm running realtime v.35 (from the SVN on 8/15/08, the last time I updated it) and it's working great EXCEPT that my graphs are being cut off on the bottom (see attached).
Any way to fix this so it scales the window correctly? Seems like it's always cutting off 50 pixels or so.
This is with IE7. Mozilla doesn't seem to have this problem. |
It's the status bar. The differences between IE and everyone else drive me absolutely nuts. I think I detected the browser version and changed the size of the window depending on it. You need to look at that JS code and simply enlarge the palying field a little more.
TheWitness
|
|
| Back to top |
|
 |
kokkers
Joined: 16 Feb 2006 Posts: 6
|
Posted: Mon Sep 29, 2008 8:34 am Post subject: |
|
|
I am successfully running v34, on 8.7b with Plugin architeture 2.1.
The plugin would not run without altering cmd_rt.php and poller_rt.php as specified by user gthe.
I really like this plug-in! It is very usable when alot more 'accuracy' is required. Like 'live STG' but with Cacti flexibility.
Kudo's for the effort!
I am no coder myself but what would be nice to see in this plug-in:
- It takes around 4 seconds to load an updated graph image. Would it be possible to load the new graph in the background and replacing the old graph only when the new version is available? This would minimize the 'blank' time in between graphs. The progess bar could then be placed below the graph indicating loading time. I think this would make the plug-in look and feel alot more responsive.
- The auto-resize on reload is a bit annoying
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|