Error with poller.php

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

Moderators: Developers, Moderators

Post Reply
mcolas
Posts: 25
Joined: Fri Jan 30, 2009 4:46 am
Location: Bruxelles, Belguim

Error with poller.php

Post by mcolas »

Hello,

I have some problem with the graph part. When I push the command "php poller.php" in the cacti folder I received this error :

ERROR: min must be less than max in DS definition
ERROR: opening '/var/www/cacti/rra/sw_floor0_1_traffic_in_145.rrd': No such file or directory

When I go to the rra folder I have a empty folder. Cacti run under ubuntu server 8.04.1

Someone can help me ?
daksh
Cacti User
Posts: 78
Joined: Tue Nov 11, 2008 4:46 pm

Post by daksh »

Checkout this link http://docs.cacti.net/node/283

You should look at #6; make sure cacti user can write to the directory where rrd files are stored.
mcolas
Posts: 25
Joined: Fri Jan 30, 2009 4:46 am
Location: Bruxelles, Belguim

Post by mcolas »

Thx for the link.
I have this when I wrote the command ls -al rra

total 8
drwxr-xr-x 2 root root 4096 2009-01-29 17:41 .
drwxr-xr-x 12 root root 4096 2009-01-30 13:52 ..
-rw-r--r-- 1 nagios root 0 2009-01-26 14:31 .placeholder

I don't understand as well 'cacti user'.
What is the cacti user ? the mysql db owner user ?
daksh
Cacti User
Posts: 78
Joined: Tue Nov 11, 2008 4:46 pm

Post by daksh »

Cacti program runs by a user other then root. Normally the username is "cactiuser".


Do:

Code: Select all

 
cat /etc/passwd | grep -i cacti
This will show you if you have a "cactiuser" on your system, you should...


Now, go to the directory where cacti is installed and do

Code: Select all

ls -ld rra
You must give write perms to the "cactiuser" to rra directory. See #6 in the link I sent you in previous post.
mcolas
Posts: 25
Joined: Fri Jan 30, 2009 4:46 am
Location: Bruxelles, Belguim

Post by mcolas »

Ok I understand my error
I have not created the login cactiuser and I put instead the root user.

So I try to create this login as the documentation show here :
http://www.cacti.net/downloads/docs/pdf/manual.pdf chapter 2 paragraphe 2.6
But it doesn't work when I try to put it for the rra right folder.

I suppose that I must create the user cactiuser into the linux server but I don't know if I must put specify right or anything else for it.

Can you help for this matter ?
mcolas
Posts: 25
Joined: Fri Jan 30, 2009 4:46 am
Location: Bruxelles, Belguim

Post by mcolas »

ok I create a cactiuser and now when the poller run I have no error but I have problems yet.
In the rra folder, the poller create a folder with the name 3 and put the *.rra file into. The *.rra file have no good right because its the user root and not cactiuser when I do the ls -la command into /rra/3.

I don't understant why this folder is created and the rights are not good.
Can you help me ?
daksh
Cacti User
Posts: 78
Joined: Tue Nov 11, 2008 4:46 pm

Post by daksh »

Ok, now go to the directory where rra folder is located, then run following command:

Code: Select all

chown cactiuser rra
Make sure the poller is running as cactiuser instead of root. This is also explained in the same install documentation.

Good luck
mcolas
Posts: 25
Joined: Fri Jan 30, 2009 4:46 am
Location: Bruxelles, Belguim

Post by mcolas »

Thanks a lot for your help.
now I have the rrd file created but in the wrong location as described in the post below and with the wrong rights but my crontab is ok.
When I push this command crontab -e the result is :

GNU nano 2.0.7 File: /tmp/crontab.bKVUab/crontab

# m h dom mon dow command
*/5 * * * * cactiuser php /var/www/cacti/poller.php > /dev/null 2>&1

Is it ok ?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests