일요일, 6월 23, 2024
HomeLinuxCacti MySQL Template

Cacti MySQL Template

Cacti MySQL Template

Percona MySQL Monitoring Template for Cacti

Percona MySQL Monitoring Template for Cacti

plugin download : http://www.percona.com/downloads/percona-monitoring-plugins/

Download & Installing

mkdir /usr/share/cacti/resource/percona
cd /usr/share/cacti/resource/percona

wget http://www.percona.com/downloads/percona-monitoring-plugins/1.1.4/percona-monitoring-plugins-1.1.4.tar.gz
tar zxf percona-monitoring-plugins-1.1.4.tar.gz
cd percona-monitoring-plugins-1.1.4/cacti/
cp scripts/ss_get_mysql_stats.php /usr/share/cacti/site/scripts

Configuring

vi scripts/ss_get_mysql_stats.php
-- OLD --
line 30:    $mysql_user = 'cactiuser';
line 31:    $mysql_pass = 'cactiuser';
line 32:    $mysql_port = 3306;
-- NEW --
line 30:    $mysql_user = 'mysqlID';
line 31:    $mysql_pass = 'mysqlPASSWORD';
line 32:    $mysql_port = 3306;

Import template

php /usr/share/cacti/cli/import_template.php --filename=/usr/share/cacti/resource/percona-monitoring-plugins-1.1.4/cacti/templates/cacti_host_template_percona_gnu_linux_server_ht_0.8.6i-sver1.1.4.xml --with-user-rras='1:2:3:4'

mysql setting

mysql -u root -p

mysql> GRANT SUPER, PROCESS ON *.* TO 'cacti'@'%' IDENTIFIED BY "mysqlPASSWORD";
mysql> flush privileges;
mysql> quit

Testing the Setup

 /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_mysql_stats.php --host localhost --items mm,mw,mx,my

data Template : search (percona검색후 나오는 모든 Template에 대해서 아래와 같이 DB설정

tmp_17791-Screenshot_2015-02-26-15-56-33~01-517682437tmp_5303-Screenshot_2015-02-26-14-32-04~01-517682437

tmp_5303-Screenshot_2015-02-26-14-32-56~01643376325

tmp_5303-2015-02-26_14.46.3724603266

tmp_5303-Screenshot_2015-02-26-14-34-49~01-689721604

tmp_5303-Screenshot_2015-02-26-14-35-12~01133707738

tmp_5303-Screenshot_2015-02-26-14-35-30~01-184288963

tmp_5303-Screenshot_2015-02-26-14-36-12~01-99619540

tmp_5303-Screenshot_2015-02-26-14-36-22~011203512849

tmp_5303-Screenshot_2015-02-26-14-49-00~012012249109

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular