Cannot find Datasource

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
ddalton

Cannot find Datasource

Post by ddalton »

If I manually run the rrdtool to create the database, cacti works fine, I also have added the correct CDEF's and RRA's and my scheduled cron runs fine, but cacti will not create the rrd databases? Why is this? I am running on FreeBSD, Apache and php 4.2.2
ddalton

Datasource problem solved

Post by ddalton »

I noticed many people find the solution to this problem but no one posts it:

The solution is the .rrd files are created the next time cmd.php runs, not by the cacti php page, so you will get an error that the .rrd file isnt found but it will go away in the next interval that cmd.php runs.

Doug
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Exactly. I guess this isn't mentioned in the docs. It should be in that case.

-Ian
jga
Posts: 29
Joined: Mon Jul 01, 2002 3:41 pm
Location: Santiago de Chile

writing RRA files for datasource

Post by jga »

Hi 8)

For write rra's archives try this:


- put in root crontab : */5 * * * * php /var/www/html/cacti/cmd.php > /dev/null 2>&1
- change permission to rra and log dir : chown -R apache:apache /path/to/cacti/ , where path is the real path to cacti
- and now wait for crontab execution and check rra directory.

good luck

Svenka :wink:

note to rax: hi rax , can you put in cacti manual ? !!
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Sure this can be added to the manual. I do have one comment about how you are adding cmd.php to /etc/crontab though. It is usually not a good idea to run this as root, but rather a normal unix user. If cmd.php runs as root, you essentially give anyone with access to data sources root-level access to the machine since they can execute any command as root. It would also make things much worse if cacti was ever exploited.

Just a thought.

-Ian
integr8er
Posts: 18
Joined: Thu Mar 28, 2002 4:43 pm
Location: Menomonee Falls, Wi. USA
Contact:

Post by integr8er »

You sholuld run cacti under some user account (e.g. cactiusr) and set the rra and log directories as follows:

chown -R cactiusr:apache log rra
chmod 664 log rra
chmod g+s log rra

The key point is that the log and rra directories MUST provide write access to the web server user (i.e. apache).
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests