Empty Graphs?

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

Moderators: Developers, Moderators

hyloth
Posts: 5
Joined: Mon Mar 01, 2004 1:40 pm

Empty Graphs?

Post by hyloth »

My graphs -seem- to be getting created just fine, but every time I go to look at a graph, the displays always read "nan" on any graph, for any value. What am I doing wrong?


Thanks much
ouiji
Posts: 11
Joined: Fri Feb 06, 2004 5:59 pm

Read...

Post by ouiji »

Check permissions on /rra
-ouiji
hyloth
Posts: 5
Joined: Mon Mar 01, 2004 1:40 pm

Post by hyloth »

Permissions are as follows:

drwxrwxr-x 2 cacti webdev 4096 Mar 1 13:38 rra
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

what are the perms on /log?

Post by egarnel »

Also, are the rrd files being updated?
If you go under console and turn on the graph debugging, it may shed some more light on the subject

is webdev your httpd server group and/or is the web server user in that group (typically apache or nobody under unix)?
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

More info

Post by egarnel »

Per the docs, rra & log should be owned by the cactiuser
hyloth
Posts: 5
Joined: Mon Mar 01, 2004 1:40 pm

Post by hyloth »

webdev is my user that runs the webserver, which the username "cacti" is a part of. /rra is owned and read/writable by cacti. The RRA files don't seem to be getting updated unless I manually run php cmd.php (Just realized thats because I had the wrong path in crontab) ...

But even when I run the cmd.php manually, it doesnt seem to update the graphs with any values other than "nan"...
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

manual cmd.php

Post by egarnel »

Who are you running the cmd.php from the command line as?
hyloth
Posts: 5
Joined: Mon Mar 01, 2004 1:40 pm

Post by hyloth »

I run the command as cacti, via this command:

Code: Select all

su -u cacti php cmd.php
and it displays the following:
jomamma:/usr/local/apache/htdocs/cacti# sudo -u cacti php cmd.php
command: perl /usr/local/apache/htdocs/cacti/scripts/linux_memory.pl MemFree:, output: 12552
command: perl /usr/local/apache/htdocs/cacti/scripts/linux_memory.pl SwapFree:, output: 51480
MULTI command: perl /usr/local/apache/htdocs/cacti/scripts/loadavg_multi.pl, output: 1min:0.00 5min:0.00 10min:0.00
MULTI expansion: found fieldid: 17, found rrdname: load_1min, value: 0.00
MULTI expansion: found fieldid: 18, found rrdname: load_5min, value: 0.00
MULTI expansion: found fieldid: 19, found rrdname: load_15min, value: 0.00
command: perl /usr/local/apache/htdocs/cacti/scripts/unix_users.pl, output: 13
command: perl /usr/local/apache/htdocs/cacti/scripts/unix_processes.pl, output: 105
update /usr/local/apache/htdocs/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers N:12552
update /usr/local/apache/htdocs/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap N:51480
update /usr/local/apache/htdocs/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min N:0.00:0.00:0.00
update /usr/local/apache/htdocs/cacti/rra/localhost_users_6.rrd --template users N:13
update /usr/local/apache/htdocs/cacti/rra/localhost_proc_7.rrd --template proc N:105
time: 0
And the rrd/* files all get an updated timestamp.
hyloth
Posts: 5
Joined: Mon Mar 01, 2004 1:40 pm

Post by hyloth »

*bump*
azazel
Posts: 4
Joined: Wed Jun 18, 2003 2:47 am

Post by azazel »

did you ever solve your problem, I have the same thing that the graphs don't show any data but when I run cmd.php manually I see all the scripts returning values.
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

group perms ?

Post by egarnel »

Can you post the output of ls -al rra as well as ls -al log?
Guest

Post by Guest »

Hi,

got the same Problem, i'm kinda wiered about all the forum threads which already care about it, but never they come to a clear solution...

Here is my ls -al of rra/

Code: Select all

[root@RHLinux8nbg cacti]# ls -al rra
insgesamt 444
drwxr-xr-x    2 root     root         4096 Jul 13 12:41 .
drwxr-xr-x   12 root     root         4096 Jul 13 10:59 ..
-rw-r--r--    1 root     cacta       94660 Jul 13 12:41 localhost_hdd_free_8.rrd
-rw-r--r--    1 root     cacta      141484 Jul 13 12:41 localhost_load_1min_5.rrd
-rw-r--r--    1 root     cacta       47836 Jul 13 12:41 localhost_mem_buffers_3.rrd
-rw-r--r--    1 root     cacta       47836 Jul 13 12:41 localhost_mem_swap_4.rrd
-rw-r--r--    1 root     cacta       47836 Jul 13 12:41 localhost_proc_7.rrd
-rw-r--r--    1 root     cacta       47836 Jul 13 12:41 localhost_users_6.rrd
-rw-r--r--    1 root     root            0 Jul 13 10:59 .placeholder
and here of log/

Code: Select all

[root@RHLinux8nbg cacti]# ls -al log
insgesamt 96
drwxr-xr-x    2 root     root         4096 Jul 13 11:24 .
drwxr-xr-x   12 root     root         4096 Jul 13 10:59 ..
-rw-r--r--    1 root     root        83232 Jul 13 12:50 rrd.log
cacta is the user that calls the cmd.php in the crontab file

Code: Select all

#Cacti
*/5 * * * * cacta php /usr/local/apache2/htdocs/cacti/cmd.php > /dev/null 2>&1
there IS something wrong with the permissions, i figured that from other threads allready :wink:

Thanks for your help folks

Mathias
Guest

Post by Guest »

*bump*
Guest

Post by Guest »

I think i solved the problem.

i installed everything again, clean. (Apache, php, mysql, cacti)
all as root (i know its insecure but its working ;) )

i just start EVERYTHING as root, including te cronjob.

my cronjob looks exactly like in the docu, but i REPLACED the 'php'command with the COMPLETE path to the php binary (/usr/local/bin/php) .

i gave the whole cacti-directory ownage for root:root .

and now it's working fine, as it should.

i will try to get it working as normal user next week, let's see what it'll bring...
Francisco
Posts: 31
Joined: Sun Aug 01, 2004 11:09 pm

Post by Francisco »

I'm having the same Issue... Any updates? :oops:
www.navigatoris.net
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests