Description
This alert is triggered when an OceanBase cluster fails to pass the availability inspection of partitions based on time columns.
Principle
You can configure an availability inspection for partitions based on time columns. The inspection will be performed on the target cluster once every inspection period. During the inspection, the system checks all partitions whose level-1 partitioning column (no level-2 partitioning) is of the datetime or date type in the target cluster. When the maximum value of all such partitions in the cluster cannot cover the period specified by preCreateDays starting from the inspection day, the inspection fails, and this alert is triggered.
Alert rule
| Metric | Default threshold | Duration | Alert cycle | Elimination cycle |
|---|---|---|---|---|
| N/A | N/A | N/A | Inspection scheduling cycle | 1 hour |
Alert information
| Trigger method | Alert level | Scope |
|---|---|---|
| Inspection | Warning | Cluster |
Alert templates
Overview: ${alarm_target} ${alarm_name}
Details: Cluster: ${ob_cluster_name}, Alert: OceanBase cluster ${rule} failed, ${message}
Overview example: rule=time column partition inspection alert:ob_cluster=obcluster-1 OceanBase cluster inspection failed
Details example: Cluster: obcluster-1, Alert: OceanBase cluster time column partition inspection failed, Date partitioning table inspection failed.
Impact on the system
If a partitioned table has no available partition, data cannot be written into the table. This affects business availability. In most cases, the partitioning daemon is configured. You need to create partitions in advance.
Possible causes
The value of the preCreateDays parameter is inappropriate.
Set the value of the preCreateDays parameter for each cluster based on actual needs. You can write an independent inspection script for each cluster, and configure different inspection thresholds, to prevent alert reporting by mistake.
The partitioned table involved does not provide the expected partition.
Suggested solutions
Check whether the preCreateDays parameter is properly set for the cluster where the alert is reported.
Set a proper value for the preCreateDays parameter based on the business volume of the cluster.
If this alert is no longer reported after the value of the preCreateDays parameter is modified, the issue is resolved. If the alert persists, perform the following operations:
Check whether the expected partition is available.
Run the following command to check whether the table involved in the alert has the expected partition:
show create table ORACLE_RANGE_PART_DATE_001 ;ORACLE_RANGE_PART_DATE_001 indicates the table that fails to pass the inspection. Replace the table based on your actual needs. The following result is returned:
CREATE TABLE ORACLE_RANGE_PART_DATE_001 (log_date date NOT NULL) PARTITION BY RANGE(log_date) ( PARTITION D20211209 VALUES LESS THAN(date '2021-12-09') );If the expected partition is unavailable, perform step 2.2 to add a partition.
If the expected partition is available, we recommend that you go to step 3.
Run the following command to add a partition:
alter table ORACLE_RANGE_PART_DATE_001 add partition D20211210 VALUES LESS THAN(date '2021-12-10');Check whether the alert is eliminated. If not, go to step 3.
Contact technical support for troubleshooting if the alert is not eliminated after all the preceding measures are taken.