Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Mar 24, 2017 5:20 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: [SOLVED - sort of] 0.8.8a & realtime no longer graphing
PostPosted: Thu Jan 24, 2013 3:15 pm 
Offline
Cacti User
User avatar

Joined: Fri Nov 04, 2005 3:37 pm
Posts: 229
Location: Ca US
Upgraded from 0.8.7g to 0.8.8a and now realtime graphs are not displaying. The realtime plugin is version 0.5. System is CentOS(Linux 2.6.18-308.24.1.el5 on x86_64).

I turned logging up to high and got this in the cacti log
Quote:
CACTI2RRD: /usr/bin/rrdtool graph - --imgformat=PNG --start=-300 --end=-5 --title="xyxyxy Router - Traffic ether1 (xyxyxy)"
--rigid --base=1000 --height=120 --width=500 --x-grid SECOND:30:MINUTE:1:SECOND:30:0:%M:%S --alt-autoscale-max
--lower-limit=0 --vertical-label="bits per second" --slope-mode --font TITLE:10: --font AXIS:6: --font LEGEND:8:
--font UNIT:6: DEF:a="/var/www/html/plugins/realtime/cache/realtime_7694_5.rrd":traffic_in:AVERAGE
DEF:b="/var/www/html/plugins/realtime/cache/realtime_7694_5.rrd":traffic_out:AVERAGE CDEF:cdefa=a,8,*
CDEF:cdeff=b,8,* CDEF:cdefba=TIME,1359057395,GT,a,a,UN,0,a,IF,IF,TIME,1359057395,GT,b,b,UN,0,b,IF,IF,+,8,*
AREA:cdefa#00CF00FF:"Inbound" GPRINT:cdefa:LAST:" Current\:%8.2lf %s" GPRINT:cdefa:AVERAGE:"Avg\:%8.2lf %s"
GPRINT:cdefa:MAX:"Max\:%8.2lf %s\n" COMMENT:"Total In\: 0 bytes\n" LINE1:cdeff#002A97FF:"Outbound"
GPRINT:cdeff:LAST:" Current\:%8.2lf %s" GPRINT:cdeff:AVERAGE:"Avg\:%8.2lf %s" GPRINT:cdeff:MAX:"Max\:%8.2lf %s\n"
COMMENT:"Total Out\: 0 bytes\n" LINE1:cdefba#FF0000FF:"Total In+Out" GPRINT:cdefba:LAST:"Current\:%8.2lf %s"
GPRINT:cdefba:AVERAGE:"Avg\:%8.2lf %s" GPRINT:cdefba:MAX:"Max\:%8.2lf %s\n" COMMENT:"Total In+Out\: 0 bytes\n"

CACTI2RRD: /usr/bin/rrdtool fetch /var/www/html/rra/xyxyxy_relayrouter_traffic_in_7694.rrd AVERAGE -s -300 -e -5 -r 5

CACTI2RRD: /usr/bin/rrdtool info /var/www/html/rra/xyxyxy_relayrouter_traffic_in_7694.rrd
Apache log shows this
Quote:
ERROR: opening '/var/www/html/plugins/realtime/cache/realtime_7694_5.rrd': No such file or directory
So clearly the cache RRD is not getting created. However, the realtime cache directory is owned by apache.apache (as is the whole cacti directory structure). Just as a "let's see" I turned on +w for the realtime cache directory, but got no change.
Is there some other ownership thing that I'm missing?

_________________
---------
The Glue Guy


Last edited by GlueGuy on Mon Jan 28, 2013 6:36 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: 0.8.8a & realtime no longer graphing
PostPosted: Thu Jan 24, 2013 4:04 pm 
Offline
Cacti User
User avatar

Joined: Fri Nov 04, 2005 3:37 pm
Posts: 229
Location: Ca US
One correction to the above. It looks like the realtime plugin is actually version 0.5.2, but the plugin manager is identifying it as 0.5.

The archive that I downloaded is this: realtime-v0.5-2.tgz

But this is what is in the setup.php
Code:
function realtime_version () {
        return array(
                'name'     => 'realtime',
                'version'  => '0.5',
                'longname' => 'Realtime Graph Viewer',
                'author'   => 'Mathieu Virbel',
                'homepage' => 'http://www.cacti.net',
                'email'    => 'mathieu.v@capensis.fr',
                'url'      => 'http://versions.cactiusers.org'
        );


Maybe something else is wrong?

_________________
---------
The Glue Guy


Top
 Profile  
 
 Post subject: Re: 0.8.8a & realtime no longer graphing
PostPosted: Fri Jan 25, 2013 12:00 pm 
Offline
Cacti User
User avatar

Joined: Fri Nov 04, 2005 3:37 pm
Posts: 229
Location: Ca US
This clearly is some sort of permissions issue. If I run the realtime script from the CLI (as root), the cache files get created.

However, running through the browser (as apache.apache), the cache files do not get created.

All the files and directories are owned by apache.apache.

I turned off SElinux because it was creating weird ownership issues that I don't have time to debug.

I even chowned the /var/www/html/plugins/realtime/cache directory 777.

Still no joy.

Anyone know what else I can look at?

_________________
---------
The Glue Guy


Top
 Profile  
 
 Post subject: Re: 0.8.8a & realtime = FUBAR
PostPosted: Fri Jan 25, 2013 9:34 pm 
Offline
Cacti User
User avatar

Joined: Fri Nov 04, 2005 3:37 pm
Posts: 229
Location: Ca US
Not so convinced this is a permissions issue. I can run the realtime poller from the CLI, and get a sane response. This also creates the cached RRD file.:
Code:
sudo -u apache php  /var/www/html/plugins/realtime/poller_rt.php --graph=4680 --interval=3 --debug
OK u:0.01 s:0.01 r:0.00
However, when initiated from the realtime icon, it never creates the cached RRD file, and the only error (in the httpd log) is that the RRD file doesn't exist.

I upgraded a second cacti server to 0.8.8a, and it behaves the same way. So I am missing something obvious, but have not been able to discover what it is.

_________________
---------
The Glue Guy


Top
 Profile  
 
 Post subject: Re: 0.8.8a & realtime no longer graphing
PostPosted: Sat Jan 26, 2013 2:41 pm 
Offline
Cacti User
User avatar

Joined: Fri Nov 04, 2005 3:37 pm
Posts: 229
Location: Ca US
I've discovered that if I run poller_rt.php from the CLI, the realtime plugin "simulates" running correctly. So either polle_rt.php is not getting called (I think this is what is happening), or else it's not generating the RRD output file (I don't think this, but just throwing it out there as a possibility).

No help out there?

_________________
---------
The Glue Guy


Last edited by GlueGuy on Mon Jan 28, 2013 6:37 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: [SOLVED - sort of] Re: 0.8.8a & realtime no longer graphing
PostPosted: Mon Jan 28, 2013 6:36 pm 
Offline
Cacti User
User avatar

Joined: Fri Nov 04, 2005 3:37 pm
Posts: 229
Location: Ca US
With a lot of help from TheWitness, I've got at least a workaround for this.

Almost every plugin has this little bit of code:
Code:
/* do NOT run this script through a web browser */
if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
        die("<br><strong>This script is only meant to run at the command line.</strong>");
}
The intention is to prevent shell scripts from running if they are maliciously run from a browser; an exploit of sorts.

I'm not sure this is the correct way to block this. However, I've found that if I reduce the code to this:
Code:
/* do NOT run this script through a web browser */
if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) ) {
        die("<br><strong>This script is only meant to run at the command line.</strong>");
}
Everything seems to work correctly.

Is there a better way to fix this?

_________________
---------
The Glue Guy


Top
 Profile  
 
 Post subject: Re: [SOLVED - sort of] 0.8.8a & realtime no longer graphing
PostPosted: Thu Sep 22, 2016 12:11 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
I have this problem too and it's stopped working all of a sudden - the RRD's are not being created in cache. I updated to the latest 0.5-2 realtime but no joy and the window keeps resizing to a extremely tiny size every second. I'll try the workaround. thx


Top
 Profile  
 
 Post subject: Re: [SOLVED - sort of] 0.8.8a & realtime no longer graphing
PostPosted: Thu Sep 22, 2016 12:22 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 124
workaround didn't work.


Top
 Profile  
 
 Post subject: Re: [SOLVED - sort of] 0.8.8a & realtime no longer graphing
PostPosted: Mon Sep 26, 2016 8:38 am 
Offline

Joined: Fri Sep 16, 2016 7:51 am
Posts: 8
Cacti 0.8.8f
PHP7

Realtime not working

Fixed this by following the instructions on here

http://www.devthought.com/2009/06/09/fix-ereg-is-deprecated-errors-in-php-53/

Hope this helps others, took me a while to sort


Top
 Profile  
 
 Post subject: Re: [SOLVED - sort of] 0.8.8a & realtime no longer graphing
PostPosted: Mon Sep 26, 2016 8:53 am 
Offline

Joined: Fri Sep 16, 2016 7:51 am
Posts: 8
Realtime graphs working but now getting new apache2 errors


ERROR: is not a vname nor a number
ERROR: don't understand 'a,8,*'
ERROR: is not a vname nor a number
ERROR: is not a vname nor a number
ERROR: don't understand 'a,8,*'
ERROR: is not a vname nor a number
ERROR: is not a vname nor a number
[Mon Sep 26 14:50:11.630481 2016] [mpm_prefork:notice] [pid 21690] AH00169: caught SIGTERM, shutting down
[Mon Sep 26 14:50:12.775429 2016] [mpm_prefork:notice] [pid 24228] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Sep 26 14:50:12.775474 2016] [core:notice] [pid 24228] AH00094: Command line: '/usr/sbin/apache2


Anyone help?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] 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:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group