Fresh install on Centos, no graph, no rrd files

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

Moderators: Developers, Moderators

Post Reply
vakantieman
Posts: 5
Joined: Mon Mar 29, 2004 2:03 am

Fresh install on Centos, no graph, no rrd files

Post by vakantieman »

Hello there,

I have done a fresh installating on Centos 4.2. I have installed the following packeges:

rrdtool 1.0.50
cacti (newest version)
php 4.4.x
mysql 4.1.x

I have create a cactiuser in Centos. This user runs the poller.php fine. When I do su cactiuser and run the poller.php I get this:
<br><strong>This script is only meant to run at the command line.</strong>

I think that's correct??
But when I look in cacti there is nog graph, when I look in the debug info there isn't a .rrd file in the rra directory. I can create the rrd file when I copy te command in the shell. But the graph will not update. The rights of the log and rra directory are 755 and owned by cactiuser.

Does anyone know what to do?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Fresh install on Centos, no graph, no rrd files

Post by gandalf »

vakantieman wrote:When I do su cactiuser and run the poller.php I get this:
<br><strong>This script is only meant to run at the command line.</strong>

I think that's correct??
This is not correct. You should make a crontab entry as stated in the installation guide. Run at least for two polling cycles. You may check the <path_cacti>/log/cacti.log for possible errors.
Reinhard
vakantieman
Posts: 5
Joined: Mon Mar 29, 2004 2:03 am

Post by vakantieman »

Yes, I have done that earlier. I have the same cronjob as in the instalation manual. But nothing happend after 1 our. Then i logged in my server as the cactiuser and run the command, then i saw what is say before.

Wich of these to cronjobs are right, the first is running at the moment, but is the second one maybe the solution?
1. */5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
2. */5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1

I hope we can find a solution, i have searched for other systems but cacti is the only good system!! Great work to the developers.

Anyone?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

vakantieman wrote:Yes, I have done that earlier. I have the same cronjob as in the instalation manual. But nothing happend after 1 our. Then i logged in my server as the cactiuser and run the command, then i saw what is say before.

Wich of these to cronjobs are right, the first is running at the moment, but is the second one maybe the solution?
1. */5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
2. */5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1

I hope we can find a solution, i have searched for other systems but cacti is the only good system!! Great work to the developers.

Anyone?
I'd prefer the second one to be sure that PATH has no effect. You may change

Code: Select all

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

Code: Select all

*/5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /var/www/html/cacti/log/poller.log 2>&1
Now you may have a look at the most recent poller output to search for any errors. Please post your findings
Reinhard
vakantieman
Posts: 5
Joined: Mon Mar 29, 2004 2:03 am

Post by vakantieman »

The output in poller.log is :

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

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

Is this correct? I don't think so. I am running it from te command line.
Hope you can help me?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Make sure you have php-cli or php-commandline installed on the system.
[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]
vakantieman
Posts: 5
Joined: Mon Mar 29, 2004 2:03 am

Post by vakantieman »

What do you mean with "php-cli or php-commandline".
Are that rpm's? if not, what are the names of the rpm's

We have a basic install of php, can i see that in my phpinfo?

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

Post by rony »

I'm not sure on centos, but yes they would be an RPM of some sorts.
[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]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Hmm, just had a look at my own php -m to find

Code: Select all

[PHP Modules]
bcmath
bz2
calendar
ctype
curl
dba
dbg
dbx
dio
exif
ftp
gd
gettext
gmp
iconv
ldap
mime_magic
mysql
openssl
overload
pcntl
pcre
posix
pspell
session
shmop
snmp
sockets
standard
sysvsem
sysvshm
tokenizer
wddx
xml
yp
zlib

[Zend Modules]
DBG

but no cli/commandline. rpm shows

Code: Select all

php-pear-4.3.9-3.9
php-gd-4.3.9-3.9
php-ldap-4.3.9-3.9
php-mysql-4.3.9-3.9
php-4.3.9-3.9
php-snmp-4.3.9-3.9
(gd is used by weathermap, ldap only necessary for use with cacti/LDAP Authentication)
Reinhard
vakantieman
Posts: 5
Joined: Mon Mar 29, 2004 2:03 am

Post by vakantieman »

I am missing in the command php -m the following:

dbg
mime_magic
pcntl

I have only the following Zend modules:

[Zend Modules]
eAccelerator

I don't know what the problem is. Have you any idea?
:lol:
xphu
Posts: 12
Joined: Thu Jun 30, 2005 7:31 am
Location: Helsinki, Finland

CentOS

Post by xphu »

I found cigamit´s (alias jimmy) cacti package very well organized and even though it is beta3 it is working.

http://cactiusers.org/forums/viewtopic. ... 57&start=0

Also it is very easy to install and it takes less than half an hour get it up and runnig with my old HP OmniBook 4150?

Very well done cigamit. Keep releasing nex beta but don´t work too hard.

I will move to CentOS/Cacti from Windows 2003 right now.

\xphu
|Cacti user since 0.8.4|
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests