The frequency and thresholds defined for a rule are default recommendations. To edit these properties choose the
The following image shows the screen used to edit rules:
Beside the rule name is the
Advisordrop-down list box, used for setting the advisor group. This list box shows existing groupings and any you may have added. The
Expressiontextarea shows the advisor rule,
Variable Assignmentthe data item associated with variable(s) used in the rule and
Thresholdsdetermines when to trigger each alert type.
The three levels of
Warning Alert, and
Critical Alertindicating increasing levels of severity. Levels can be triggered by the expression result being equal to a certain value, greater than a certain value, or less than a certain value.
The data items that variables are associated with are operating system (OS) properties such as available RAM or MySQL characteristics such as the InnoDB buffer pool. To see all available data items drop down the
Data Itemlist box. For a listing of these data items see Data Collection Items.
In Figure 15.43, “MySQL Enterprise Dashboard: Editing Rules” the drop-down
Data Itemlist box within the
Variable Assignmentframe shows the various MySQL server status or operating system specific variables that may be used in expressions. The text boxes below
Thresholdsdefine the levels at which informational, warning, or critical alerts are issued.
To lower the threshold for an informational alert, simply increase the number given in the
Info Alerttext box.
When a data item can apply to multiple objects, you need to specify which instance to use for that item, hence the
Instancetext box. In almost all cases this should be set to
local. The exceptions are as follows:
For CPU-related items set Instance to
cpu0. Additional CPUs on a system are referred to as
cpu1, cpu2and so on.
There can be multiple disks mounted on a system. To refer to a specific drive set Instance to the name of of the mounted drive. On Windows this would be
C:, D:, and so on. On Unix systems, use whatever is valid for the df command.
For RAM-related items set Instance to
Where there are table-specific variables, the database name and table name must be specified in the Instance text box. This topic is discussed in detail in what follows.
It is not possible to have a data item that is unrelated to an instance. This raises the error,
You must map "<variable>" to an instance, and you will be unable to save the rule.
An agent can only collect data from one MySQL server, so the
instanceentry for a variable in a rule does not need to specify which MySQL server to use; no matter how many servers are being monitored there is always a one-to-one relationship between an agent and its monitored server.
However, on one server there may be multiple occurrences of a variable. For example, there are multiple possible occurrences of table-specific variables such as
Avg_row_lengthbecause there can be multiple databases and tables defined in a MySQL server. In this case, the “instance” refers to the database and table that a data item should be associated with, specified in the form
tablename. So, for example, if you want to reference the
usertable in an expression, select the
mysql:tablestatus:Avg_row_lengthfrom the Data Item list box and specify
mysql.userin the Instance text box.
On the other hand, in the case of a global server variable, there is only one possible target. For example, there can only be one instance of
delay_key_writebecause this variable is global and applies to the server as a whole. In this case specify
localin the Instance text box.
To save your changes click thebutton at the bottom of the page.
You can change only the thresholds and the frequency of built-in rules. So that rules function properly when updated, other changes are prohibited.
Should you wish to make other changes to a built-in rule, copy it and modify it as desired.
You can edit a rule even if it is currently scheduled. Your changes will not be overwritten when new rules are imported using the
Check for Updateslink.