No graphs being displayed

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

Moderators: Developers, Moderators

meister
Posts: 11
Joined: Thu Sep 15, 2005 9:16 pm
Location: Canada

No graphs being displayed

Post by meister »

As a linux newbie I need a little help. I installed cacti under FC2 with the help of the guide and everything went well. I tried installing under RH9 and can't get the graphs to display. Also, not sure if it's related but I get this error when clearing the cacti.log from the ui.

Warning: unlink(/www/htdocs/cacti/log/cacti.log): Permission denied in /www/htdocs/cacti/utilities.php on line 195

Warning: touch(): Utime failed: Permission denied in /www/htdocs/cacti/utilities.php on line 196

Where can I start troubleshooting this?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

You can't clear the cacti.log from the UI unless your webserver has permissions to do so. And it not really suggested, from a security standpoint.

What do you mean graphs aren't working? Can you explain a little more, so I can begin to help you?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
meister
Posts: 11
Joined: Thu Sep 15, 2005 9:16 pm
Location: Canada

Post by meister »

I know snmp is working. It retrives the sys_name from the switch I am trying to graph. It just doesn't draw the graph. see pic.
Attachments
untitled.JPG
untitled.JPG (51.42 KiB) Viewed 3144 times
meister
Posts: 11
Joined: Thu Sep 15, 2005 9:16 pm
Location: Canada

Post by meister »

This is what I get when I turn on debug mode in graph mamagement.

ERROR: opening '/www/htdocs/cacti/rra/drysdale_traffic_in_33.rrd': No such file or directory
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Goto one of the data sources associated with one of the graphs and post the "Create Debug Syntax".

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
meister
Posts: 11
Joined: Thu Sep 15, 2005 9:16 pm
Location: Canada

Post by meister »

Data Source Debug

/usr/local/rrdtool/bin/rrdtool create \
/www/htdocs/cacti/rra/drysdale_traffic_in_32.rrd \
--step 300 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
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 \
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please try this version of lib\rrd.php and see if you get better results. Please make sure it does not break anything by running poller.php from the command line.

TheWitness
Attachments
rrd.zip
(10.82 KiB) Downloaded 154 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
meister
Posts: 11
Joined: Thu Sep 15, 2005 9:16 pm
Location: Canada

Post by meister »

Can I run it as root, or should I be cactiuser when I run it, or doesn't it matter?
meister
Posts: 11
Joined: Thu Sep 15, 2005 9:16 pm
Location: Canada

Post by meister »

Well when I run it from the command line this is what I get. Please remember you are dealing with a newbie.

[root@safe lib]# ./rrd.php
-bash: ./rrd.php: Permission denied
[root@safe lib]#

If it helps, my catci/rra dir is basically empty.

[root@safe rra]# ls -alF
total 8
drwxr-xr-x 2 cactiuser users 4096 Sep 8 19:56 ./
drwxr-xr-x 11 1000 users 4096 Sep 16 06:44 ../
-rw-r--r-- 1 cactiuser users 0 Sep 8 19:56 .placeholder
[root@safe rra]#


Also my /catci/log/cacti.log file is empty.


How can I poll from the command line to get some error messages - just trying to find out where to begin looking.
dan.ross
Posts: 18
Joined: Thu Aug 04, 2005 9:58 am

I am having a similar issue I tried the new rra.php

Post by dan.ross »

I get the following from php poller.php
]# php poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

Waiting on 1/1 pollers.
Cannot find module (NONE): At line 0 in (none)
Cannot find module (NONE): At line 0 in (none)
Waiting on 1/1 pollers.
Cannot find module (NONE): At line 0 in (none)
Cannot find module (NONE): At line 0 in (none)
Waiting on 1/1 pollers.
ERROR: Duplicate DS name: traffic_in
ERROR: Duplicate DS name: traffic_in
ERROR: opening '/var/www/html/cacti-0.8.6g/rra/i80_traffic_in_548.rrd': No such file or directory
09/16/2005 11:11:22 AM - SYSTEM STATS: Time:3.1067 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
[root@bam cacti-0.8.6g]#

I thought it would make the rrd files on the fly it doesnt seem to.
ideas? :cry:
dan.ross
Posts: 18
Joined: Thu Aug 04, 2005 9:58 am

I have some additional info

Post by dan.ross »

It appears something is broke in a cacti script somewhere. when I turned debug mode on in data source I get:
usr/local/rrdtool-1.2.11/bin/rrdtool create \
/var/www/html/cacti-0.8.6g/rra/i80_traffic_in_548.rrd \
--step 300 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
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 \

so i tried entering this manually and got the duplicat traffic_in counter error. So tediously I tried typing it in manually from the command line I intentionnaly left out the extra traffic_in and traffic_out entries and worked! i had a rrd file now. what do I need to edit so it stops trying to create duplicate traffic out entries??? :o
meister
Posts: 11
Joined: Thu Sep 15, 2005 9:16 pm
Location: Canada

Post by meister »

I just logged in as cactiuser and entered this manually and it worked.

-bash-2.05b$ /www/php/bin/php /www/htdocs/cacti/poller.php > /dev/null 2>&1

So all I have to do is remember to do it every 5 min and I should be good to go!!! lol

It's a bit of encourgement anyhow. At least I have some .rrd files and a graph now. Now to find why it doesnt execute from crontab.
dan.ross
Posts: 18
Joined: Thu Aug 04, 2005 9:58 am

offending code found but dont know how to fix

Post by dan.ross »

here is the piece of offending code when I comment out the for each I eliminated the duplicate traffic entries but then I dont get any traffic_in statements.
IDEAS?

if (sizeof($data_sources) > 0) {
foreach ($data_sources as $data_source) {
/* use the cacti ds name by default or the user defined one, if entered */
$data_source_name = get_data_source_item_name($data_source["id"]);

$create_ds .= "DS:$data_source_name:" . $data_source_types{$data_source["data_source_type_id"]} . ":" . $data_source["rrd_heartbeat"] . ":" . $data_source["rrd_minimum"] . ":" . (empty($data_source["rrd_maximum"]) ? "U" : $data_source["rrd_maximum"]) . RRD_NL;
}
meister
Posts: 11
Joined: Thu Sep 15, 2005 9:16 pm
Location: Canada

Post by meister »

I just logged in as cactiuser and entered this manually and it worked.

-bash-2.05b$ /www/php/bin/php /www/htdocs/cacti/poller.php > /dev/null 2>&1

So all I have to do is remember to do it every 5 min and I should be good to go!!! lol

It's a bit of encourgement anyhow. At least I have some .rrd files and a graph now. Now to find why it doesnt execute from crontab.
meister
Posts: 11
Joined: Thu Sep 15, 2005 9:16 pm
Location: Canada

Post by meister »

I have mine working now. I downgraded to version e, then I had to reload crond to get it to run every 5 min.

Working fine now.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest