@@ -216,6 +216,26 @@ export interface DeploymentPlansResponse {
216216 items : DeploymentPlan [ ]
217217}
218218
219+ // 告警规则变更记录数据结构
220+ export interface AlertRuleChangeValue {
221+ name : string
222+ old : string
223+ new : string
224+ }
225+
226+ export interface AlertRuleChangeItem {
227+ name : string
228+ editTime : string
229+ scope : string
230+ values : AlertRuleChangeValue [ ]
231+ reason : string
232+ }
233+
234+ export interface AlertRuleChangelogResponse {
235+ items : AlertRuleChangeItem [ ]
236+ next ?: string
237+ }
238+
219239// Mock数据 - 发布计划(按服务分组)
220240export const mockDeploymentPlans : Record < string , DeploymentPlansResponse > = {
221241 "s3" : {
@@ -1616,4 +1636,66 @@ export const mockAlertDetails: Record<string, AlertDetail> = {
16161636 }
16171637 ]
16181638 }
1639+ === = ===
1640+ // Mock数据 - 告警规则变更记录
1641+ export const mockAlertRuleChangelog : AlertRuleChangelogResponse = {
1642+ items : [
1643+ {
1644+ name : "p98_latency_too_high" ,
1645+ editTime : "2024-01-04T12:00:00Z" ,
1646+ scope : "service:stg" ,
1647+ values : [
1648+ {
1649+ name : "threshold" ,
1650+ old : "10" ,
1651+ new : "15"
1652+ } ,
1653+ {
1654+ name : "watchTimeDuration" ,
1655+ old : "3min" ,
1656+ new : "5min"
1657+ }
1658+ ] ,
1659+ reason : "由于业务增长,系统负载增加,原有10ms的延时阈值过于严格,导致频繁告警。经过AI分析历史数据,建议将阈值调整为15ms,既能及时发现性能问题,又避免误报。"
1660+ } ,
1661+ {
1662+ name : "saturation_too_high" ,
1663+ editTime : "2024-01-03T15:00:00Z" ,
1664+ scope : "service:stg" ,
1665+ values : [
1666+ {
1667+ name : "threshold" ,
1668+ old : "50" ,
1669+ new : "45"
1670+ }
1671+ ] ,
1672+ reason : "监控发现系统在50%饱和度时已出现性能下降,提前预警有助于避免系统过载。调整后可以更早发现资源瓶颈,确保服务稳定性。"
1673+ } ,
1674+ {
1675+ name : "p98_latency_too_high" ,
1676+ editTime : "2024-01-03T10:00:00Z" ,
1677+ scope : "service:mongo" ,
1678+ values : [
1679+ {
1680+ name : "threshold" ,
1681+ old : "10" ,
1682+ new : "5"
1683+ }
1684+ ] ,
1685+ reason : "MongoDB服务经过优化后性能显著提升,原有10ms阈值已不适用。调整为5ms可以更精确地监控数据库性能,及时发现潜在问题。"
1686+ } ,
1687+ {
1688+ name : "error_rate_too_high" ,
1689+ editTime : "2024-01-01T15:00:00Z" ,
1690+ scope : "service:meta" ,
1691+ values : [
1692+ {
1693+ name : "threshold" ,
1694+ old : "10" ,
1695+ new : "5"
1696+ }
1697+ ] ,
1698+ reason : "Meta服务作为核心服务,对错误率要求更加严格。将错误告警阈值从10降低到5,可以更敏感地发现服务异常,确保数据一致性。"
1699+ }
1700+ ] ,
16191701}
0 commit comments