Use classic condition for checking http status code

This commit is contained in:
Prathamesh Musale 2024-04-22 19:33:03 +05:30
parent abf4d39a22
commit ee0436588b

View File

@ -10,20 +10,6 @@ groups:
title: azimuth_gateway_endpoint_tracking title: azimuth_gateway_endpoint_tracking
condition: condition condition: condition
data: data:
- refId: probe
relativeTimeRange:
from: 600
to: 0
datasourceUid: PBFA97CFB590B2093
model:
editorMode: code
expr: probe_success{destination="azimuth_gateway"}
instant: true
intervalMs: 1000
legendFormat: __auto
maxDataPoints: 43200
range: false
refId: probe
- refId: http_status_code - refId: http_status_code
relativeTimeRange: relativeTimeRange:
from: 600 from: 600
@ -47,53 +33,37 @@ groups:
conditions: conditions:
- evaluator: - evaluator:
params: params:
- 0 - 200
- 0 - 200
type: gt type: outside_range
operator: operator:
type: and type: and
query: query:
params: [] params:
- http_status_code
reducer: reducer:
params: [] params: []
type: avg type: last
type: query type: query
datasource: datasource:
name: Expression name: Expression
type: __expr__ type: __expr__
uid: __expr__ uid: __expr__
expression: ${probe} != 1 || ${http_status_code} != 200 expression: ""
intervalMs: 1000 hide: false
maxDataPoints: 43200
refId: condition refId: condition
type: math type: classic_conditions
noDataState: Alerting noDataState: Alerting
execErrState: Alerting execErrState: Alerting
for: 5m for: 5m
annotations: annotations:
summary: Probe failed for Azimuth gateway endpoint summary: Probe failed for Azimuth gateway endpoint, http status {{ index $values "http_status_code" }}
labels:
probe_success: '{{ index $values "probe" }}'
isPaused: false isPaused: false
# Laconicd GQL endpoint # Laconicd GQL endpoint
- uid: laconicd_gql - uid: laconicd_gql
title: laconicd_gql_endpoint_tracking title: laconicd_gql_endpoint_tracking
condition: condition condition: condition
data: data:
- refId: probe
relativeTimeRange:
from: 600
to: 0
datasourceUid: PBFA97CFB590B2093
model:
editorMode: code
expr: probe_success{destination="laconicd_gql"}
instant: true
intervalMs: 1000
legendFormat: __auto
maxDataPoints: 43200
range: false
refId: probe
- refId: http_status_code - refId: http_status_code
relativeTimeRange: relativeTimeRange:
from: 600 from: 600
@ -117,31 +87,29 @@ groups:
conditions: conditions:
- evaluator: - evaluator:
params: params:
- 0 - 200
- 0 - 200
type: gt type: outside_range
operator: operator:
type: and type: and
query: query:
params: [] params:
- http_status_code
reducer: reducer:
params: [] params: []
type: avg type: last
type: query type: query
datasource: datasource:
name: Expression name: Expression
type: __expr__ type: __expr__
uid: __expr__ uid: __expr__
expression: ${probe} != 1 || ${http_status_code} != 200 expression: ""
intervalMs: 1000 hide: false
maxDataPoints: 43200
refId: condition refId: condition
type: math type: classic_conditions
noDataState: Alerting noDataState: Alerting
execErrState: Alerting execErrState: Alerting
for: 5m for: 5m
annotations: annotations:
summary: Probe failed for Laconicd GQL endpoint summary: Probe failed for Laconicd GQL endpoint, http status {{ index $values "http_status_code" }}
labels:
probe_success: '{{ index $values "probe" }}'
isPaused: false isPaused: false