Graphs stopped working on Ubuntu 6.06 w/ 0.8.6j

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

flickerfly
Posts: 17
Joined: Thu Oct 19, 2006 8:44 am
Location: Lanham, MD
Contact:

Post by flickerfly »

I've been digging through this text trying to figure out where the rrd files should be created, but I haven't found it. I was hoping to issue a similar command by hand to get a better start at troubleshooting it and to see if I just created the appropriate file if it would work.

Anyway, anyone know how to create that file or where to look in the code?

Note, I'm not a PHP hacker so I'm working with both hands tied behind my back.

Thanks
flickerfly
Posts: 17
Joined: Thu Oct 19, 2006 8:44 am
Location: Lanham, MD
Contact:

Post by flickerfly »

okay, I've dug down deep enough to figure out something.

I used this command to create the rrd for the local proc graph. Once I do that, a graph shows up.

Code: Select all

rrdtool create localhost_proc_7.rrd --start 1023654125 --step 300 DS:proc:GAUGE:600:0:671744 RRA:AVERAGE:0.5:288:31
I issued the command as a non-root user.

I could still use help on figuring out why they aren't being created properly and in knowing how to create these things properly.
flickerfly
Posts: 17
Joined: Thu Oct 19, 2006 8:44 am
Location: Lanham, MD
Contact:

Post by flickerfly »

I've found what I believe to be the code that is supposed to create the rrd file. It is a function called 'rrdtool_function_create' in 'site/lib/rrd.php'. Maybe tomorrow I can figure out how to reuse this function to test the creation process to figure out where it fails.

If someone could post a script to do this, that would be awesome because it looks like it will take me quite awhile to work through this as I'm learning php as I go. :o
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

you should run "php <path_cacti>/poller.php" and see if any data is returned, like "OK...". Is cron setup?

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?
flickerfly
Posts: 17
Joined: Thu Oct 19, 2006 8:44 am
Location: Lanham, MD
Contact:

Post by flickerfly »

Aha! Here's something . . .

Code: Select all

Fatal error: Call to undefined function:  mysql_pconnect() in /usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 373
I found that libphp-adodb is already installed.

Line 373 in the file mentioned in the error above is in this function:

Code: Select all

        function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
        {
                if (!empty($this->port)) $argHostname .= ":".$this->port;

                if (ADODB_PHPVER >= 0x4300)
                        $this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags);
                else
                        $this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword);
                if ($this->_connectionID === false) return false;
                if ($this->autoRollback) $this->RollbackTrans();
                if ($argDatabasename) return $this->SelectDB($argDatabasename);
                return true;
        }
flickerfly
Posts: 17
Joined: Thu Oct 19, 2006 8:44 am
Location: Lanham, MD
Contact:

Post by flickerfly »

I think I might have figured it out. I was still using php4 on the CLI side of things. 'sudo apt-get install php5-cli' seems to have installed the CLI config and whatnot for php5. I went back and readded my devices and graphs and the rrd files starting magically showing up in rra/. :-) I didn't have to even mess with the localhost stuff, they just started creating themselves.

Thanks a lot guys for helping out.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest