The MySQL Activity Report package is a tool to help MySQL database administrators to collect several database parameters and variables. These collected values can be used for server monitoring or performance tuning purposes.
The most important component of the MySQL Activity Report is mysqlard. This daemon collects the data from a MySQL server and stores these values in a Round Robin Database.
The mysqlard package also contains example graphing, cron and php scripts. The cron scripts can be used to keep archives of the generated graphics and the php script shows the generated graphics and tries to give some tuning tips.
Before installing this package you need to have “rrdtool” installed.
Login to your server as root, then:
# cd /tmp
Download the rrdtool from http://oss.oetiker.ch/rrdtool/
# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.15.tar.gz
# tar -xvzf rrdtool-1.2.15.tar.gz
# cd rrdtool-1.2.15
# ./configure
# make
# make install
# make site-perl-install
# cd ..
# rm -rf rrdtool-1.2.15
Now, you need to install (MySQL Activity Report) mysqlard:
# cd /tmp
# wget http://gert.sos.be/downloads/mysqlar/mysqlard-1.0.0.tar.gz
# tar -xvzf mysqlard-1.0.0.tar.gz
# cd mysqlard-1.0.0
Now, configure it:
# ./configure
-OR-
# ./configure –prefix=/usr –sysconfdir=/etc –datadir=/var/lib
You can also specify the rrd and mysql path if you are facing any error while compiling
--with-rrd=PATH : set the full path to your rrdtool installation
--with-mysql=PATH : set the full path to your mysql installation
# make
# make install
Basicly, installation is completed. For configuration:
You will find the file named mysqlard.cnf at /etc folder, if this file not created by default then you have copy from the below mentioned folder:
# cp /var/lib/mysqlard/mysqlard.cnf /etc
Edit the mysqlard.cnf file and add search for below mentioend string:
RRDTOOL=""
Provide the exact path of your rrdtool.
Save and exit.
# cd /var/lib/mysqlard
# cp mysqlar.monthly /etc/cron.monthly
# cp mysqlar.weekly /etc/cron.weekly
# cp mysqlar.daily /etc/cron.daily
Now start the daemon:
# ./mysqlard.server initrrd
# ./mysqlard.server start
You need to set the correct permission for apache users and set the alias in your httpd conf file for var/lib/mysqlard folder.
Add this line on your httpd.conf :
Alias /mysqlstat/ "/var/lib/mysqlard/"
Restart the httpd services:
# /etc/init.d/httpd restart
Open your browser and browse the URL:
http://yourserverIP/mysqlstat/mysqlar.php
Good luck and enjoy it ![]()
Print This Post
Blogsphere: TechnoratiFeedsterBloglines
Bookmark: Del.icio.usSpurlFurlSimpyBlinkDigg
RSS feed for comments on this post | TrackBack URI for this post
Related Post:
- Repairing a MySQL Database
- Howto Install Rkhunter
- Creating a Welcome Message for SSH Logins
- Howto Install RoundCube on cPanel
- Howto Auto MySQL Backup on Ensim
