20.2.3 Overview of Advisor Creation

To create a new Advisor with all-new settings, click the Create Advisor button available on the Advisors page. To create an Advisor similar to an existing one, click the Advisor menu drop-down icon to the left of the Advisor title, and choose the Copy Advisor menu item . You can edit any Advisor element during the copying process, unlike editing an existing Advisor. You can also delete an existing Advisor created by you, click the Advisor menu drop-down icon to the left of the Advisor title, and choose click the Delete Advisor menu item.

You can change the Advisor name, change the Advisor category that an Advisor belongs to, set your own version number, and alter the threshold and frequency of an Advisor.

Note

If you do not specify a version number for the new Advisor, the version 1.0 is automatically added. Most importantly, you can alter an Advisor's expression. Expressions are the core of a MySQL Enterprise Advisor and define the scenario being monitored. An expression can be as simple as a single server parameter or can be complex, combining multiple parameters with mathematical operations.

Most importantly, you can alter an Advisor's expression. Expressions are the core of a MySQL Enterprise Advisors and define the scenario being monitored. An expression can be as simple as a single server parameter or can be complex, combining multiple parameters with mathematical operations.

An expression has two main characteristics:

For example, if you decide that enabling binary logging is a best practice for a production server (as Oracle recommends), then this best practice is violated if log_bin is OFF. Consequently, the expression for the Binary Logging Not Enabled rule is %log_bin% == OFF. If this evaluates to 1, an event is raised because the best practice is not being followed.

An expression is made up of one or more variables and zero or more mathematical operators. The MySQL Enterprise Monitor product uses the Java Expression Parser. The operators and functions consist of:

For a complete list of the built-in variables used to create Advisors, see Server Option and Variable Reference.

Creating an expression is dependent on variables defined in the Variable Assignment frame. This frame links variables used in the expression field with data gathered from the target MySQL server instance: server status variables, operating system status information, and table information. Variable names are associated with elements in the Data Item drop-down menu. To define more than one variable, click the add row button. For a complete listing of the data collection items used in creating rules, see Appendix G, Data Collection Items.

The remaining fields determine the information that you receive in a notification email or the informational pop-up window associated with each advisor.

Note

When saving a new Advisor, choose a unique name not used by any existing Advisor.