Please replace the {main_IP} etc. with your own parameters.
Main Cacti
Cacti Version: 1.1.6 (upgraded from CactiEZ 0.7)
Spine Version: 1.1.6
IP-address: main_IP
MySQL User : cactiuser
MySQL Database: cacti
MySQL PW: main_PW
Spare Cacti
Cacti Version: 1.1.6 (upgraded from CactiEZ 0.7)
Spine Version: 1.1.6
IP-address: spare_IP
MySQL User: cactiuser
MySQL Database: cacti
MySQL PW: spare_PW
On Main Cacti
Comment bind-address=127.0.0.1 in /etc/my.cnf.d/server.cnf:
Code: Select all
shell> vi /etc/my.cnf.d/server.cnf
#bind-address=127.0.0.1
Code: Select all
shell> mysql -u root -p
mysql> GRANT ALL ON cacti.* TO cactiuser@{spare_IP} IDENTIFIED BY '{main_PW}';
mysql> flush privileges;
mysql> exit;
Code: Select all
shell> service mysql restart
Shutting down MySQL... SUCCESS!
Starting MySQL.170519 16:34:25 mysqld_safe Logging to '/var/log/mysqld.log'.
170519 16:34:25 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
. SUCCESS!
Open port 3306 (MySQL) for Spare Cacti:
Code: Select all
shell> iptables -I RH-Firewall-1-INPUT -p tcp -s {spare_IP} -m tcp --dport 3306 -j ACCEPT
Code: Select all
shell> vi /usr/local/spine/etc/spine.conf
DB_Host localhost
DB_Database cacti
DB_User cactiuser
DB_Pass {main_PW}
DB_Port 3306
RDB_Host {spare_IP}
RDB_Database cacti
RDB_User cactiuser
RDB_Pass {spare_PW}
RDB_Port 3306
On Spare Cacti
Test MySQL from spare to main:
Code: Select all
shell> mysql -u cactiuser --password={main_PW} -h {main_IP}
Code: Select all
shell> vi /etc/my.cnf.d/server.cnf
#bind-address=127.0.0.1
Code: Select all
shell> mysql -u root -p
mysql> GRANT ALL ON cacti.* TO cactiuser@{main_IP} IDENTIFIED BY '{spare_PW}';
mysql> flush privileges;
mysql> exit;
Code: Select all
shell> service mysql restart
Shutting down MySQL... SUCCESS!
Starting MySQL.170519 16:34:25 mysqld_safe Logging to '/var/log/mysqld.log'.
170519 16:34:25 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
. SUCCESS!
Open port 3306 (MySQL) for Main Cacti:
Code: Select all
shell> iptables -I RH-Firewall-1-INPUT -p tcp -s {main_IP} -m tcp --dport 3306 -j ACCEPT
Code: Select all
shell> vi /usr/local/spine/etc/spine.conf
DB_Host localhost
DB_Database cacti
DB_User cactiuser
DB_Pass {spare_PW}
DB_Port 3306
RDB_Host {main_IP}
RDB_Database cacti
RDB_User cactiuser
RDB_Pass {main_PW}
RDB_Port 3306
Code: Select all
shell> vi /var/www/html/include/config.php
$rdatabase_type = 'mysql';
$rdatabase_default = 'cacti';
$rdatabase_hostname = '{main_IP}';
$rdatabase_username = 'cactiuser';
$rdatabase_password = '{main_PW}';
$rdatabase_port = '3306';
$rdatabase_ssl = false;
#$poller_id = 1;
$poller_id = 2;
On Main Cacti
Test MySQL from main to spare:
Code: Select all
shell> mysql -u cactiuser --password={spare_PW} -h {spare_IP}
Browser interface
Data Collection >> Data Collectors
Possibly a collector has no name and thus no link to edit it. It can be reached on:
http://{main_IP}/pollers.php?action=edit&id={poller_id}