Realtime plugin not generating RRDs

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
flyn
Posts: 4
Joined: Tue Nov 17, 2009 8:32 am

Realtime plugin not generating RRDs

Post by flyn »

Hi everyone,

I'm using realtime 0.4 with cacti 0.8.7e and I'm getting a blank image in the realtime graph window, regardless of any settings I can set there.

If I check the folder I set realtime to create the RRDs in, I can see nothing gets generated there.

In the apache I'm getting the following error:

ERROR: opening '/usr/local/groundwork/cacti/rrd_cache/realtime_12_5.rrd': No such file or directory

With the actual numbers changing depending on the graph I'm trying to look at.

I've tried running the php manually in the console using command syntax that cacti is using:

/usr/local/groundwork/php/bin/php -q /usr/local/groundwork/cacti/plugins/realtime/cmd_rt.php 12521 61 5

/usr/local/groundwork/php/bin/php /usr/local/groundwork/cacti/plugins/realtime/poller_rt.php --graph=61 --interval=5

I used the -c argument to specify my php.ini location to get everything working, but using ps showed that rrdtool is not actually being used to create the RRDs.

I also used the "echo 1 > /proc/sys/vm/block_dump" command to see if anything is trying to write to the hard drive and failing but I got nothing there too, it looks like rrdtool isn't getting accessed at all.

I'm using Cacti to graph external RRDs that are generated by PNP (both using the same version of rrdtool - 1.3.8) and other than realtime everything is working well.

Does anyone have any idea how I can solve this issue?

Thanks in advance,

Adam
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Somehow permissions lend themselves to these types of issues. Chmod 777 on the rrd_cache directory and see what happens. Also chown -R apache:apache on that directory too, assuming that's who's running the web server. Don't use GW's hacked Cacti.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
flyn
Posts: 4
Joined: Tue Nov 17, 2009 8:32 am

Post by flyn »

Hi TheWitness,

Thanks for the quick response.

The rrd_cache folder is already 0777ed:

# stat rrd_cache/
File: `rrd_cache/'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fd00h/64768d Inode: 58163267 Links: 2
Access: (0777/drwxrwxrwx) Uid: ( 500/ nagios) Gid: ( 500/ nagios)
Access: 2009-11-17 14:20:39.000000000 +0200
Modify: 2009-11-17 18:37:33.000000000 +0200
Change: 2009-11-18 02:42:28.000000000 +0200

drwxrwxrwx 2 nagios nagios 4096 Nov 17 18:37 rrd_cache

The user nagios is the user that is running the apache.

The Cacti version I'm using is a vanilla version with Plugin Architecture 2.5, its just graphing RRDs which are generated by PNP, which in turn gets its data from Nagios.

Do you have any other ideas?
Anything I should check in the PHP configuration?

I tried adding a debug "print" to see what the"
/* create the rrdfile */
shell_exec($command);
" section is trying to run in poller_rt.php, but I didnt get any output for $command , I'm probably doing it wrong.

Thanks in advance,
Adam
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

flyn wrote: The Cacti version I'm using is a vanilla version with Plugin Architecture 2.5, its just graphing RRDs which are generated by PNP, which in turn gets its data from Nagios.
So in other words, Cacti just has dummy entries to make the graphs work, and doesn't collect any data? How is realtime supposed to collect data?

(I've never done external RRDs myself, but I assume there is something like that going on, and Cacti's poller_items is basically emtpy, which means the realtime plugin would have no source for data either)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
flyn
Posts: 4
Joined: Tue Nov 17, 2009 8:32 am

Post by flyn »

Hi Howie,

The way Cacti is set up is that I create a data source for each RRD file, and set the path of the RRD in "Data Source Path".

I assumed Realtime would be able to work with this, since it just needs to tell rrdtool to re-graph the RRDs every x seconds. Do you think that this is possible, or do you think I will need to find another solution?

Thanks,
Adam
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

flyn wrote:Hi Howie,

The way Cacti is set up is that I create a data source for each RRD file, and set the path of the RRD in "Data Source Path".

I assumed Realtime would be able to work with this, since it just needs to tell rrdtool to re-graph the RRDs every x seconds. Do you think that this is possible, or do you think I will need to find another solution?

Thanks,
Adam
No - the realtime plugin is actually polling devices. Cacti only polls every 5 minutes, so to get data every 10 seconds, the poller_rt.php (I think it's called) script is collecting that data and putting it into a temporary rrd file.

If your Nagios plugin is stuffing data into the rrds more often than every 5 minutes, then that should show up on the normal graphs in cacti, if you have the rrd heartbeat and the cacti page-refresh times set OK.

If Nagios isn't doing that, then there is no newer data to show.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
flyn
Posts: 4
Joined: Tue Nov 17, 2009 8:32 am

Post by flyn »

Hi Howie,

Thanks for your help, I guess I'll find another solution.

Regards,
Adam
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

If PNP isn't collecting more often than that, and you are looking to get more frequent updates, then Cacti will do that for you. But then you are collecting with Cacti and not Nagios/PNP. It's not that Cacti won't do it, it's just that it won't do it in your (fairly peculiar in Cacti terms) current situation.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Howie is, of course, correct.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests