Cacti monitoring server data migration

Source: Internet
Author: User
Tags rrd

Cacti monitoring server data migration

In response to the customer's requirements and discussions with Wang, if a standby Cacti monitoring server is missing in the BJD environment, the data of the original Cacti monitoring server needs to be migrated to the new monitoring host to synchronize the monitoring data.

Migration idea: the cacti data host is composed of mysql Data and rra data. You only need to back up the two data parts and then restore them to the newly deployed cacti.

Procedure:

Original cacti Host IP: 192.168.0.2 backup cacti Host IP: 192.168.122.3

1. Back up mysql and rrd data on the original cacti monitoring host

Ssh 192.168.0.2

Back up the database: # mysqldump cacti> cacti. SQL cacti is the database name in the database; if the database has changed the password before:

# Mysqldump-u root-p ***** cacti> cacti. SQL ***** is the password.

2. Back up the rra file. On the internet, you need to use the rrdtool dump command to back up the rra file. Here I use tar to package it.

# Tar-cvf rra.tar/var/www/html/cacti/rra

3. Copy the cacti.sqland rra.tar files to the new cacti server.

# Scp cacti. SQL 192.168.122.3:/root

# Scp rra.tar 192.168.122.3:/var/www/html/cacti/

4. Enter the backup cacti HOST: # ssh 192.168.122.3

5. Restore database data: First Delete the cacti database in mysql (I have not changed the password here, and can enter mysql without the password ).

# Mysql

Mysql> drop database cacti; delete a cacti database

Mysql> create database cacti; create a New cacti database

Mysql> quit

# Mysql cacti <cacti. SQL Restore database

6. Restore the rrd File

# Cd/var/www/html/cacti/

# Tar xvf rra.tar

7. Restart the mysqld and httpd services.

# Service mysqld restart

# Service httpd restart

8. A database error is prompted when you open the website. Click "check" to open cacti. Note that the login password here is the original cacti password.

9. view the size of the specified mysql database

Database changed

Mysql> select concat (round (sum (DATA_LENGTH/1024/1024), 2), 'mb') as data from TABLES where

Table_schema = 'cacti ';

+ -------- +

| Data |

+ -------- +

| 4.24 MB |

+ -------- +

1 row in set (0.11 sec)

-------------------------------------- Split line --------------------------------------

In RHEL6.4, the Cacti + Spine monitoring host is used to send mail alarms.

Configure Cacti to monitor MySQL database status

Use Cacti + Spine to monitor remote hosts in RHEL6.4

CentOS 5.5 complete installation of Cacti + Spine

Cacti construction document under CentOS 6

Detailed description of Cacti monitoring deployment under RHEL5.9

How to install Cacti in CentOS 6.3

Quick installation and configuration of Cacti in CentOS Linux

-------------------------------------- Split line --------------------------------------

Cacti details: click here
Cacti: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.