Description
OCP-Agent directly connects to MonitorDB of OCP to write diagnostic data. Diagnostic data is used for OceanBase Autonomy Service and is large. You can directly write the data into tables for higher performance. If OCP-Agent cannot connect to MonitorDB, this alert is generated.
Alert parameters
| Parameter | Value |
|---|---|
| Metric | monitordb_connectable |
| Source | Use the connection string provided in the configuration file of OCP-Agent to connect to MonitorDB. Run select 1 to verify whether you can connect to MonitorDB. |
| Collected metric | oceanbase_connectivity |
| Metric expression | min(oceanbase_connectivity{target="monitordb",@LABELS}) by (@GBLABELS) |
| Collection cycle | 5 seconds |
Alert rule
| Metric expression | Metric description | Default threshold | Detection cycle | Time before clearance |
|---|---|---|---|---|
| monitordb_connectable == 0 | Whether MonitorDB can be connected | 0 | 10 seconds | 5 minutes |
Alert information
| Trigger method | Alert level | Scope |
|---|---|---|
| Based on the expression of the metric | Critical | Host |
Alert templates
Overview
- Template: ${alarm_target} ${alarm_name}
- Sample: alarm_template_id=0:ob_cluster=Test-1:host=xxx.xxx.xxx.xxx ob_host_monitordb_disconnected
Details
- Template: Cluster: ${ob_cluster_name}. Host: ${host}. Alert: ${alarm_name}
- Sample: Cluster: Test. Host: xxx.xxx.xxx.xxx, Alert: ob_host_monitordb_disconnected
Impact on the system
OCP-Agent connects to MonitorDB to directly write diagnostic data that OceanBase Autonomy Service depends on, such as SQL audit, plan cache, and transaction data. If OCP-Agent cannot connect to MonitorDB, it cannot obtain diagnostic data and OceanBase Autonomy Service will be affected. As a result, when a system exception occurs, the causes cannot be located.
Possible causes
- The username or password received by OCP-Agent is incorrect.
- The network between OCP-Agent and MonitorDB is disconnected. For example, iptables network restrictions are configured.
Solutions
Connect to MonitorDB of OCP from the host where OCP-Agent resides. If the connection fails, the possible causes are as follows:
Incorrect account or password
If the error
ERROR 1045 (42000): Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)is returned, check whether the provided username and password are correct. You can modifyocp.monitordb.host, ocp.monitordb.port,ocp.monitordb.database,ocp.monitordb.username, andocp.monitordb.passwordon the GUI.Network disconnection
If you are prompted that you cannot access the corresponding domain name or the result cannot be obtained after a command is executed, you must check the network connection. For example, you can check the iptables rules.