forked from mtusi2026/mtusi2026lab6
1 line
5.3 KiB
YAML
1 line
5.3 KiB
YAML
{apiVersion: 1,groups: [{orgId: 1,name: Messenger native OpenObserve,folder: Messenger,interval: 10s,rules: [{uid: vp6-high-error,title: MessengerHighErrorRate,condition: B,data: [{refId: A,relativeTimeRange: {from: 60,to: 0},datasourceUid: prometheus,model: {datasource: {type: prometheus,uid: prometheus},editorMode: code,expr: "(sum(rate(http_requests{status_class=\"5xx\"}[10s])) or vector(0)) / clamp_min(sum(rate(http_requests[10s])),0.001)",instant: true,range: false,intervalMs: 1000,maxDataPoints: 1000,refId: A}},{refId: B,relativeTimeRange: {from: 0,to: 0},datasourceUid: __expr__,model: {datasource: {type: __expr__,uid: __expr__},conditions: [{evaluator: {params: [0.05],type: gt},operator: {type: and},query: {params: [A]},reducer: {params: [],type: last},type: query}],refId: B,type: classic_conditions}}],noDataState: NoData,execErrState: Error,for: 10s,annotations: {summary: MessengerHighErrorRate,runbook_url: file:RUNBOOK.md},labels: {severity: warning},isPaused: false},{uid: vp6-fast-burn,title: MessengerFastErrorBudgetBurn,condition: B,data: [{refId: A,relativeTimeRange: {from: 60,to: 0},datasourceUid: prometheus,model: {datasource: {type: prometheus,uid: prometheus},editorMode: code,expr: "(((sum(rate(http_requests{status_class=\"5xx\"}[10s])) or vector(0)) / clamp_min(sum(rate(http_requests[10s])),0.001)) / 0.01 > bool 14.4) + (((sum(rate(http_requests{status_class=\"5xx\"}[30s])) or vector(0)) / clamp_min(sum(rate(http_requests[30s])),0.001)) / 0.01 > bool 14.4)",instant: true,range: false,intervalMs: 1000,maxDataPoints: 1000,refId: A}},{refId: B,relativeTimeRange: {from: 0,to: 0},datasourceUid: __expr__,model: {datasource: {type: __expr__,uid: __expr__},conditions: [{evaluator: {params: [1.5],type: gt},operator: {type: and},query: {params: [A]},reducer: {params: [],type: last},type: query}],refId: B,type: classic_conditions}}],noDataState: NoData,execErrState: Error,for: 15s,annotations: {summary: MessengerFastErrorBudgetBurn,runbook_url: file:RUNBOOK.md},labels: {severity: critical},isPaused: false},{uid: vp6-queue-lag,title: MessengerQueueLag,condition: B,data: [{refId: A,relativeTimeRange: {from: 60,to: 0},datasourceUid: prometheus,model: {datasource: {type: prometheus,uid: prometheus},editorMode: code,expr: max((queue_oldest_age_seconds and (timestamp(queue_oldest_age_seconds) > time()-10))),instant: true,range: false,intervalMs: 1000,maxDataPoints: 1000,refId: A}},{refId: B,relativeTimeRange: {from: 0,to: 0},datasourceUid: __expr__,model: {datasource: {type: __expr__,uid: __expr__},conditions: [{evaluator: {params: [10],type: gt},operator: {type: and},query: {params: [A]},reducer: {params: [],type: last},type: query}],refId: B,type: classic_conditions}}],noDataState: NoData,execErrState: Error,for: 5s,annotations: {summary: MessengerQueueLag,runbook_url: file:RUNBOOK.md},labels: {severity: warning},isPaused: false},{uid: vp6-ready-burn,title: MessengerReadyErrorBudgetBurn,condition: B,data: [{refId: A,relativeTimeRange: {from: 60,to: 0},datasourceUid: prometheus,model: {datasource: {type: prometheus,uid: prometheus},editorMode: code,expr: "((max((((ready_slo_matured_10s - on(service_name,service_instance_id) ready_slo_timely_10s) / on(service_name,service_instance_id) clamp_min(ready_slo_matured_10s,1)) and on(service_name,service_instance_id) (database_observer_up == 1)) and on(service_name,service_instance_id) (timestamp(ready_slo_matured_10s) > time()-10) and on(service_name,service_instance_id) (timestamp(database_observer_up) > time()-10))) / 0.01 > bool 14.4) + ((max((((ready_slo_matured_30s - on(service_name,service_instance_id) ready_slo_timely_30s) / on(service_name,service_instance_id) clamp_min(ready_slo_matured_30s,1)) and on(service_name,service_instance_id) (database_observer_up == 1)) and on(service_name,service_instance_id) (timestamp(ready_slo_matured_30s) > time()-10) and on(service_name,service_instance_id) (timestamp(database_observer_up) > time()-10))) / 0.01 > bool 14.4)",instant: true,range: false,intervalMs: 1000,maxDataPoints: 1000,refId: A}},{refId: B,relativeTimeRange: {from: 0,to: 0},datasourceUid: __expr__,model: {datasource: {type: __expr__,uid: __expr__},conditions: [{evaluator: {params: [1.5],type: gt},operator: {type: and},query: {params: [A]},reducer: {params: [],type: last},type: query}],refId: B,type: classic_conditions}}],noDataState: NoData,execErrState: Error,for: 15s,annotations: {summary: MessengerReadyErrorBudgetBurn,runbook_url: file:RUNBOOK.md},labels: {severity: critical},isPaused: false},{uid: vp6-observer-down,title: MessengerDatabaseObserverUnavailable,condition: B,data: [{refId: A,relativeTimeRange: {from: 60,to: 0},datasourceUid: prometheus,model: {datasource: {type: prometheus,uid: prometheus},editorMode: code,expr: min((database_observer_up and (timestamp(database_observer_up) > time()-10))),instant: true,range: false,intervalMs: 1000,maxDataPoints: 1000,refId: A}},{refId: B,relativeTimeRange: {from: 0,to: 0},datasourceUid: __expr__,model: {datasource: {type: __expr__,uid: __expr__},conditions: [{evaluator: {params: [0.5],type: lt},operator: {type: and},query: {params: [A]},reducer: {params: [],type: last},type: query}],refId: B,type: classic_conditions}}],noDataState: NoData,execErrState: Error,for: 5s,annotations: {summary: MessengerDatabaseObserverUnavailable,runbook_url: file:RUNBOOK.md},labels: {severity: warning},isPaused: false}]}]} |