no graphs, no rra data

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

Moderators: Developers, Moderators

Post Reply
goodfrey

no graphs, no rra data

Post by goodfrey »

New install on fedora core 2, no graphs, no data in the rra directory....

Please help - anyone ?

/usr/local/rrdtool-1.0.42/bin graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Load Average" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent=0 \
--vertical-label="processes in the run queue" \
DEF:a="/var/www/html/cacti/rra/localhost_load_1min_5.rrd":load_1min:AVERAGE \
DEF:b="/var/www/html/cacti/rra/localhost_load_1min_5.rrd":load_5min:AVERAGE \
DEF:c="/var/www/html/cacti/rra/localhost_load_1min_5.rrd":load_15min:AVERAGE \
CDEF:cdefg=TIME,1090414704,GT,a,a,UN,0,a,IF,IF,TIME,1090414704,GT,b,b,UN,0,b,IF,IF,TIME,1090414704,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#EACC00:"1 Minute Average" \
GPRINT:a:LAST:" Current\:%8.2lf\n" \
STACK:b#EA8F00:"5 Minute Average" \
GPRINT:b:LAST:" Current\:%8.2lf\n" \
STACK:c#FF0000:"15 Minute Average" \
GPRINT:c:LAST:"Current\:%8.2lf\n" \

LINE1:cdefg#000000:""
Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

Post by Coeus »

Going to need more info on that one.

Please post:
How you are editing crontab, and the line in the crontab file
ls -sl /var/www/html/cacti/rra/

output of
php /var/www/html/cacti/cmd.php
Run as the cacti user.

Carl
Francisco
Posts: 31
Joined: Sun Aug 01, 2004 11:09 pm

Post by Francisco »

I got the same Problem :x

[root@dc85a7e79 root]# ls -sl /var/www/cacti/rra/
total 336
144 -rw-r--r-- 1 cacti cacti 141484 Aug 1 07:00 localhost_load_1min_5.rrd
48 -rw-r--r-- 1 cacti cacti 47836 Aug 1 07:00 localhost_mem_buffers_3.rrd
48 -rw-r--r-- 1 cacti cacti 47836 Aug 1 07:00 localhost_mem_swap_4.rrd
48 -rw-r--r-- 1 cacti cacti 47836 Aug 1 07:00 localhost_proc_7.rrd
48 -rw-r--r-- 1 cacti cacti 47836 Aug 1 07:00 localhost_users_6.rrd


[root@dc85a7e79 root]# php /var/www/cacti/cmd.php
Content-type: text/html
X-Powered-By: PHP/4.3.8

command: perl /var/www/cacti/scripts/linux_memory.pl MemFree:, output: 44684
command: perl /var/www/cacti/scripts/linux_memory.pl SwapFree:, output: 359796
MULTI command: perl /var/www/cacti/scripts/loadavg_multi.pl, output: 1min:0.12 5min:0.11 10min:0.04
MULTI expansion: found fieldid: 17, found rrdname: load_1min, value: 0.12
MULTI expansion: found fieldid: 18, found rrdname: load_5min, value: 0.11
MULTI expansion: found fieldid: 19, found rrdname: load_15min, value: 0.04
command: perl /var/www/cacti/scripts/unix_users.pl, output: 1
command: perl /var/www/cacti/scripts/unix_processes.pl, output: 62
update /var/www/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers N:44684
update /var/www/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap N:359796
update /var/www/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min N:0.12:0.11:0.04
update /var/www/cacti/rra/localhost_users_6.rrd --template users N:1
update /var/www/cacti/rra/localhost_proc_7.rrd --template proc N:62
time: 1
[root@dc85a7e79 root]#

^^^ I ran that as Root hopefully it won't be a problem :)
www.navigatoris.net
Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

Post by Coeus »

Actually yeah - running as root doesn't help.

Please run the command as it appears in your crontab, as the same user.

Thanks

Carl
Francisco
Posts: 31
Joined: Sun Aug 01, 2004 11:09 pm

Post by Francisco »

Coeus wrote:Actually yeah - running as root doesn't help.

Please run the command as it appears in your crontab, as the same user.

Thanks

Carl
Carl, I reinstalled Cacti and the Cacti user is now Root.
www.navigatoris.net
Francisco
Posts: 31
Joined: Sun Aug 01, 2004 11:09 pm

Post by Francisco »

Heres the "source" output:

/usr/local/rrdtool-1.0.48/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Memory Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="kilobytes" \
DEF:a="/var/www/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE \
DEF:b="/var/www/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE \
AREA:a#FF4105:"Free" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
STACK:b#FFC73B:"Swap" \
GPRINT:b:LAST:"Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s"
Attachments
sad.JPG
sad.JPG (147.63 KiB) Viewed 5917 times
www.navigatoris.net
Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

Post by Coeus »

Ok, This should not be run as root. Please use cacti or cactiuser as your username.

Then run (change usernames and paths where appropriate - assuming Redhat 9 standard install):

Code: Select all

chown -R cacti:apache /var/www/html/cacti/rra
chown -R cacti:apache /var/www/html/cacti/log
chmod 644 /var/www/html/cacti/rra/*
chmod 644 /var/www/html/cacti/log/*
The rra and log directory _must_ be writable by the same user running the cron job.

Note: Can you post os version please?

Which crontab file are you editing? /etc/crontab or are you using "crontab -e" as cactiuser, they have slightly different semantics. The install process assumes you are using /etc/crontab

Can you also post the output of cmd.php when run as the same user running the cron job.

Thanks

Carl
Francisco
Posts: 31
Joined: Sun Aug 01, 2004 11:09 pm

Post by Francisco »

My friend, I think it is Finally working using Root. Do you think I should Uninstall it and use cacti as user instead?

My OS is RedHat Fedora Core 2
Attachments
working-cacti.JPG
working-cacti.JPG (156.68 KiB) Viewed 5912 times
www.navigatoris.net
Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

Post by Coeus »

Good to see :)

Shouldn't be necessary to reinstall, you just need to get the permissions right.

Switch the cron job to cactiuser, the change the permissions on rra/ and log/

Remember with testing - you have up to 5 minutes before you see any data.

Cheers

Carl
Francisco
Posts: 31
Joined: Sun Aug 01, 2004 11:09 pm

Post by Francisco »

Coeus wrote:Good to see :)

Shouldn't be necessary to reinstall, you just need to get the permissions right.

Switch the cron job to cactiuser, the change the permissions on rra/ and log/

Remember with testing - you have up to 5 minutes before you see any data.

Cheers

Carl
Ok, I will try that in a bit :)

Do I need to Add an user? Because chown tells me that the user is non-existent.

This is a Testing Install, it will work 24/7 on one of our servers. So it is not worth the Hassle if it brokes, don't you think? :D
www.navigatoris.net
Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

Post by Coeus »

Last I checked the installation instructions for cacti were a little brief in the "add cactiuser to system" part, and easily missed

Yes you do need to add a user cacti(or cactiuser note: I prefer cacti as some commands like ps limit display names to 8 chars) and this was almost certainly the cause of your problems.

For a test installation you probably dont need to worry about switching back to cactiuser

On your next installation, you will probably be able to do it from memory ;)

Cheers

Carl
Francisco
Posts: 31
Joined: Sun Aug 01, 2004 11:09 pm

Post by Francisco »

Coeus wrote:Last I checked the installation instructions for cacti were a little brief in the "add cactiuser to system" part, and easily missed

Yes you do need to add a user cacti(or cactiuser note: I prefer cacti as some commands like ps limit display names to 8 chars) and this was almost certainly the cause of your problems.

For a test installation you probably dont need to worry about switching back to cactiuser

On your next installation, you will probably be able to do it from memory ;)

Cheers

Carl
hehe :)

Hopefully, it is easier once you know how to use a bike :lol:
www.navigatoris.net
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests