Description
This alert is triggered when the OBProxy is disconnected.
Principle
The following table describes the key parameters that are involved in the monitoring and alerting logic.
| Parameter | Value |
|---|---|
| Metric | obproxy_connectable |
| Source | OCP-Agent checks the local OBProxy connectivity by establishing a socket connection to localhost:2883. The timeout value is 0.8s. |
| Collected metric | obproxy_connectable |
| Metric expression | obproxyd_process_exists{app="ODP",@LABELS} |
| Collection cycle | 1 second |
Note
The metric source of this alert is special. OCP-Agent checks the local OBProxy connectivity by establishing a socket connection to localhost:2883 and returns the result to the collected metric.
- The port number 2883 in the Source row is obtained by querying the
config.conffile inhome/admin/ocp_agent. - The value of the metric
obproxy_connectableindicates the OBProxy connectivity. Valid values:1and0. The value1indicates that the OBProxy is connectable and0indicates that it is unconnectable.
The alert is triggered when the value of the metric is 0.
Alert rule
| Metric | Default threshold | Duration | Detection cycle | Time before clearance |
|---|---|---|---|---|
| obproxy_connectable | 0 | 0 seconds | 10 seconds | 5 minutes |
Alert information
| Trigger method | Alert level | Scope |
|---|---|---|
| Based on the expression of the metric | Stopped | Server |
Alert templates
Overview template: ${alarm_target} ${alarm_name}
Details template: OBProxy cluster: ${obproxy_cluster}. Host: ${host}. Alert: ${alarm_name}. Cause: ${failed_reason}.
Overview example: obproxy_template_id=0:obproxy_cluster=obproxy_01:host=xxx.xxx.xxx.xxx. OBProxy cannot be connected.
Details example: OBProxy cluster: obproxy_02. Host: xxx.xxx.xxx.xxx. Alert: OBProxy cannot be connected. Cause: OBPROXY_CONNECTION_ERROR.
${alarm_target} indicates the object that generated the alert, in the obproxy_template_id=xx:obproxy_cluster=xx:host=xx format. obproxy_cluster_id indicates the ID of the OBProxy cluster that generated the alert. obproxy_cluster indicates the name of the OBProxy cluster that generated the alert. svr_ip indicates the IP address of the OBProxy server that generated the alert.
Impact on the system
OBProxy provides access to an OceanBase cluster as the proxy. When OBProxy is not connected, the application cannot connect to the database.
Possible causes
This problem is commonly found in the following scenarios:
A network communication error occurs.
The obproxy process unexpectedly stops.
Solutions
Check the causes of OBProxy disconnection and recover the connection.
If the OBProxy server is damaged, replace it with a new one.
If the OBProxy node is no longer needed, you can delete it.
If a process exception occurs, see ob_cannot_connected.