Updated on 2023-04-11 GMT+08:00

Creating Statistical Rules

Logs contain information such as system performance and services. For example, the number of the ERROR keywords indicates the system health, and the number of the BUY keywords indicates the service volume. You can create statistical rules to find such information. After statistical rules are created, AOM periodically counts keywords and generates metric data so that you can monitor system performance and service information in real time.

Precautions

A statistical rule takes effect by log bucket. Before creating a statistical rule, ensure that at least one log bucket has been created. A maximum of 5 statistical rules can be created for a log bucket.

Procedure

  1. Log in to the AOM console. In the navigation pane, choose Log > Statistical Rules.
  2. Click Create Statistical Rule in the right corner of the page. Then, select a rule type, set a rule name and keyword, select the created log bucket, and click OK, as shown in the following figure.

    A statistical rule takes effect by log bucket. AOM will periodically count the number of keywords in log files of a log bucket and generate log metrics.

    Figure 1 Creating a statistical rule

    After a statistical rule is created, a metric named after the rule will be generated.

  3. (Optional) View the generated metric data.

    • Method 1: View the metric data on the Statistical Rules page, as shown in Figure 2.

      The thumbnail of the Metric column displays the metric trend of the last hour (the statistical period is one minute). The number after the thumbnail is the last non-empty metric value on the thumbnail.

      To view more detailed metric data, double-click the thumbnail to zoom it in. To view the metric data for a different time, set the time range and statistical period in the upper area of the page. In addition, you can click Adding a threshold rule in the upper area of the page to add a threshold rule for the metric. AOM generates a threshold alarm when a metric value reaches the preset threshold so that you can handle exceptions at the earliest time.

      Figure 2 Method 1
    • Method 2: View the metric data on the Metric Monitoring page, as shown in Figure 3.

      In the navigation pane, choose Monitoring > Metric Monitoring. In the metric tree, choose User-defined Metrics > ALSAlarm, find the metric which is named after the statistical rule, and view the metric trend.

      In the upper right area of the Metric Monitoring page, you can add the metric to the dashboard, add a threshold rule, or export a monitoring report.

      Figure 3 Method 2

More Operations

After creating a statistical rule, perform the operations listed in More Operations if needed.

Table 1 Related operations

Operation

Description

Viewing a statistical rule

Click a statistical rule in the Rule Name column to view its details.

Viewing a threshold rule

The Threshold Rule column displays all threshold rules associated with the metrics generated by the statistical rule. Multiple threshold rules are separated by spaces.

Click a threshold rule to view its details.

Adding a threshold rule

Click Adding a threshold rule in the Operation column to add a threshold rule for the metric generated by the statistical rule. AOM generates a threshold alarm when a metric value reaches the preset threshold so that you can handle exceptions at the earliest time.

Modifying a statistical rule

Click Edit in the Operation column.

Deleting a statistical rule

  • To delete a statistical rule, click Delete in the Operation column.
  • To delete one or more statistical rules, select them and click Delete above the rule list.
NOTE:

Deleting a statistical rule will not delete your log buckets or files.