Configure Cacti to monitor MySQL database status
MySQL itself is not powerful in performance monitoring, which makes many MySQL DBAs sleep at night. Fortunately, the MySQL database status is monitored through Cacti (monitoring rather than monitoring.
With the powerful drawing function of cacti + rrdtool and dedicated mysql templates, You can flexibly and quickly create and monitor multiple MySQL instances.
(I) For RPM installation, the following RPM packages are required:
Httpd
Php
Php-mysql
Php-snmp
Mysql
Mysql-server
Net-snmp *
(Ii) install RRDTool
# Wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.14.tar.gz
# Tar-zxv-f rrdtool-1.4.4.tar.gz
#./Configure -- prefix =/usr/local/rrdtool -- disable-python -- disable-tcl
# Make
# Make install
Possible faults:
Configure: error: Please fix the library issues listed above and try again
See → troubleshoting
(Iii) install CACTI
# Wget http://www.cacti.net/downloads/
# Useradd cacti
# Tar-zxv-f cacti-0.8.7i.tar.gz
# Music cacti-0.8.7i/var/www/cacti
# Chown-R cacti: cacti/var/www/cacti
(Iv) configure the apache module
Edit apache configuration file: vim httpd. conf
① Modify the service name:
ServerAdmin 192.168.1.113: 80
② Modify the site's start directory:
DocumentRoot "/var/www"
③ Modify the directory:
<Directory "/var/www">
④ Add the default homepage File Name:
DirectoryIndex index.html index. php
⑤ Added support for the php type:
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Then: wq save and quit!
Run apachectl-t to check the Configuration File Syntax. Normally, Syntax OK is returned:
Start snmp service: service snmpd start
Start apache service: apachectl start