And a happy new year!

I wish you all my best wishes for this new year.
I hope 2013 will be as exciting as 2012 for the MySQL community.

Thank you for spending time on MySQL[Plus] in 2012, I hope to have more and more readers in 2013.

If you would like to read (or read back) my posts published in 2012, here is the summary :

And all the most useful slides of 2012 are also on [Plus] :

Don’t forget to follow me on twitter for the latest news about the MySQL ecosystem :

And if you didn’t discover MyXplain before, please, take a look :

Happy new year again on [Plus]

RainGauge, the new killer tool ?

I’m sure you’ve heard of Box Anemometer from the Box (MySQL) team, an excellent UI tool based on pt-query-digest. Now the guys from the box team offer us another killer UI tool based on pt-stalk, and I’m sure you will really appreciate to use it !

What is it ?

RainGauge” consists of three parts :

  • A set of scripts that collect data about the health of your system and your databases (based on pt-stalk)
  • A process that push these data on a centralised place
  • A very simple interface to navigate in the collected data
But the collection begins only when specific conditions are triggered, and you choose what these conditions are. Find below the general flowsheet :



How to install it ?

You can find a quick start procedure on the project page but I would like to add my contribution.
The installation is quite simple but it’s important to understand how to configure the tool and on which servers.

All the collected data are stored in files, you don’t need to install and configure a database to store these data.
Apache and PHP5 are needed on the web server that hosts the centralized data.
Curl is needed on all the databases server you want to monitor. RainGauge uses Curl to push the local collected data to the web server.

Now, let me explain how to install RainGauge :

  • Of course you have to download the tool here and push it in your web server and your databases servers (in /tmp for example)
  • On the databases server side :
    • Create a new database user for RainGauge : grant [ALL|…] on *.* to ‘raingauge’@’localhost’ identified by <pass>
      • (I haven’t had time to analyze exactly what rights are needed by this user)
    • Copy the scripts (consider that the source directory is /tmp) :
      • cp /tmp/RainGauge/scripts/ /usr/bin/
      • cp /tmp/RainGauge/scripts/pt-stalk-raingauge /usr/bin/
      • cp /tmp/RainGauge/scripts/raingauge_rc /etc/raingauge_rc
      • cp /tmp/RainGauge/scripts/raingauge_service /etc/init.d/raingauge
    • Edit this file : /usr/bin/
      • Add  authentication information for this line : PORT=$(mysql -uraingauge -p<pass> -h localhost -e “select @@port” -ss)
      • Modify localhost with the name of the web server : SERVER=”localhost” => SERVER=”mywebserver”
    • Edit this file : /etc/raingauge_rc
      • Add the password of the mysql user previously created : PT_MYSQL_PASS=’<pass>
      • These lines indicate the defaults condition and threshold : PT_STALK_VARIABLE=”Threads_running” / PT_STALK_THRESHOLD=”100
        • By default RainGauge starts to collect data only if there is more than 100 running threads on the databases server
        • You can change these condition and threshold on your own
    • Start the daemon : /etc/init.d/raingauge start
  • On the web server side :
    • Just copy all the files in your www directory : cp -r /tmp/RainGauge /var/www
    • Make sure the http daemon has write permissions in the “collected” directory
    • Keep in mind that all the collected data are centralized on this server in the “collected” directory
    • When you use the web interface, files are extracted to /tmp

How to use it ?


Open you browser and enter the URL of your web server and play :
(click to enlarge)



I’m sure you’re downloading this tool now…