Previously, nagios and cacti were installed using yum through epel. Now you need to migrate to another machine.
Old monitoring machine 192.168.1.200 centos 6x64
New invigilator 192.168.1.201 centos 6x64
The following operations are performed on the new monitoring machine by default, unless otherwise specified.
1. Install nagios and cacti (the specific configuration process is omitted)
Yum install nagios-plugins-all cacti mysql-server -- enablerepo = epel
2. migrate nagios
Rsync-av -- delete 192.168.1.200:/etc/nagios-e ssh
Rsync-av -- delete 192.168.1.200:/usr/lib64/nagios/plugins // usr/lib64/nagios/plugins/-e ssh
Service nagios start
3. migrate cacti
# Stop the poller. php regular plan on the New and Old monitoring machines and freeze data to prevent new data from being generated.
# Export the mysql database on the old monitoring Machine
Mysqldump-u root-p cacti> cacti-data. SQL
Scp cacti-data 192.168.1.201:/tmp/
# Import data to the new monitoring Machine
Mysql-u root-p cacti <cacti-data. SQL
# Import rrd files and others
Rsync-av -- delete 192.168.1.200:/var/lib/cacti // var/lib/cacti/-e ssh
# Enable the timing plan for poller. php on the new monitoring Machine
Php/usr/share/cacti/poller. php>/dev/null 2> & 1
4. Check whether custom scripts on nagios and cacti can run normally. In particular, perl scripts may depend on some software packages!