Hello there,
I've just upgraded a very old install of Cacti from 1.1.19 to 1.2.21 on a CentOS 6 box. After some challenges I've managed to get the upgrade completed. I'm trying to do some cleanup in terms of correct permissions (to make it secure as lots of permissions and ownerships were touched in the process (I haven't kept a track )
I'm also trying to fix a long standing issue that the graphs displayed are only six months even when viewing year old graphs. I'm using the one minute poller. and would prefer to have plots upto 2 years.
After these fixes i'm trying to move cacti to a new box which is running CentOS 7.9 and already installed with Cacti 1.2.21.
Can anyone help or guide how I can go about these?
Thanks
Upgraded from 1.1.19 to 1.2.21
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Upgraded from 1.1.19 to 1.2.21
This one is a bitch that started with IBM/SAS released a version of Cacti that screwed up the Data Source Profile (Cacti 0.8.x style), or you accidentally added the one minute RRA from the old Cacti 0.8.x version into your default settings.
The way to work this is to do a parallel install of Cacti (hopefully on a newer system as RHEL6, wow, old).
0. Install your parallel install somewhere (needs to be PHP-54 or better)
1. Make sure php-sqllite3 is installed on the new system
2. Disable the poller
3. Delete all the RRDfiles on the new system (if you had enabled the poller
4. Drop the database on the new system
5. Backup the database on the old system and restore on the new system
6. Edit all the Data Template and Set the Data Source Profile to one that is "sane", more about that below (it adds a few steps)
7. Do that same for your Data Sources. There is a data_source_profile_id column in data_template_data, just change that using the mysql prompt.
8. Once all this is done, you can enabled the poller and let the new "empty" RRDfiles be created and let them start to populate
Last bit (besides what I mentioned above) is to setup your poller account with shell access, for example enabling bash and setting up an authorized key file for transparent ssh access between the system.
Then, since the files all have the same name, you can do something as easy as:
<somevalue> might be apache or www-data or something. If it is apache, and you are running the command as apache, then you don't need the owner flag. You should do this with the poller running. Should not be a problem.
I've used the process to migrate whole systems, the one modification is that I did it in parallel using the LSF batch system.
Last bit is to drop all your Data Source Profiles and use the Cacti Defaults. So, in the first part of the setup is to do the following:
On the new system, and before you drop and restore the database from the old system:
Then, after you restored you database from the old system run this command to bring in the "default" Data Source Profiles
I know it's a lot, but not too difficult if you are command line jock.
The way to work this is to do a parallel install of Cacti (hopefully on a newer system as RHEL6, wow, old).
0. Install your parallel install somewhere (needs to be PHP-54 or better)
1. Make sure php-sqllite3 is installed on the new system
2. Disable the poller
3. Delete all the RRDfiles on the new system (if you had enabled the poller
4. Drop the database on the new system
5. Backup the database on the old system and restore on the new system
6. Edit all the Data Template and Set the Data Source Profile to one that is "sane", more about that below (it adds a few steps)
7. Do that same for your Data Sources. There is a data_source_profile_id column in data_template_data, just change that using the mysql prompt.
8. Once all this is done, you can enabled the poller and let the new "empty" RRDfiles be created and let them start to populate
Last bit (besides what I mentioned above) is to setup your poller account with shell access, for example enabling bash and setting up an authorized key file for transparent ssh access between the system.
Then, since the files all have the same name, you can do something as easy as:
Code: Select all
cd /var/www/html/cacti
for file in `ls -1 rra`;do
echo "Splicing RRDfile $file"
scp oldsystem://var/www/html/cacti/rra/$file /tmp
php -q cli/splice_rrd.php --oldfile=/tmp/$file --newrrd=rra/$file --finrrd=rra/$file --owner=<somevalue> --debug
done
I've used the process to migrate whole systems, the one modification is that I did it in parallel using the LSF batch system.
Last bit is to drop all your Data Source Profiles and use the Cacti Defaults. So, in the first part of the setup is to do the following:
On the new system, and before you drop and restore the database from the old system:
Code: Select all
mysqldump cacti data_source_profiles data_source_profiles_cf data_source_profiles_rra > /tmp/profiles.sql
Code: Select all
mysql cacti < /tmp/profiles.sql
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?
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?
Who is online
Users browsing this forum: No registered users and 1 guest