No logs, no rrds no graphs, help?

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

Moderators: Developers, Moderators

Post Reply
rspurlock
Posts: 5
Joined: Mon Oct 24, 2005 4:25 pm

No logs, no rrds no graphs, help?

Post by rspurlock »

All,

Hair is now all gone. I've searched the forums for help with this, uninstalled and reinstalled twice and I must be missing something simple. I have 0.8.6g installed, all the latest apps required also. No matter what I do, nothing is written to the log file. No rrd's are created, no errors show up anywhere. Yet no graphs are created. When I run the poller.php manually with the cactiuser user, all I get is this:

[cactiuser@ns1 log]$ /usr/bin/php /var/www/html/cacti/poller.php
Content-type: text/html
X-Powered-By: PHP/4.4.0

<br><strong>This script is only meant to run at the command line.</strong>

Nothing written to log. Nothing in apache log files.

If I take the rrd code and run it manually at cli using the cactiuser, it does create a rrd file in the rra folder. But nothing gets updated on the graph. It just says nan (not a number I assume).

Here is my crontab entry:

*/5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1


Everything else seems to work fine. I have the rrdtool set for version 1.2 in settings. It seems to talk snmp fine through website and the connection to mysql works fine.

Anyone have any idea where I could start? I just feel like I'm missing something simple here.

TIA,

Rob
zervun
Posts: 2
Joined: Mon Oct 24, 2005 5:44 pm

Post by zervun »

I'm in the exact same boat, I thought it was permissions


no rra files are being created

I'm using the poller.php also, cron script same

I can see the under the poller cache that it's getting snmp stuff (cisco 6506) but it never saves them to rra databases.

is it because I'm using

rrdtool-1.0.46-32.1?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Use rrdtool 1.0.49 or 1.2.x.
[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]
rspurlock
Posts: 5
Joined: Mon Oct 24, 2005 4:25 pm

Anyone?

Post by rspurlock »

I'm using 1.2.11 currently. Surely someone has run into this problem?

BTW I'm running CentOS 3.5, Apache 2.0.46, PHP 4.4.0 and MySQL 4.1.14.

Anyone?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

What version of php is running the poller?

Do a php -v and post the results.
[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]
rspurlock
Posts: 5
Joined: Mon Oct 24, 2005 4:25 pm

Post by rspurlock »

4.4.0
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Redirect your cron output to a file for 1 or 2 passes of the poller and then review/tail that file and see what's up.

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?
rspurlock
Posts: 5
Joined: Mon Oct 24, 2005 4:25 pm

Output

Post by rspurlock »

Ok, I set the crontab to output to a text file and I get this:

"/bin/sh: line 1: cactiuser: command not found"

So apparently by setting it up like I have doesn't work for the root crontab. So I removed it from root's crontab and set it up for cactiuser's crontab and I get the following:

Content-type: text/html
X-Powered-By: PHP/4.4.0

<br><strong>This script is only meant to run at the command line.</strong>Content-type: text/html
X-Powered-By: PHP/4.4.0

<br><strong>This script is only meant to run at the command line.</strong>

Same thing. Any ideas/ It's almost like it's just not running the script at all, but it is.
User avatar
rcaston
Cacti User
Posts: 204
Joined: Tue Jan 06, 2004 7:47 pm
Location: US-Dallas, TX
Contact:

Same problem

Post by rcaston »

Try running the poller as root.


For some reason I can't get my poller.php to work unless it runs as root, as a normal user it produces the following output:

PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/cacti/lib/ping.php on line 97
PHP Warning: socket_set_option() expects parameter 1 to be resource, boolean given in /var/www/cacti/lib/ping.php on line 106
PHP Warning: socket_create() Unable to create socket [1]: Operation not permitted in /var/www/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/cacti/lib/ping.php on line 97
PHP Warning: socket_set_option() expects parameter 1 to be resource, boolean given in /var/www/cacti/lib/ping.php on line 106
10/26/2005 12:30:46 PM - SYSTEM STATS: Time:1.3224 Method:cmd.php Processes:8 Threads:N/A Hosts:48 HostsPerProcess:6 DataSources:549 RRDsProcessed:0


perhaps i'm missing some sort of security issue related to php and creating sockets?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please download the updated lib/ping.php from SVN. Here is the link. This will correct your problem.

http://svn.cacti.net/cgi-bin/viewcvs.cg ... e&view=log

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?
rspurlock
Posts: 5
Joined: Mon Oct 24, 2005 4:25 pm

Post by rspurlock »

Does anyone have any ideas about my issue? I can run the poller all day long and it spits out nothing and logs nothing. Does someone want to have a look themselves? I'll gladly open it up for a developer or helpful person to take a look.

TIA

Rob
apharas
Posts: 18
Joined: Mon Oct 10, 2005 12:25 pm

Post by apharas »

*/5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1



There seems to be a bit of confusion for some users regarding the above line of code for a crontab entry. This code is meant to be placed in file in the cron.d directory, not in a user/root crontab. If you are editing root or preferably cactiuser's crontab with 'crontab -e' what you really want to enter is:

*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1

Give that a try and see if your poller is working properly.

--
Alex
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests