These instructions assume that you’ve installed Shinken according to the Installation tutorial. The sample configuration entries below reference objects that are defined in the sample config files (“commands.cfg”, “templates.cfg”, etc.) that are installed if you follow the quickstart.

To make your life a bit easier, a few configuration tasks have already been done for you:

Some check_mysql_ commands definition has been added to the “commands.cfg” file.

A Mysql host template (called “mysql”) has already been created in the “templates.cfg” file.

The above-mentioned config files can be found in the ///etc/shinken/// directory (or c:shinkenetc under windows). You can modify the definitions in these and other definitions to suit your needs better if you’d like. However, I’d recommend waiting until you’re more familiar with configuring Shinken before doing so. For the time being, just follow the directions outlined below and you’ll be monitoring your Mysql boxes in no time.

Tip

We are supposing here that the Mysql machine you want to monitor is named srv-lin-1 and is a Linux. Please change the above lines and commands with the real name of your server of course.

All you need to get all the MySQL service checks is to add the mysql template to this host. We suppose you already monitor the OS (linux or windows for example) for this host, and so you already got the host configuration file for it.

Under Linux:

linux:~ # vi /etc/shinken/hosts/srv-lin-1.cfg

Or Windows:

c:\ wordpad c:\shinken\etc\hosts\srv-lin-1.cfg

You need to add the mysql template in the use line. It’s better to follow the more precise template to the less one, like here mysql first, and then linux.

At this point, you configure your host to be checked with a mysql template. What does it means? It means that you got some services checks already configured for you. Warning and alert levels are between ():

If the verification process produces any errors messages, fix your configuration file before continuing. Make sure that you don’t (re)start Shinken until the verification process completes without any errors!