Use classic condition for checking http status code
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 40s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m4s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 8m42s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m21s
Smoke Test / Run basic test suite (pull_request) Successful in 5m4s

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
condition: condition
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
relativeTimeRange:
from: 600
@ -47,53 +33,37 @@ groups:
conditions:
- evaluator:
params:
- 0
- 0
type: gt
- 200
- 200
type: outside_range
operator:
type: and
query:
params: []
params:
- http_status_code
reducer:
params: []
type: avg
type: last
type: query
datasource:
name: Expression
type: __expr__
uid: __expr__
expression: ${probe} != 1 || ${http_status_code} != 200
intervalMs: 1000
maxDataPoints: 43200
expression: ""
hide: false
refId: condition
type: math
type: classic_conditions
noDataState: Alerting
execErrState: Alerting
for: 5m
annotations:
summary: Probe failed for Azimuth gateway endpoint
labels:
probe_success: '{{ index $values "probe" }}'
summary: Probe failed for Azimuth gateway endpoint, http status {{ index $values "http_status_code" }}
isPaused: false
# Laconicd GQL endpoint
- uid: laconicd_gql
title: laconicd_gql_endpoint_tracking
condition: condition
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
relativeTimeRange:
from: 600
@ -117,31 +87,29 @@ groups:
conditions:
- evaluator:
params:
- 0
- 0
type: gt
- 200
- 200
type: outside_range
operator:
type: and
query:
params: []
params:
- http_status_code
reducer:
params: []
type: avg
type: last
type: query
datasource:
name: Expression
type: __expr__
uid: __expr__
expression: ${probe} != 1 || ${http_status_code} != 200
intervalMs: 1000
maxDataPoints: 43200
expression: ""
hide: false
refId: condition
type: math
type: classic_conditions
noDataState: Alerting
execErrState: Alerting
for: 5m
annotations:
summary: Probe failed for Laconicd GQL endpoint
labels:
probe_success: '{{ index $values "probe" }}'
summary: Probe failed for Laconicd GQL endpoint, http status {{ index $values "http_status_code" }}
isPaused: false