31.1.8 Creating a New Advisor: An Example

This section documents the steps to create an Advisor.

To create an Advisor, select the Create Advisor button from the Advisors page. The new advisor page is displayed.

This example creates an Advisor that checks if connections have been killed using the KILL statement and generates an event.

Create your custom advisor by following these steps:

  1. Using the Advisor Name text box, give the Advisor an appropriate name, such as "Connections killed".

  2. From the Advisor Category drop down list box, choose an Advisor category for your Advisor.

  3. Define the variable for your expression in the Variable Assignment frame.

    • In the Variable text box, enter %connections_killed%, the variable used in the Expression text box.

    • In the Data Item drop-down list, select the mysql:status:Com_kill entry.

    • In the Instance text box, enter local.

  4. Enter the following expression in the Expression text area.

    '%connections_killed% > THRESHOLD'
  5. Set the following threshold:

    • Set the Info Alert level to 0. An informational event is generated if 1 or more connections are killed.

  6. Add appropriate entries for the Problem Description, Advice, and Links text areas. Optionally, use Wiki markup for these text areas. You can also reference the %connections_killed% variable in these text areas.

  7. Save the Advisor

After you create the Advisor, schedule it against the MySQL server you want to monitor. For instructions on Configure Advisor, see Table 19.3, “Advisor Edit Menu Controls”.