Percona Cloud Tools for MySQL

Update: Check the documentation on this link for an easy install of the agent. Make sure the toolkit is installed too. Then go to the cloud dashboard and enable the metrics. You may also need to add your MySQL server on that page before activating the stats.

Here’s an article from the great Percona guys about using their new cloud tool to easy log and monitor your mysql database instances: http://www.mysqlperformanceblog.com/2014/02/03/quick-installation-guide-for-percona-cloud-tools-for-mysql/

You should definitely try and use it as it provides some data you may never thought about and will help you see the big picture about your servers.

If the link to percona-toolkit deb is not working for you and you’re using Ubintu like me you can use the percona Ubuntu repos and install the toolkit that way:

apt-get install percona-toolkit

Installing the pt agent is nothing but:

pt-agent --install --user={mysql username} --password={password} --api-key={API Key copied from web site}

And then going to the Percona’s site and setting: Agents -> Services -> Query Analytics -> On

The pt-agent install command will show you if something’s missing and will tell you how to install it. This time I needed:

apt-get install libjson-perl libwww-perl

If you’re installing it inside a docker container you’ll need cron installed and running with:

apt-get install cron
cron -f

Docker, Redmine, Attack in Isolation

I’ve found a very good article about what Docker is, how to configure it, create a container, use it to install Redmine and change its configuration and then attack the application while running isolated inside a container on your host.

The article can be read here: http://resources.infosecinstitute.com/securing-cloud-based-applications-docker/

That reminds me I have to cut my redmine app from the host and put it inside a container. I will be using thin with one worker set and will expect a webserver like nginx to use it as an upstream. But more about this in a future article.

Find files with the same name in PHPStorm

Just happenned to need a file with the same name but in different subdirs and I needed all occurences. This comes from an old style of developing on a now very busy site and one thing is to continue with the copy/paste or spend a good amount of time replacing the old logic. For now I have minutes to finish and so I started looking at one of the files for a pattern to search as the search is something I use very often and am used to it.

I didn’t pay attention to the Navigation menu in PHPStorm and checked File and Edit then decided to google about my problem and found this one:

http://stackoverflow.com/questions/18372961/how-to-search-a-file-in-phpstorm

Just open Navigate -> File.. and search for the file by its name. Then click the pin button to have it like a regular search result! 🙂