# No graphs generated on cacti

## _easyrider_

Im having some problems with cacti. It all seems to be working except from that the graphs it generates are empty. Have checked all permissions and am sure they are correct, can't find the problem. Can somebody please help me??.

Just ask if you need more info on my problem.

Copy of log of Cacti log

```

03/12/2005 12:47:55 PM - SYSTEM STATS: Time: 1.0612 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 2, Hosts/Process: 2  

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_hdd_free_23.rrd --template hdd_used:hdd_free 1110628074:94067356:55495232  

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_hdd_free_22.rrd --template hdd_free:hdd_used 1110628074:15777076:1926484  

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_proc_21.rrd --template proc 1110628074:76  

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_users_20.rrd --template users 1110628074:2  

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_load_1min_19.rrd --template load_1min:load_5min:load_15min 1110628074:0.00:0.00:0.00  

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_mem_swap_18.rrd --template mem_swap 1110628074:996020  

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_mem_buffers_17.rrd --template mem_buffers 1110628074:6256  

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/proc_8.rrd --template proc 1110628074:76  

03/12/2005 12:47:55 PM - POLLER: Poller[0] Parsed MULTI output field '10min:0.00' [map 10min->load_15min]  

03/12/2005 12:47:55 PM - POLLER: Poller[0] Parsed MULTI output field '5min:0.00' [map 5min->load_5min]  

03/12/2005 12:47:55 PM - POLLER: Poller[0] Parsed MULTI output field '1min:0.00' [map 1min->load_1min]  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Time: 0.5494 s, Theads: N/A, Hosts: 1  

03/12/2005 12:47:55 PM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] CMD: perl /var/www/localhost/htdocs/cacti/scripts/query_unix_partitions.pl get available /dev/ide/host0/bus1/target0/lun0/part1, output: 55495232  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] CMD: perl /var/www/localhost/htdocs/cacti/scripts/query_unix_partitions.pl get used /dev/ide/host0/bus1/target0/lun0/part1, output: 94067356  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] CMD: perl /var/www/localhost/htdocs/cacti/scripts/query_unix_partitions.pl get used /dev/ide/host0/bus0/target0/lun0/part3, output: 1926484  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] CMD: perl /var/www/localhost/htdocs/cacti/scripts/query_unix_partitions.pl get available /dev/ide/host0/bus0/target0/lun0/part3, output: 15777076  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] CMD: perl /var/www/localhost/htdocs/cacti/scripts/unix_processes.pl, output: 76  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] CMD: perl /var/www/localhost/htdocs/cacti/scripts/unix_users.pl, output: 2  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] CMD: perl /var/www/localhost/htdocs/cacti/scripts/loadavg_multi.pl, output: 1min:0.00 5min:0.00 10min:0.00  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] CMD: perl /var/www/localhost/htdocs/cacti/scripts/linux_memory.pl SwapFree:, output: 996020  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] CMD: perl /var/www/localhost/htdocs/cacti/scripts/linux_memory.pl MemFree:, output: 6256  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] RECACHE: Processing 1 items in the auto reindex cache for '127.0.0.1'.  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[3] SNMP: Host responded to SNMP  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] Host[0] CMD: perl /var/www/localhost/htdocs/cacti/scripts/unix_processes.pl, output: 76  

03/12/2005 12:47:55 PM - CMDPHP: Poller[0] PHP Script Server Started Properly  

03/12/2005 12:47:55 PM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd  

03/12/2005 12:47:55 PM - PHPSVR: Poller[0] DEBUG: FILENM: /var/www/localhost/htdocs/cacti/script_server.php  

03/12/2005 12:47:55 PM - PHPSVR: Poller[0] DEBUG: DIRNAM: /var/www/localhost/htdocs/cacti  

03/12/2005 12:47:55 PM - PHPSVR: Poller[0] DEBUG: GETCWD: /var/www/localhost/htdocs/cacti  

03/12/2005 12:47:55 PM - PHPSVR: Poller[0] DEBUG: SERVER: cmd  

03/12/2005 12:47:54 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/localhost/htdocs/cacti/cmd.php 0 3]  

```

Copy of Poller cache

```

Data Source: |host_description| - Processes  

RRD: /var/www/localhost/htdocs/cacti/rra/proc_8.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/unix_processes.pl  

Data Source: Blabla.dk - Memory - Free  

RRD: /var/www/localhost/htdocs/cacti/rra/localhost_mem_buffers_17.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/linux_memory.pl MemFree:  

Data Source: Blabla.dk - Memory - Free Swap  

RRD: /var/www/localhost/htdocs/cacti/rra/localhost_mem_swap_18.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/linux_memory.pl SwapFree:  

Data Source: Blabla.dk - Load Average  

RRD: /var/www/localhost/htdocs/cacti/rra/localhost_load_1min_19.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/loadavg_multi.pl  

Data Source: Blabla.dk - Logged in Users  

RRD: /var/www/localhost/htdocs/cacti/rra/localhost_users_20.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/unix_users.pl  

Data Source: Blabla.dk - Processes  

RRD: /var/www/localhost/htdocs/cacti/rra/localhost_proc_21.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/unix_processes.pl  

Data Source: Blabla.dk - Free Space - /dev/ide/host0/  

RRD: /var/www/localhost/htdocs/cacti/rra/localhost_hdd_free_22.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/query_unix_partitions.pl get available /dev/ide/host0/bus0/target0/lun0/part3  

Data Source: Blabla.dk - Free Space - /dev/ide/host0/  

RRD: /var/www/localhost/htdocs/cacti/rra/localhost_hdd_free_22.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/query_unix_partitions.pl get used /dev/ide/host0/bus0/target0/lun0/part3  

Data Source: Blabla.dk - Free Space - /dev/ide/host0/  

RRD: /var/www/localhost/htdocs/cacti/rra/localhost_hdd_free_23.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/query_unix_partitions.pl get used /dev/ide/host0/bus1/target0/lun0/part1  

Data Source: Blabla.dk - Free Space - /dev/ide/host0/  

RRD: /var/www/localhost/htdocs/cacti/rra/localhost_hdd_free_23.rrd  

Action: 1, Script: perl /var/www/localhost/htdocs/cacti/scripts/query_unix_partitions.pl get available /dev/ide/host0/bus1/target0/lun0/part1  

```

Copy from output of # php poller.php

```

03/12/2005 12:47:54 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/localhost/htdocs/cacti/cmd.php 0 3]

Waiting on 1/1 pollers.

03/12/2005 12:47:55 PM - POLLER: Poller[0] Parsed MULTI output field '1min:0.00' [map 1min->load_1min]

03/12/2005 12:47:55 PM - POLLER: Poller[0] Parsed MULTI output field '5min:0.00' [map 5min->load_5min]

03/12/2005 12:47:55 PM - POLLER: Poller[0] Parsed MULTI output field '10min:0.00' [map 10min->load_15min]

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/proc_8.rrd --template proc 1110628074:76

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_mem_buffers_17.rrd --template mem_buffers 1110628074:6256

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_mem_swap_18.rrd --template mem_swap 1110628074:996020

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_load_1min_19.rrd --template load_1min:load_5min:load_15min 1110628074:0.00:0.00:0.00

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_users_20.rrd --template users 1110628074:2

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_proc_21.rrd --template proc 1110628074:76

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_hdd_free_22.rrd --template hdd_free:hdd_used 1110628074:15777076:1926484

03/12/2005 12:47:55 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/localhost/htdocs/cacti/rra/localhost_hdd_free_23.rrd --template hdd_used:hdd_free 1110628074:94067356:55495232

OK u:0.00 s:0.00 r:1.02

OK u:0.00 s:0.00 r:1.02

03/12/2005 12:47:55 PM - SYSTEM STATS: Time: 1.0612 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 2, Hosts/Process: 2

OK u:0.00 s:0.00 r:1.04

OK u:0.01 s:0.01 r:1.06

OK u:0.01 s:0.01 r:1.06

OK u:0.01 s:0.01 r:1.06

OK u:0.01 s:0.01 r:1.06

OK u:0.01 s:0.01 r:1.07

```

----------

## Prompty

your permissions for rra and log are good ? they should be owned by your cacti-user and cacti-group

<edit>

you might consider looking here 

https://forums.gentoo.org/viewtopic-p-1954754.html#1954754

I'm so full of myself :]

----------

## _easyrider_

I made an ls -al of my cacti libary

```

misne cacti # ls -al

total 768

drwxr-xr-x  10 root      root   4096 Mar 12 12:59 .

drwxr-xr-x   5 root      root   4096 Mar 10 21:28 ..

-rw-r--r--   1 root      root    313 Mar 12 12:59 .webapp

-rw-r--r--   1 root      root  28583 Mar 12 12:59 .webapp-cacti-0.8.6c

-rw-r--r--   2 root      root   5051 Mar 12 12:59 about.php

-rw-r--r--   2 root      root   4773 Mar 12 12:59 auth_changepassword.php

-rw-r--r--   2 root      root   6133 Mar 12 12:59 auth_login.php

-rw-------   2 root      root 172260 Mar 12 12:59 cacti.sql

-rw-r--r--   2 root      root  11832 Mar 12 12:59 cdef.php

-rw-r--r--   2 root      root  14692 Mar 12 12:59 cmd.php

-rw-r--r--   2 root      root   5569 Mar 12 12:59 color.php

-rw-r--r--   2 root      root  16107 Mar 12 12:59 data_input.php

-rw-r--r--   2 root      root  25693 Mar 12 12:59 data_queries.php

-rw-r--r--   2 root      root  39237 Mar 12 12:59 data_sources.php

-rw-r--r--   2 root      root  24717 Mar 12 12:59 data_templates.php

-rw-r--r--   2 root      root   5762 Mar 12 12:59 gprint_presets.php

-rw-r--r--   2 root      root   9687 Mar 12 12:59 graph.php

-rw-r--r--   2 root      root   2942 Mar 12 12:59 graph_image.php

-rw-r--r--   2 root      root   6318 Mar 12 12:59 graph_settings.php

-rw-r--r--   2 root      root  18376 Mar 12 12:59 graph_templates.php

-rw-r--r--   2 root      root   9428 Mar 12 12:59 graph_templates_inputs.php

-rw-r--r--   2 root      root  16125 Mar 12 12:59 graph_templates_items.php

-rw-r--r--   2 root      root  12581 Mar 12 12:59 graph_view.php

-rw-r--r--   2 root      root  41889 Mar 12 12:59 graphs.php

-rw-r--r--   2 root      root  10057 Mar 12 12:59 graphs_items.php

-rw-r--r--   2 root      root  30277 Mar 12 12:59 graphs_new.php

-rw-r--r--   2 root      root  26813 Mar 12 12:59 host.php

-rw-r--r--   2 root      root  13225 Mar 12 12:59 host_templates.php

drwxr-xr-x   2 root      root   4096 Mar 12 12:59 images

drwxr-xr-x   5 root      root   4096 Mar 12 12:59 include

-rw-r--r--   2 root      root   2271 Mar 12 12:59 index.php

drwxr-xr-x   2 root      root   4096 Mar 12 12:59 install

drwxr-xr-x   3 root      root   4096 Mar 12 12:59 lib

drwxr-xr-x   2 cactiuser root   4096 Mar 12 12:59 log

-rw-r--r--   2 root      root   1796 Mar 12 12:59 logout.php

-rw-r--r--   2 root      root   8770 Mar 12 12:59 poller.php

drwxr-xr-x   5 root      root   4096 Mar 12 12:59 resource

drwxr-xr-x   2 cactiuser root   4096 Mar 12 12:59 rra

-rw-r--r--   2 root      root   6068 Mar 12 12:59 rra.php

-rw-r--r--   2 root      root   6603 Mar 12 12:59 script_server.php

-rw-r--r--   2 root      root    353 Mar 12 12:59 script_server.pl

drwxr-xr-x   2 root      root   4096 Mar 12 12:59 scripts

-rw-r--r--   2 root      root   4832 Mar 12 12:59 settings.php

-rw-r--r--   2 root      root   6813 Mar 12 12:59 templates_export.php

-rw-r--r--   2 root      root   5843 Mar 12 12:59 templates_import.php

-rw-r--r--   2 root      root  16167 Mar 12 12:59 tree.php

-rw-r--r--   2 root      root  26373 Mar 12 12:59 user_admin.php

-rw-r--r--   2 root      root   9554 Mar 12 12:59 utilities.php

```

----------

## Prompty

I understand you can enter the cacti page ...

are the graphs generated empty or not generated at all ?

becouse if they are empty a few ppl had problems with that due to "safe mode" I understand it is a php issue ...

```

scotch ~ # ls -la /var/www/localhost/htdocs/cacti/

total 732

drwxr-xr-x  10 root      root    1520 sty  4 21:34 .

drwxr-xr-x   3 root      root     136 mar 12 09:58 ..

-rw-r--r--   2 root      root    5051 sty  4 21:33 about.php

-rw-r--r--   2 root      root    4773 sty  4 21:33 auth_changepassword.php

-rw-r--r--   2 root      root    6133 sty  4 21:33 auth_login.php

-rw-------   2 root      root  172260 sty  4 21:33 cacti.sql

-rw-r--r--   2 root      root   11832 sty  4 21:33 cdef.php

-rw-r--r--   2 root      root   14692 sty  4 21:33 cmd.php

-rw-r--r--   2 root      root    5569 sty  4 21:33 color.php

-rw-r--r--   2 root      root   16107 sty  4 21:33 data_input.php

-rw-r--r--   2 root      root   25693 sty  4 21:33 data_queries.php

-rw-r--r--   2 root      root   39237 sty  4 21:33 data_sources.php

-rw-r--r--   2 root      root   24717 sty  4 21:33 data_templates.php

-rw-r--r--   2 root      root    5762 sty  4 21:33 gprint_presets.php

-rw-r--r--   2 root      root    2942 sty  4 21:33 graph_image.php

-rw-r--r--   2 root      root    9687 sty  4 21:33 graph.php

-rw-r--r--   2 root      root    6318 sty  4 21:33 graph_settings.php

-rw-r--r--   2 root      root   10057 sty  4 21:33 graphs_items.php

-rw-r--r--   2 root      root   30277 sty  4 21:33 graphs_new.php

-rw-r--r--   2 root      root   41889 sty  4 21:33 graphs.php

-rw-r--r--   2 root      root    9428 sty  4 21:33 graph_templates_inputs.php

-rw-r--r--   2 root      root   16125 sty  4 21:33 graph_templates_items.php

-rw-r--r--   2 root      root   18376 sty  4 21:33 graph_templates.php

-rw-r--r--   2 root      root   12581 sty  4 21:33 graph_view.php

-rw-r--r--   2 root      root   26813 sty  4 21:33 host.php

-rw-r--r--   2 root      root   13225 sty  4 21:33 host_templates.php

drwxr-xr-x   2 root      root    1664 sty  4 21:34 images

drwxr-xr-x   5 root      root     568 sty  4 21:34 include

-rw-r--r--   2 root      root    2271 sty  4 21:33 index.php

drwxr-xr-x   2 root      root     464 sty  4 21:34 install

drwxr-xr-x   3 root      root     952 sty  4 21:34 lib

drwxr-xr-x   2 cactiuser cacti     80 sty  4 21:34 log

-rw-r--r--   2 root      root    1796 sty  4 21:33 logout.php

-rw-r--r--   2 root      root    8770 sty  4 21:33 poller.php

drwxr-xr-x   5 root      root     144 sty  4 21:33 resource

drwxr-xr-x   2 cactiuser cacti   3184 sty 16 21:25 rra

-rw-r--r--   2 root      root    6068 sty  4 21:33 rra.php

drwxr-xr-x   2 root      root     696 sty  4 21:34 scripts

-rw-r--r--   2 root      root    6603 sty  4 21:33 script_server.php

-rw-r--r--   2 root      root     353 sty  4 21:33 script_server.pl

-rw-r--r--   2 root      root    4832 sty  4 21:33 settings.php

-rw-r--r--   2 root      root    6813 sty  4 21:33 templates_export.php

-rw-r--r--   2 root      root    5843 sty  4 21:33 templates_import.php

-rw-r--r--   2 root      root   16167 sty  4 21:33 tree.php

-rw-r--r--   2 root      root   26373 sty  4 21:33 user_admin.php

-rw-r--r--   2 root      root    9554 sty  4 21:33 utilities.php

-rw-r--r--   1 root      root     313 sty  4 21:34 .webapp

-rw-r--r--   1 root      root   28583 sty  4 21:34 .webapp-cacti-0.8.6c

```

<EDIT>

if it is a permission issue do a 

```
chwon -R cactiuser.cacti rra/ log/
```

  and remember to run poller as cactiuser to get graphs , running as root didn't work for me

</EDIT>

----------

## anidabi

 *Prompty wrote:*   

> I understand you can enter the cacti page ...
> 
> are the graphs generated empty or not generated at all ?
> 
> becouse if they are empty a few ppl had problems with that due to "safe mode" I understand it is a php issue ...
> ...

 

I have that problen that graphs are generated, but they are empty! Snmp works perfectly, poller works, I have right permissions and I think I copiled dev-lang/php-5.1.1 with right USE flags. I just don't know what to do anymore!  :Sad: 

----------

## Prompty

I don't use cacti anymore but you can check if you did all the right things if you read 

https://forums.gentoo.org/viewtopic-p-1954754.html#1954754

i've writen it a year back now but it might give you some clues ... from the top of my head ... have you configured mysql correctly ?

----------

## anidabi

 *Prompty wrote:*   

> I don't use cacti anymore but you can check if you did all the right things if you read 
> 
> https://forums.gentoo.org/viewtopic-p-1954754.html#1954754
> 
> i've writen it a year back now but it might give you some clues ... from the top of my head ... have you configured mysql correctly ?

 

I've done everything just like in your howto. I can't be sure if I have configured mysql correctly, coz I don't know anythink about it. But still I did do the thinks to mysql what was in our howto.

----------

## anidabi

So what that "safe mode" and it's being php issue means? Can anyone help me?

----------

## think4urs11

which cati version do you use? Up to .86h there are issues when using php-5.x, see the cati forums for possible workarounds

i'm still on .86f/php-4.x so i can't tell you exactly what/when/where/why

----------

## anidabi

 *Think4UrS11 wrote:*   

> which cati version do you use? Up to .86h there are issues when using php-5.x, see the cati forums for possible workarounds
> 
> i'm still on .86f/php-4.x so i can't tell you exactly what/when/where/why

 

I'm using cacti-0.8.6h_p20060108 and php-5.1.1.

----------

## fvant

i use the same versions and see the Load Average graphs just fine but the Interface Traffic graphs end Disk Space ones are empty( ie nan values).

I can query fine with snmpwalk but the poller script gives errors.

Haven't checked cacti fora yet

----------

## m27315

 *Prompty wrote:*   

> I don't use cacti anymore ...

 

Off topic, what do you use, if not cacti?   :Smile: 

----------

## snis

Back to permissions again.

Graphs that are empty (not broken image) are often due to wrong permissions.

Check the cacti/rra/ directory AND the files in it.

If you ran the poller.php script as root the first time, then the .rrd files won't have the right permissions.

Try to chmod 777 all files under the cacti/rra directory (and see if it helps).

If you have put the poller.php script as a cron ob you should see that the files are updated every five minutes (ls -l)

Also double-check that the cron job is executed as the correct user.

----------

