YMatrix
Quick Start
Cluster Deployment
Data Model
Data Writing
Data Query
SQL Reference
Maintenance and Monitoring
Tool Guide
Troubleshooting
FAQ
This document introduces the cluster health monitoring function of the graphic interface.
When supporting daily business, the MatrixDB database will run a large number of SQL statements, which may cause hardware problems such as network failures, lock waiting caused by transaction concurrency, etc. If not processed in time, it will lead to slow response speed or even direct errors, which will affect the efficiency of business operations. In order to better deal with the above problems, the health monitoring function of the graphic interface can help you discover abstract performance of the database cluster faster.
Health monitoring will regularly check the corresponding database system tables based on different detection items to check whether the operating status of the query meets business expectations. Once it is found that the expected status does not meet, we will immediately send a notification. The notification can be viewed in the graphic interface. If you think it is inconvenient to always view the page, you can also choose to receive alarm information more timely by email notification.
Enter the IP of the machine where MatrixGate is located (the IP of Master by default) and port number in the browser to log in to the graphic interface.
http://<IP>:8240
成功登录之后进入“健康监测” - “检查项配置” 页面。
你可以根据需要自行选择是否配置邮箱,若完成邮箱配置,即可收到邮件通知。
图形化界面域名
为了更加方便及时的查看告警事件的明细信息,我们会在邮件中增加跳转至图形化界面的链接,若邮件接收者无法通过默认域名访问,则须修改该字段内容。
SMTP 服务器地址
SMTP 服务器地址由 IP 地址以及端口号组成。示例:smtp.example.com:465。
常见的第三方邮箱服务器
注意!
若邮箱服务是由企业自行搭建的,则需咨询邮箱管理员或邮箱服务供应商。
用户名
用于在 SMTP 服务器上进行身份验证的账户。该字段选填,仅当 SMTP 服务器需要用户名进行身份验证时才需要。示例:[email protected]。
密码
SMTP 用戶名的密码。该字段选填,仅当 SMTP 服务器需要用户名和密码进行身份验证时才需要。
注意!
若邮箱服务是由企业自行搭建的,则需咨询邮箱管理员或邮箱服务供应商。
发件人
若使用第三方邮箱服务,则该字段应与“用户名”内容保持一致;
若使用自行搭建的邮箱服务,则填写发件邮箱即可。
收件人
填写收件人邮箱地址,可填写多个。
列表即为目前 YMatrix 提供的监测项目,默认为启用状态,你可以根据需要启用。
若你认为检测项目的默认参数不符合业务场景,也可以自行修改。
序号 | 检测项目 | 说明 |
1 | 集群不可用 | 通过周期性执行查询 SELECT * FROM gp_dist_random('gp_id'); 来验证集群是否可用,若该查询连续三次失败,则大概率集群已宕机,可能为主 Segment、对应镜像 Segment 同时故障,网络故障,电源故障,硬件故障等 |
2 | Segment 发生故障 | 可能造成节点资源倾斜,数据库响应速度变慢,严重的话可能会引起倾斜节点的内存资源耗尽,造成集群不可用。另外可能会导致集群失去高可用性。 建议尽快排查问题,修复后使用 mxrecover 命令恢复故障实例,更多信息详见故障恢复 |
3 | 查询/事务耗时超过 12 小时 | 查询/事务若耗时过长,则可能会占用大量内存、CPU 等服务器资源,造成数据库服务响应速度变慢、系统触发 OOM(内存溢出)等,甚至可能产生内存溢出等影响集群可用性的情况 |
4 | 事务处于 idle in transaction 状态超过1小时 | 这类操作会占用资源,阻塞其他事务;另外会造成数据库年龄增长,影响数据库性能 |
5 | 单个查询/事务阻塞了其他超过 5 个查询,且持续超过 15 分钟 | 这类操作会导致业务请求积压和延迟,可能会引发死锁或超时错误,影响数据库的响应速度和并发性能 |
6 | 申请了 Exclusive 或 AccessExclusive 锁的查询被阻塞超过15分钟 | 持有 Exclusive 或 AccessExclusive 锁的进程一般是涉及数据库结构变更操作,比如表的创建、修改或删除等行为,这些操作可能会对整个数据库或者某个表造成较大的影响,若被阻塞太久,可能会影响业务 |
7 | 查询/事务持有 Exclusive 或 AccessExclusive 锁且耗时超过2小时 | Exclusive 和 AccessExclusive 锁是最高级别的锁,其他事务需要等待这些锁释放之后才能继续进行操作。如果锁的持有时间过长,会导致其他事务阻塞,从而影响数据库的响应速度和并发性能 |
8 | 持有了 Exclusive 或 AccessExclusive 锁的事务且处于 idle in transaction 状态超过 15 分钟 | Exclusive 或 AccessExclusive 锁是最高级别的锁,其他事务需要等待这些锁释放之后才能继续进行操作,这类事件将造成阻塞或死锁的情况;同时会造成数据库年龄增长,影响数据库性能 |
若你配置了邮箱,当发生满足检测项目故障条件的事件时,你会收到一封邮件。
无论你是否配置邮箱,都可以在“事件历史”处查看集群发生的,满足检测项目故障条件的记录。