cacti not displaying graphs

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

Moderators: Developers, Moderators

Post Reply
crycos
Posts: 5
Joined: Tue Apr 24, 2007 1:24 pm

cacti not displaying graphs

Post by crycos »

I have installed cacti using yum on a brand new Fedora box using this tutorial : http://docs.cacti.net/node/3 . Cacti runs fine , but it dosen't display any graphs.

Is there something I'm missing ?

I understand that I need to create the graphs for my devices. However the localhost comes preconfigured with the cacti standard installation. , but I can't see any graphs

Am I missing something ?
sheds
Posts: 11
Joined: Fri Apr 06, 2007 4:08 pm
Location: ???????????????

Post by sheds »

Hey there, i am currently trying to get cacti to display graphs too. I know what my problem is. I installed it on a debian sarge linux machine, and i got the information about my problem from /var/log/cacti/cacti.log. Perhaps you can look in there and post the messages to see if we can help you out.

I will also be opening a new thread for my current problem, so, if anybody helps me out, maybe you will be indirectly helped too.

Good luck man.
crycos
Posts: 5
Joined: Tue Apr 24, 2007 1:24 pm

Post by crycos »

Everything seems fine in this log file :)

04/24/2007 12:36:24 PM - CMDPHP: Poller[0] Time: 0.1130 s, Theads: N/A, Hosts: 1
04/24/2007 01:58:40 PM - SYSTEM STATS: Time:1.0902 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5


After playing with it for a while I got it to show graps, but only for the locahost, and they are empty :). There is no info received from the snmp agent.

I start to hate this SNMP :))


Can I get a link of your new thread
crycos
Posts: 5
Joined: Tue Apr 24, 2007 1:24 pm

Post by crycos »

I was going thru the cacti manual and I realized that we need to run :
shell> php poller.php

Note that you must be in the cacti directory to do that.


Now I can see the graphs , but it dosen't load up any data. From the manual I understand again that the rra/ folder might be with root restrictions, so I've changed the ownership of rra/ and log/ folder to the cactiuser group and user

shell>chmod -R cactiuser.cactiuser rra/ log/

Still i'm unable to see any data flowing thru the graph .
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You'll have to set up crontab to issue the poller.php command every 5 Minutes as described in the installation manual
Reinhard
crycos
Posts: 5
Joined: Tue Apr 24, 2007 1:24 pm

Post by crycos »

The probllem was at the rra/ and log/ folder. It looks like I had the wrong permision., since i run "php poller.php " under root user

The folders owner must be cacti

shel>chmod -R cacti.cacti rra/ log/


Everything works fine now:


>ls -al /rra

drwxrwxrwx 2 cacti cacti 4096 Apr 25 13:47 .
drwxr-xr-x 4 root root 4096 Apr 24 12:13 ..
-rw-r--r-- 1 cacti cacti 141488 Apr 25 19:20 localhost_load_1min_5.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 localhost_mem_buffers_3.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 localhost_mem_swap_4.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 localhost_proc_7.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 localhost_users_6.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_5min_cpu_22.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_cpu_nice_19.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_cpu_system_20.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_cpu_user_21.rrd
-rw-r--r-- 1 cacti cacti 94664 Apr 25 19:20 test_box_hdd_free_14.rrd
-rw-r--r-- 1 cacti cacti 94664 Apr 25 19:20 test_box_hdd_free_15.rrd
-rw-r--r-- 1 cacti cacti 141488 Apr 25 19:20 test_box_load_1min_10.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_mem_buffers_16.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_mem_buffers_8.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_mem_swap_17.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_mem_swap_9.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_snmp_oid_13.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_snmp_oid_18.rrd
-rw-r--r-- 1 cacti cacti 47840 Apr 25 19:20 test_box_users_11.rrd
sheds
Posts: 11
Joined: Fri Apr 06, 2007 4:08 pm
Location: ???????????????

Question!?

Post by sheds »

Hey, glad to know you fixed it.

I got a question for you. That line that you have specied as chmod -R ... and so on, isn't that supposed to be chown -R?

I try to change the owner of rra/ and log/ in /var/www/site/, but when typing ls -al rra/, i still get root as the owner, it doesn't change it to cactiuser. Here's the line i am typing to get this done:
chown -R cactiuser rra/ log/

The shell takes it, but it doesn't change the owner. Why is this happening?

Another thing. I got a rra symbolic link in /var/www/site that point to rra -> /var/lib/cacti/rra. This link i owned by root and chown does not change the ownership to cactiuser. On the other hand, i got the actual rra directory in /var/lib/cacti, and this directory does have cactiuser and www-data when typing ls -al rra. Could this be the problem? I think it's really weird to have it this way, so perhaps i will just remove the sym link and copy the folder over, see what happens.

I also changed user to cactiuser and tried 'php poller.php' and i get the following error:

Code: Select all

Warning: main(/etc/cacti/debian.php): failed to open stream: Permission denied in /usr/share/cacti/site/include/config.php on line 30

Fatal error: main(): Failed opening required '/etc/cacti/debian.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/cacti/site/include/config.php on line 30
How can you even run poller.php as cacti if it's necessary to be root to use include/ files?

I think the install manual provided no clues.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests