[Solved] Everything perfect... except for the dreaded "

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

Moderators: Developers, Moderators

Post Reply
misc
Posts: 7
Joined: Wed Feb 28, 2007 12:18 am

[Solved] Everything perfect... except for the dreaded "

Post by misc »

Hi.

Graphs.

Am running CentOS, latest Cacti. Followed instructions exactly, and chmod'd my web root 777 just to cancel out any permission issues.

Tried three installs. First one I received no graphs.
Sendond install, I could see the initial "logged in users" and "processes" (all the ones that appear under the unix name) graphs - these were all fine. But none of the others worked such as SNMP interface stats. I removed the ones that weren't working as a test, then recreated them with no graph output once again.
Third install from latest source: See first installation attempt.

So then I did this:
Mangement -> Data Sources -> Localhost - Processes -> Turn on data source debug which reveals the following:

Code: Select all

/usr/bin/rrdtool create \
/var/www/vhosts/cacti.mydomain.it/rra/localhost_proc_7.rrd \
--step 300  \
DS:proc:GAUGE:600:0:1000 \
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 \
Perfect, exactly what it's suppose to do (except for the leading '\' on the last line, I presume this is just part of the HTML output). I run this on the command line under my www user. No errors, and my .rrd file created. I run it under the cacti user, same thing works fine.

So, why doesn't the web interface create the graphs?
Last edited by misc on Sun Mar 04, 2007 12:03 am, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Graph Management -> Select a Graph -> Debug

If its say's the file is missing, it is because you have not cron'd the poller.

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?
misc
Posts: 7
Joined: Wed Feb 28, 2007 12:18 am

Post by misc »

Well that's the thing, I have crond it. When I run it though (as the cacti user), it just hangs until 4 minutes or so before it times out.

Actually it's weird. The first couple of installations, it literally just hung until it timed out. Here is a bit more info with some output:

Code: Select all

[cacti@zero ~]$ crontab -l
*/5 * * * * /usr/bin/php -q /var/www/vhosts/cacti.mydomain.it/poller.php > /tmp/cacti

[cacti@zero ~]$ /usr/bin/php -q /var/www/vhosts/cacti.mydomain.it/poller.php
02/28/2007 01:48:08 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/vhosts/cacti.benjamin.it/cmd.php 0 1]
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
[ ... ]

misc
Posts: 7
Joined: Wed Feb 28, 2007 12:18 am

Post by misc »

By the way, yes I do get the 'file is missing' output, as there are no .rrd files at all being created in the 'rra' directory, unless of course I run rrdtool from the command line.

But, as I said in the first post, the command output looks correct. I just copy and paste that into the command line as the cacti or apache user and it then creates the .rrd files (mind you, I get the NaN problem, but I'm not worried about that as I'm sure if I fix this main problem, the NaN problem will be gone as well).
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

misc wrote:By the way, yes I do get the 'file is missing' output, as there are no .rrd files at all being created in the 'rra' directory, unless of course I run rrdtool from the command line.

But, as I said in the first post, the command output looks correct. I just copy and paste that into the command line as the cacti or apache user and it then creates the .rrd files (mind you, I get the NaN problem, but I'm not worried about that as I'm sure if I fix this main problem, the NaN problem will be gone as well).
I suppose, that there's a problem with downed host detection. In those cases, cacti will detect the host as down and will not create any rrd file nor poll for data. Please report, if there's a problem with "SNMP Error" on the device edit screen
Reinhard
misc
Posts: 7
Joined: Wed Feb 28, 2007 12:18 am

Post by misc »

gandalf wrote:I suppose, that there's a problem with downed host detection. In those cases, cacti will detect the host as down and will not create any rrd file nor poll for data. Please report, if there's a problem with "SNMP Error" on the device edit screen
Reinhard
OK, makes sense that if it detects the host being down, then the graphs won't be created.

Anyway, I went to edit localhost device. It shows my uptime correctly (which I gather it collects by SNMP). And even when I run a verbose query on interface statistics on that same page, there are no errors and I get the expected output.
misc
Posts: 7
Joined: Wed Feb 28, 2007 12:18 am

Post by misc »

OK this is interesting. When I click on devices, the status for 'localhost' is unknown. So I thought it has something to do with this. If I can get it say that it's up, then maybe it will be OK.

So, I went to the poller settings, changed 'Downed host detection' to 'Ping and SNMP' then changed 'Ping type' to ICMP. Went back into my devices and saw that the status is 'Down'.

I think it must be failing to detect that my host is up for some reason. Even when I change the poller settings back to how they originally were, it still shows localhost as being down. Do I have to wait for a while before the device is updated? How often does it check if a host is up/down?

I'll wait a while longer, but I think you are right in that the problem seems to be with Downed host detection.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Status "unknown" is default when host is created. "Down" is used, when host detection fails. It will recover from "down" after the amount of polling cycles defined in the "Settings" page. If the device answers to SNMP, just try to use "SNMP only" as downed host detection method, because ICMP requires specific privileges. Find results of those tests in cacti.log when running at DEBUG polling level
Reinhard
misc
Posts: 7
Joined: Wed Feb 28, 2007 12:18 am

Post by misc »

Hmm I can't see the polling cycles on the settings page. Is this the failure / recovery count?

Anyway I have left the settings as they were all day ("SNMP - Reliable) and it still hasn't detected it being up. If the default is "Unknown" status, then does that mean it will show it as being unknown until the next state change, regardless of whether the host is up or down?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If you are using PHP 4.x and php-snmp module, you need to implement the patches on the official web site. Is this your issue?

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?
misc
Posts: 7
Joined: Wed Feb 28, 2007 12:18 am

Post by misc »

Ahh that fixed it! Thanks a lot. I should have ran these to begin with.
ritter6281
Posts: 11
Joined: Fri Sep 30, 2005 5:12 pm
Location: Madison, WI

I have a similiar error...what patches?

Post by ritter6281 »

Oops...just fixed my problem....never mind.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests