README - mysql_stats.php - version 3.0 - December 2005.

 - Originally by berger@hk-net.de 2005/01/18 (thanks, man!)

 - Extensivly modified by by Tim Ellis (time AT digg DOT com) of Digg, Inc
   during the hoary winter days of December, 2005.

 - InnoDB support and much valuable feedback by Peter Zaitsev of MySQL AB.

 - Memcached graphing support by Tim Ellis of Digg, Inc.


INSTALLATION
============

----------------------------------!!!!!!!!-----------------------------------
WARNING: These graphs assume a 1-minute Poller cron frequency! If you use the
default 5-minute interval, run convertXmlTo5minutePollingInterval.sh, which
will make a step=300, heartbeat=600 version of the XML file for you to import.

If you don't do this, none of your graphs will ever show any data.
----------------------------------!!!!!!!!-----------------------------------

1. Put mysql_stats.php and dumpMemcachedStats.php in cacti/scripts/
2. Either ensure your cacti poller is cron'd every 1 minute, or run the included
   BASH shell script to create a 300/600 step/heartbeat version of the XML file.
3. Import the .XML host using the cacti webinterface. Note, this XML file is
   rather large. If you try to import it, and nothing happens, check your Apache
   logs. If you see "Allowed memory size of 8388608 bytes exhausted," you need
   to edit your php.ini and change "memory_limit = 8M" to something larger, say
   "memory_limit = 32M" (this worked for me).


USAGE
=====

Configure the MySQL-server you want to graph. To enable access from the
Cacti-machine to the MySQL-status informations, you must have the "process"
right. If you want to monitor InnoDB stats, the cactiuser needs the "SUPER"
privelege. The following are example SQL statements to give the "cacti" user
priveleges for both from the "cactimachine" computer.

	GRANT PROCESS ON * TO cacti@'cactimachine' IDENTIFIED by 'cactipasswd';
	GRANT SUPER ON * TO cacti@%'cactimachine' IDENTIFIED BY 'cactipasswd';


GRAPH CREATION
==============

0. Make sure you installed mysql_stats.php and dumpMemcachedStats.php.
1. Go to Management/Devices.
2. Add a new device.
3. Description can be whatever you want.
4. Hostname should resolve to IP of database machine.
5. Host template is teMySQL or memcached Host.
6. Now choose the "Create Graphs" link.
7. Highlight all graphs for the host (assuming you want them all).
8. Choose "Create"
9. A page will come up with several Password/Username pairs, fill them
   all in with the cactipasswd/cactiuser you chose above. Hint: If you're
   using Firefox, the second host you do this for you can just press down-
   arrow twice, then tab, and the value will be filled in automatically
   by the browser. The first time, I suggest typing in the username, copying
   it, then doing a "paste-tab-tab-paste-tab-tab..." key combo until they're
   all filled in, then repeat for the password. Painful, but doable.

