cacti does not create rrd files automatically

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

Moderators: Developers, Moderators

Post Reply
leventkurt
Posts: 9
Joined: Mon Jul 07, 2008 1:45 am

cacti does not create rrd files automatically

Post by leventkurt »

Hi there,

I used cacti for two years in my old company with no problem at all. I tried to install cacti to my new company but I find my self in trouble :)

I googled and search forums threads but i couldn' t find my problem's solution.

Let me explain the situation a bit:

- CentOS release 4.6 (Final) is being used.
- rrdtool, mysql, apache and php are intalled from scratch.
- downloaded 0.8.7b version of cacti and installed.

When I add a device, cacti sees all its properties with no problem. I tried localhost (linux) and also a router (cisco) in our system, i've added some active devices.

The problem is that cacti is not creating any rrd files by itself.

I opened one of data source in debug mode, and see this:

Code: Select all

/install/rrdtool/rrdtool-1.3.0/bin/rrdtool create \
/install/apache/apache-2.0.63/htdocs/cacti/rra/<privateinfo>.rrd \
--step 300  \
DS:5min_cpu:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797
When I copy this line and execute, It really does create an rrd file.

First thing you would say this is a cron management problem; but it's not.

When i execute cmd.php it does not create any rrd at all; also i put cmd.php as (i know i should use */5, used everymin to see if cron works or not):

Code: Select all

* * * * * cacti /install/php/php-5.2.6/bin/php /install/apache/apache-2.0.63/htdocs/cacti/cmd.php 1> /tmp/cacti1.log 2> /tmp/cacti2.log
when i check /tmp directory:

Code: Select all

# ls -l /tmp/cacti*
-rw-r--r--  1 cacti cacti 3457 Jul  7 11:12 /tmp/cacti1.log
-rw-r--r--  1 cacti cacti    0 Jul  7 11:12 /tmp/cacti2.log
everythings seems ok, but steel no rrd.

I also used "chmod 777 * -R" and "chown cacti:apache * -R" on cacti root
directory to eliminate permission issues.

This is the output of the cmd.php:

Code: Select all

# /install/php/php-5.2.6/bin/php cmd.php 
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] SNMP: Host responded to SNMP
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] RECACHE: Processing 1 items in the auto reindex cache for '<privatedata>'.
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3348] SNMP: v2: 212.133.133.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.18, output: 0
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3348] SNMP: v2: 212.133.133.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.18, output: 0
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3347] SNMP: v2: 212.133.133.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.17, output: 0
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3347] SNMP: v2: 212.133.133.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.17, output: 0
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3346] SNMP: v2: 212.133.133.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.16, output: 0
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3346] SNMP: v2: 212.133.133.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.16, output: 0
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3345] SNMP: v2: 212.133.133.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.11, output: 922429275
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3345] SNMP: v2: 212.133.133.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.11, output: 3107916328
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3344] SNMP: v2: 212.133.133.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.10, output: 3298875625
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3344] SNMP: v2: 212.133.133.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.10, output: 3107929306
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3343] SNMP: v2: 212.133.133.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.9, output: 1405877677
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3343] SNMP: v2: 212.133.133.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.9, output: 1931579704
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3342] SNMP: v2: 212.133.133.254, dsname: 5min_cpu, oid: .1.3.6.1.4.1.9.2.1.58.0, output: 18
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3349] SNMP: v2: 212.133.133.254, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.19, output: 0
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Host[222] DS[3349] SNMP: v2: 212.133.133.254, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.19, output: 0
07/07/2008 11:16:17 AM - CMDPHP: Poller[0] Time: 0.2658 s, Theads: N/A, Hosts: 1
What I'm missing?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please see 2nd link of my signature for further debugging. Your post shows, that data gathering is fine, but the HowTo may help you going on further
Reinhard
leventkurt
Posts: 9
Joined: Mon Jul 07, 2008 1:45 am

Post by leventkurt »

hi there,

i tried every solution you have one by one but didn't work. i had a look to php.ini to see if there's something wrong about variables:

register_globals = On
register_long_arrays = On
register_argc_argv = On

(I think register_globals is not the problem here, I set it to "On" to be sure.)

The problem remains as the same, I create a device (no problem), it searches for interfaces (np), I add an interface (np) but neither crontab cmd.php nor manually running of cmd.php creates relevant rrd files in rra directory.

But If I look to Data Source in Debug mode, copy/paste and run the rrdtool create ..... It really does create rrd file.

So my question is the following:

Where is the part that cacti understands that it has to create a rrd file and runs "rrdtool create ....." function? I think I can debug easily I have this information and add mine experience to your page as a solution :)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

See lib/poller.php and search for process_poller_output function
Reinhard
leventkurt
Posts: 9
Joined: Mon Jul 07, 2008 1:45 am

Post by leventkurt »

Thanks for your replies, I reconsidered every step from scratch and this time I installed as a cacti newbie. Voila, it solved :)

The problem is the cron line (also I'm using in command line for trials):

Code: Select all

* * * * * cacti /install/php/php-5.2.6/bin/php /install/apache/apache-2.0.63/htdocs/cacti/[b]cmd.php[/b] 1> /tmp/cacti1.log 2> /tmp/cacti2.log
If I replace cmd.php with poller.php it'ok :)

This poller.php reads what to use as a poller and uses spine / cmd.php from settings right?

Again thanks for your help man ..
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Shame on me; I did not see this in your first post. Too much work ...
Reinhard
leventkurt
Posts: 9
Joined: Mon Jul 07, 2008 1:45 am

Post by leventkurt »

No problem mate, I shouldn't be so self-confident and read again whole installation.

By the way, poller.php reads what to use as a poller and uses (forks) spine / cmd.php from settings and executes, right?

Thanks for all the information.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Yes. And more: spine and cmd.php will store all values in poller_output table. Only poller.php will fetch data from there and update rrd files
Reinhard
leventkurt
Posts: 9
Joined: Mon Jul 07, 2008 1:45 am

Post by leventkurt »

Thank you again.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest