This section documents the steps to create an Advisor.
To create an Advisor, you first need to select the Create Advisor button from the General Advisors Control. It will then display a new page like:
This example creates an Advisor that checks the number of rows in a table. We decide that having 50,000 rows in this table triggers a critical alert. Lesser numbers produce informational and warning level alerts.
Create your custom rule by following these steps:
Using the Advisor Name text box, give the Advisor an appropriate name, in this case something such as "Excessive number of records in table_name table".
From the Advisor Category drop down list box, choose an Advisor category for your Advisor. The Administration category of Advisors might be suitable but if you wish, create your own group of advisors. For instructions on doing this, the section called “ Advisors Categories ”.
Enter the following expression in the Expression text area.
Replace table_name with the name of the table to monitor. Note that the variable %table_name_num_rows% is not yet defined.
'%table_name_num_rows% > THRESHOLD'
Set the Thresholds:
Critical Alert level to
Warning Alert level to
Notice Alert level to
Define your variable in the
In the Variable text box, enter '%table_name_num_rows%, the variable used in the Expression text box.
In the Data Item drop down list box, find and select the
For a description of all the data items available, see Appendix F, Data Collection Items.
Instance text box, enter
Add appropriate entries for the Problem
Description, the Advice, and
the Links text areas. Optionally, use
Wiki markup for these text areas. You can also reference the
%table_name_num_rows% variable in these
For example, you can display the current number of rows with a message such as 'table_name currently has %table_name_num_rows% rows.'
Save the Advisor
After you create the Advisor, schedule it against the MySQL server that contains the database table to monitor. For instructions on Configure Advisor, see the section called “ Configure Advisors ”.