MySQL is developing rapidly. And today it does not only happen along a single track but in multiple directions simultaneously.
This is due to both server 'forks' as well as various plugins and 3rd party storage engines available. Each of those will often add information that can be fetched from the server – typically in the form of additional Information_Schema tables. This content can now also be utilized for monitoring MySQL servers with MONyog. MONyog 4.8 implements monitoring based on Custom SQL Objects. It is basically just a SQL query. Any query returning a result set can be used for monitoring. MONyog will collect results from the query and you may define counters on it exactly as you want.
It is really very simple. In this example we will utilize the `accounts` table that was added to the `performance_schema` database in MySQL 5.6.3 (but you could also use the 'user statistics plugin' originally published as a Google patch and now distributed with MariaDB) . Basically only two steps are required:
First step: Navigate to TOOLs tab .. Customization .. Manage Custom SQL Objects .. Add/Edit Custom SQL Objects and here enter the query. Note that you must also define a unique column (or a unique set of columns).
Also define the sample interval and the retention timeframe for this particular query and on what MySQL servers the query should be executed. MONyog will now start collecting the data as you have specified.
You have now created a Custom SQL Counter based on the Custom SQL Object Object that was defined in first step. You may create a new counter group for the new counter what we have done here:
We would like to hear your feedback – and not at least how you use this in your environment. What are you monitoring now that you did not before?