Moving RTM HW
Moving RTM HW
Moving RTM HW
9.1.x
IBM
Platform RTM
9.1.x
IBM
Note
Before using this information and the product it supports, read the information in Notices on page 13.
First edition
This edition applies to version 9, release 1 of Platform RTM (product number 5725-G82) and to all subsequent
releases and modifications until otherwise indicated in new editions.
Copyright IBM Corporation 1992, 2015.
US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
Moving Platform RTM to a New Server . 1
Intended audience . . . . . . . . . . ..
Assumptions and requirements . . . . . . ..
High-level procedure . . . . . . . . . ..
Low-level migration details . . . . . . . ..
Auditing old installation and the use of symbolic
links . . . . . . . . . . . . . . ..
Directory permissions and service accounts . ..
Backing up and restoring the configuration
database . . . . . . . . . . . . . ..
Table dumps . . . . . . . . . . . ..
Configuring RTM table partition backups . . ..
Transferring RRDfiles . . . . . . . . ..
Third-party Cacti plug-ins . . . . . . . ..
Plug-in management. . . . . . . . . ..
1
1
1
3
3
3
4
5
5
6
7
7
. . .
. . .
. . .
the .ssh
. . .
. . .
. . .
. . .
..
..
..
..
..
..
..
8
9
9
10
10
10
11
Notices . . . . . . . . . . . . ..
13
Trademarks . . . . . . . . . . . . ..
Terms and conditions for product documentation..
Privacy policy considerations . . . . . . ..
15
15
16
iii
iv
Intended audience
To use this procedure, you should be familiar with Linux operating system
concepts.
You should be familiar with the following Linux tools and concepts:
v yum (RHEL)
v zipper (SLES)
v rsync
v /etc/passwd
v ssh-keygen
v authorized_key files
v scp
v make
v Linux file system permissions
You should also be familiar with Platform RTM, Cacti, and RRDtool.
High-level procedure
High-level steps to migrate an RTM database to another server.
Procedure
1. Audit the old server to see how much data is being used and where it is
located. Have this data handy to compare the old and new to make sure that
you have enough space for the migration.
2. Verify that the old RTM server is configured to use a service account.
High-level procedure
Review the contents of the file /opt/IBM/etc/lsfpollerd.conf for the word
Daemon_user. If the value is different from the default apache or wwwrun
account you need to substitute the actual account in use in the following
steps.
3. Make the new RTM server a client on each cluster to be monitored.
4. Install RTM on the new server that uses the appropriate service account.
5. Upgrade the RTM installation on the old server to match the new server or
make sure that the new RTM server is at the same version as the old RTM
server.
Tip: Make sure that the old RTM version is 8.0.2 or later.
6. Force an RTM backup from the old server:
Console > Grid Utilities > Force Cacti Backup
7. Download the backup to your local machine.
8. Import the backup file on the new RTM server:
Console > Grid Settings > Maint
9. Copy any custom data collection scripts from the old server to the new server.
Custom data collection scripts are typically in /opt/IBM/cacti/scripts. Scripts
typically have a PHP extension, and are not encoded. However, if you
monitor servers, routers, or switches outside of the default installation there
might be more scripts in other locations.
10. Copy any custom data query XML files from the old server to the new server.
Custom data query XML files are typically in /opt/IBM/cacti/resource/
script_server. They have a date different from the main files in this directory.
11. If you installed other Cacti data queries that use Net-SNMP, or that are
script-based, review the contents of the following two directories and transfer
the contents of them as well: /opt/IBM/cacti/resource/snmp_queries and
/opt/IBM/cacti/resource/script_queries.
12. Use scp to copy any custom or third-party Cacti plug-ins. Find the scripts you
need to copy by comparing the /opt/IBM/cacti/plugins directory on the old
RTM servers to the new one and copying what might be missing.
13. Reinstall Cacti Spine if you used it on your old server:
Console > Settings > Poller
14. Repopulate the RTM poller cache if you moved your RTM_TOP from /opt/IBM
to some other location, or if you changed the location of RTM_TOP during
migration.
15. Run rsync to synchronize your RRDfiles from the old server to the new
server. The location is /opt/IBM/cacti/rra. This location can be a symbolic
link. If you make it a symbolic link, make sure to run rsync with the correct
location. If you use the boost plug-in, flush the boost cache before you run the
rsync.
16. Make sure that all LSF clusters come up in the new RTM servers cluster
dashboard. Correct any issues with LSF before you complete the remaining
steps.
17. Dump tables on the old server that are not part of the operational backup and
restore them on the new server. Following the detailed steps in Table dumps
on page 5.
18. If you use the syslog features of RTM, redirect your execution hosts syslog
forwarding to the new RTM server. Refer to the syslog documentation for
your execution hosts for instructions.
High-level procedure
What to do next
Important: If you need to repeat these steps, keep your old production RTM
server running until migration is successful. Do not shut down your RTM server
until you are satisfied that this procedure worked.
Procedure
1. Review the storage configuration of the old RTM server.
Table 1 provides samples of different storage types that can be symbolically
linked to key directories.
Table 1. Sample installer symbolic links of key directories to different storage types
Location
/var/lib/mysql
/opt/IBM/cacti/rra
/opt/IBM/cacti/log
/opt/IBM/[cacti|rtm|flexlm|advocate]
/opt/IBM/cacti/backup
2. Make sure that the following locations on your new system have enough space.
/opt/IBM/cacti/rra
/opt/IBM/cacti/backups
/var/lib/mysql
3. Use the following command to determine how much space each directory
occupies. For example:
du -hs /opt/IBM/cacti/rra
Procedure
1. Take a snapshot of the operational configuration. Navigate to Console >
Utilities > Grid Utilities, and choose Force Cacti Backup as illustrated in
Figure 1.
2. Select the most recent link from the forced backup from the Backup Files list to
download to your local workstation.
3. On the new RTM server, navigate to Console > Configuration > Grid Settings
> Maint, and click Browse to select the Database Restore file to upload as
illustrated in Figure 2 on page 5.
4. Click Save.
Restoring the database can take some time. All of the Cacti devices, graphs,
clusters, and license services are restored on the new system.
Important: Job history is not restored. You must dump and restore tables to
restore job history, as described in Table dumps.
Table dumps
The RTM operational backup does not include all RTM tables. This is because of
the large size of the backup and the impact on performance. You must manually
dump some tables and restore them on the new RTM server during migration.
Run the following dump command as root or as the RTM SQL account:
mysqldump --insert-ignore --no-create-info --lock-tables=FALSE cacti
grid_jobs_finished grid_jobs_jobhosts_finished grid_jobs_reqhosts_finished
grid_jobs_pendreasons_finished grid_job_daily_stats grid_jobs_rusage
grid_job_interval_stats > /tmp/grid_tables.sql
mysqldump --insert-ignore --no-create-info --lock-tables=FALSE cacti lic_daily_stats
lic_daily_stats_traffic lic_interval_stats > /tmp/lic_tables.sql
Run the following commands to restore these tables on the new server:
mysql cacti < /tmp/grid_tables.sql
mysql cacti < /tmp/lic_tables.sql
If the dump process takes a long time, run gridacct to see the time range between
when the dump was started and finished. See the gridacct documentation for the
procedure to get legacy LSF account records from clusters.
Important: Schedule the restore process of these tables to avoid periods of
database maintenance. Perform the dump and restore as close to the end time as
possible for the previous RTM maintenance cycle, but never before it has had a
chance to complete.
Procedure
1. Upgrade to an RTM version that supports partition backups. Configure backup
partitions under Console > Grid Settings > Maint, select Enable Record
Partitioning, and configure Backup Table Partitions as shown in Figure 3.
2. Before you migrate, make sure that at least one day has passed.
3. After you wait on day, locate the files in /opt/IBM/cacti/backup/
partition_backups.
4. Transfer the files to the new server, and run the following command on the
new server:
cd /opt/IBM/cacti/plugins/grid
php -q database_restore_partitions.php
This process restores all the legacy data to the new RTM database. Again, try to
complete this process before the RTM database maintenance takes place.
Important: The RTM command database_restore_partitions.php was not
introduced until RTM version 8.0.2. Therefore, it is important to be at that
release before you transfer data between servers.
Transferring RRDfiles
When you transfer RRDfiles as part of migration, use the following steps to make
sure that you set the correct permissions.
Procedure
1.
2.
3.
4.
Run the following rsync command. Paths cannot contain symbolic links.
cd /opt/IBM/cacti
rsync -rp rra newserver:/opt/IBM/cacti
nectar
ptskin
rtmssh
settings
v superlinks
v syslog
v thold
If you have any plug-ins other than those listed, copy them from the old server to
the new server. In general, the RTM operational backups contain the rest of the
configuration data required once the copy is complete.
Plug-in management
Install most Cacti plug-ins with Plug-in Management.
Procedure
1. Make and access a Spine directory.
mkdir /opt/spine
cd /opt/spine
Remember: With RTM 9.1.2 and later, the installation directory for the Cacti code
changed from /opt/cacti to /opt/IBM/cacti.
When the migration is complete, make sure that you remove the secure shell access
and the .ssh directories for the apache account.
Run rsync as many times as required until the system is migrated successfully.
This includes having a clog that is 100% green.
Procedure
1. Edit /etc/passwd and change the /sbin/nologin to /bin/bash for the apache
account.
2. Change directories to the apache user home directory. On RHEL. the home
directory is /var/www.
3. Make a .ssh directory.
mkdir .ssh;chown apache:apache .ssh
Procedure
1. Switch to the apache account.
su - apache
2. Make an ssh key pair using the following command ssh-keygen. Use the
defaults for everything.
3. Change to the .ssh directory.
4. Copy the id_rsa.pub file to the authorized_keys file.
cat id_rsa.pub > authorized_keys
Procedure
1. Update the internal variable in the RTM settings table called path_webroot. This
path is updated automatically as the crontab-based poller runs. Check this
setting by running the following mysql commands:
mysql -ucacti -padmin cacti
SELECT * FROM settings WHERE name LIKE path_webroot;
quit;
2. Update the contents of the poller cache table poller_item. To update the paths
in the poller cache to their new entries, run the following command:
cd RTM_TOP/cacti/cli
php -q rebuild_poller_cache.php
If the two values differ, make them the same by either replacing the database
value, or the contents of the .appkey file. Use the following command to restart the
advocate service:
/etc/init.d/advocate restart
10
11
12
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document
in other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user's responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not grant you
any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
For license inquiries regarding double-byte character set (DBCS) information,
contact the IBM Intellectual Property Department in your country or send
inquiries, in writing, to:
Intellectual Property Licensing
Legal and Intellectual Property Law
IBM Japan, Ltd.
19-21, Nihonbashi-Hakozakicho, Chuo-ku
Tokyo 103-8510, Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
This information could include technical inaccuracies or typographical errors.
Changes are periodically made to the information herein; these changes will be
incorporated in new editions of the publication. IBM may make improvements
and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
Copyright IBM Corp. 1992, 2015
13
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
IBM Corporation
Intellectual Property Law
Mail Station P300
2455 South Road,
Poughkeepsie, NY 12601-5400
USA
Such information may be available, subject to appropriate terms and conditions,
including in some cases, payment of a fee.
The licensed program described in this document and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement or any equivalent agreement
between us.
Any performance data contained herein was determined in a controlled
environment. Therefore, the results obtained in other operating environments may
vary significantly. Some measurements may have been made on development-level
systems and there is no guarantee that these measurements will be the same on
generally available systems. Furthermore, some measurement may have been
estimated through extrapolation. Actual results may vary. Users of this document
should verify the applicable data for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of
those products, their published announcements or other publicly available sources.
IBM has not tested those products and cannot confirm the accuracy of
performance, compatibility or any other claims related to non-IBM products.
Questions on the capabilities of non-IBM products should be addressed to the
suppliers of those products.
All statements regarding IBM's future direction or intent are subject to change or
withdrawal without notice, and represent goals and objectives only.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which
illustrates programming techniques on various operating platforms. You may copy,
modify, and distribute these sample programs in any form without payment to
IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating
platform for which the sample programs are written. These examples have not
been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or
14
Trademarks
IBM, the IBM logo, and ibm.com are trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide. Other product and
service names might be trademarks of IBM or other companies. A current list of
IBM trademarks is available on the Web at "Copyright and trademark information"
at http://www.ibm.com/legal/copytrade.shtml.
Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo,
Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or
registered trademarks of Intel Corporation or its subsidiaries in the United States
and other countries.
15
Applicability
These terms and conditions are in addition to any terms of use for the IBM
website.
Personal use
You may reproduce these publications for your personal, noncommercial use
provided that all proprietary notices are preserved. You may not distribute, display
or make derivative work of these publications, or any portion thereof, without the
express consent of IBM.
Commercial use
You may reproduce, distribute and display these publications solely within your
enterprise provided that all proprietary notices are preserved. You may not make
derivative works of these publications, or reproduce, distribute or display these
publications or any portion thereof outside your enterprise, without the express
consent of IBM.
Rights
Except as expressly granted in this permission, no other permissions, licenses or
rights are granted, either express or implied, to the publications or any
information, data, software or other intellectual property contained therein.
IBM reserves the right to withdraw the permissions granted herein whenever, in its
discretion, the use of the publications is detrimental to its interest or, as
determined by IBM, the above instructions are not being properly followed.
You may not download, export or re-export this information except in full
compliance with all applicable laws and regulations, including all United States
export laws and regulations.
IBM MAKES NO GUARANTEE ABOUT THE CONTENT OF THESE
PUBLICATIONS. THE PUBLICATIONS ARE PROVIDED "AS-IS" AND WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING
BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY,
NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
16
and other technologies, you should seek your own legal advice about any laws
applicable to such data collection, including any requirements for notice and
consent.
For more information about the use of various technologies, including cookies, for
these purposes, see IBMs Privacy Policy at http://www.ibm.com/privacy and
IBMs Online Privacy Statement at http://www.ibm.com/privacy/details the
section entitled Cookies, Web Beacons and Other Technologies and the IBM
Software Products and Software-as-a-Service Privacy Statement at
http://www.ibm.com/software/info/product-privacy.
17
18
IBM
Printed in USA