I found this "hint" of what may have been deployed incorrectly...
http://forums.cacti.net/viewtopic.php?p=130491#p130491
I imported the cacti.sql from terminal as root user. Could that be an/the issue?
and now I can find no trace of the cacti.sql file that I may have imported the first time.
Can I re-deploy and 0.8.7g cacti.sql into the db as the correct user and not lose anything?
I hope I am not rambling here and that some of this gibberish actually makes sense.
Thank you.
[SOLVED] Permissions/ownership and rrd creation
Moderators: Developers, Moderators
Re: Permissions/ownership and rrd creation
Please perform this and post its result:Hicupping now resolved, it was permissions, but I still can't create new graphs, and a handful of previously existing graphs are coming up NaN.
Code: Select all
% ls -ld /var/lib/cacti/rra/
% ls -l /var/lib/cacti/rra/xxxx.rrd
% rrdtool info /var/lib/cacti/rra/xxxx.rrd
('xxxx.rrd' is the file which has problem)
- It's better that poller runs as certain normal user (e.g. cactiuser)
- Poller user must have write permission to rra/ & log/ directory & files within
- Web server user (e.g. www-data) must have write permission to log/cacti.log
See this topic: http://forums.cacti.net/viewtopic.php?p=135298#p135298I have to ask if setting/changing the system timezone last week, could have had an effect on these entities?
1) 'Console' -> 'Data Sources' -> (your datasource)Can I create .rrd files via c-line and then "encourage" cacti to use those?
2) Click "Turn Off Data Source Debug Mode"
3) See "Data Source Debug"
But probably it doesn't solve root cause even if you can create RRD in this way.
Please follow to this document: Upgrading Cacti - Cacti DocsCan I backup my rra/*.rrd files, purge and re-install Cacti and/or rrdtool and put them back and still have the populated graphs?
It is like as upgrading from one version to the same version.
Which is "root user" you mentioned, local user (in /etc/passwd) or database user (in include/config.php) ?I imported the cacti.sql from terminal as root user. Could that be an/the issue?
and now I can find no trace of the cacti.sql file that I may have imported the first time.
Can I re-deploy and 0.8.7g cacti.sql into the db as the correct user and not lose anything?
I think, database user should be consistent with include/config.php,
but maybe it's not big matter when the user has valid privileges to cacti database.
Re: Permissions/ownership and rrd creation
ls -ld /var/lib/cacti/rra/
ls -1 /var/lib/cacti/rra/norveld_cpupercentpriv_404.rrd /var/lib/cacti/rra/norveld_sinfmemsysdrvtotb_413.rrd
Which is "root user" you mentioned, local user (in /etc/passwd) or database user (in include/config.php) ?
root system user.
I think, database user should be consistent with include/config.php
but maybe it's not big matter when the user has valid privileges to cacti database.
It's not with a "grant all privileges" statement to the correct user.
I changed this to the root system account as a test and no change.
Should "Data Source Path" be blank when adding a new ds?
but under debug|output it shows
/var/lib/cacti/rra/xxx.rrd
but the "Data Source Path" box is completely empty?
Only after Save and then re-opening is it populated with "<path_rra>/xxx.rrd"
although they don't actually exist.
NOTE: the instructions at http://docs.cacti.net/manual:087:1_inst ... _upgrading are inaccurate. There is no cacti "table" but there is a cacti database, neither is there a cacti.cacti table.
It says "Backup the old Cacti database." but gives instructions for backing up/dumping a table.
If the cacti database only had 1 table, I believe those instructions need a review.
Reinhard/Gandalf knows his stuff and he appears to be the author judging by the footer. "2010/09/18 04:58 by gandalf"
Perhaps it references an older version of mysql or a method I am not totally familiar with? I dunno.
I can backup/dump a db/table with the best of them.
mysqldump -uroot -p cacti > /path/to/output.sql is sufficient as is
cp -pr /var/lib/mysql/cacti /var/lib/mysql/cacti.backup
Thank you.
Code: Select all
drwxrwxrwx 2 www-data www-data 20480 2011-06-29 11:40 /var/lib/cacti/rra/
Code: Select all
/var/lib/cacti/rra/norveld_cpupercentpriv_404.rrd
/var/lib/cacti/rra/norveld_sinfmemsysdrvtotb_413.rrd
root system user.
I think, database user should be consistent with include/config.php
but maybe it's not big matter when the user has valid privileges to cacti database.
It's not with a "grant all privileges" statement to the correct user.
I changed this to the root system account as a test and no change.
Should "Data Source Path" be blank when adding a new ds?
but under debug|output it shows
/var/lib/cacti/rra/xxx.rrd
but the "Data Source Path" box is completely empty?
Only after Save and then re-opening is it populated with "<path_rra>/xxx.rrd"
although they don't actually exist.
NOTE: the instructions at http://docs.cacti.net/manual:087:1_inst ... _upgrading are inaccurate. There is no cacti "table" but there is a cacti database, neither is there a cacti.cacti table.
It says "Backup the old Cacti database." but gives instructions for backing up/dumping a table.
If the cacti database only had 1 table, I believe those instructions need a review.
Reinhard/Gandalf knows his stuff and he appears to be the author judging by the footer. "2010/09/18 04:58 by gandalf"
Perhaps it references an older version of mysql or a method I am not totally familiar with? I dunno.
I can backup/dump a db/table with the best of them.
mysqldump -uroot -p cacti > /path/to/output.sql is sufficient as is
cp -pr /var/lib/mysql/cacti /var/lib/mysql/cacti.backup
Thank you.
Re: Permissions/ownership and rrd creation
Installed a parallel copy from Source and all my issues went away.
Ubuntu sucks. I think it's Vulcan for "Windows" personally.
Thank you for all your help with this issue. I really appreciate it.
I owe you one iBeer.
Ubuntu sucks. I think it's Vulcan for "Windows" personally.
Thank you for all your help with this issue. I really appreciate it.
I owe you one iBeer.
Re: Permissions/ownership and rrd creation
>> Installed a parallel copy from Source and all my issues went away.
Cheers.
Only about this point,
http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html
>> I owe you one iBeer.
Sorry, I'm using Android.
Cheers.
Only about this point,
I think the 1st argument of mysqldump means "database"...cirrhus9 wrote:NOTE: the instructions at http://docs.cacti.net/manual:087:1_inst ... _upgrading are inaccurate. There is no cacti "table" but there is a cacti database, neither is there a cacti.cacti table.
It says "Backup the old Cacti database." but gives instructions for backing up/dumping a table.
http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html
>> I owe you one iBeer.
Sorry, I'm using Android.
Re: [SOLVED] Permissions/ownership and rrd creation
and I googled "mysql +"--add-drop-table"" too!
My google skills must be rusty.
Peace.
My google skills must be rusty.
Peace.
Re: [SOLVED] Permissions/ownership and rrd creation
Oops, (probably) I've understood what you mean.
>> It says "Backup the old Cacti database." but gives instructions for backing up/dumping a table.
Certainly it will dump tables of given database. (Yes, the database cannot be created by the dumped query itself)
When restoring, it needs to create target database (cacti) beforehand by using mysqladmin command...
>> It says "Backup the old Cacti database." but gives instructions for backing up/dumping a table.
Certainly it will dump tables of given database. (Yes, the database cannot be created by the dumped query itself)
When restoring, it needs to create target database (cacti) beforehand by using mysqladmin command...
Who is online
Users browsing this forum: No registered users and 1 guest