The CSO feature is to utilize information available in Information_Schema (as well as Performance_Schema of MySQL 5.5+) that are not exposed in the basic
SHOW statements we have been using in the monitors/advisors. In addition to the
SELECT queries any query which returns a result set can be monitored.
CSOs not only lets you monitor server metrics but also lets you monitor server data.
Enabling pre-defined CSCs and CSOs:
In order to monitor CSOs you need to create a Custom SQL Counter(CSC). SQL DM for MySQL comes shipped with a bunch of pre-defined CSCs with their respective CSOs. By default, all pre-defined CSOs and CSCs are disabled. To enable some of these samples follow these steps:
- Click the drop-down icon beside the title Monitors -> Manage CSO. The twenty-eight pre-defined CSOs display in the left menu.
As an example select the DiskInfo item. The User Defined SQL-query displays in the SQL box. Sample interval and retention timeframe specific for this CSO may be changed as per your preference and you may specify for which MySQL server(s) this particular CSO should be collected. Also note that one or more Key columns are defined. It must be a column or a set of columns returning (a) unique (set of) value(s) (similar to a UNIQUE KEY in MySQL). Without defining a Key Column, the result monitors might now show proper values.
- Go to Monitors page, select Manage Monitor Groups, enable the DiskInfo Group, and Save the changes. This pre-defined group contains pre-defined CSC’s using the CSOs you enabled in the previous step.