one probe with more request #1065
rmarszolek
started this conversation in
General
Replies: 1 comment
-
Hi @rmarszolek If you have multiple requests in a single probe, that is something we call If you want to continue the next request even when the first one fails, we recommend putting your requests in multiple probes, something like this: probes:
- id: check-version01
name: 'check-version'
description: check version of the app
interval: 30
requests:
- url: https://application.com/gettoken
body: {}
saveBody: true
timeout: 10000
method: POST
- url: https://application.com/search_1/version
saveBody: true
headers:
Authorization: Bearer {{ responses.[0].body.accessToken }}
- id: get-data
name: 'get-data'
description: get-data
interval: 30
requests:
- url: https://application.com/gettoken
body: {}
saveBody: true
timeout: 10000
method: POST
- url: https://application.com/my_data/
saveBody: true
headers:
Authorization: Bearer {{ responses.[0].body.accessToken }}
In the example above, the get-data will run even if check-version has failed. I hope this helps, let us know how if this is not clear. or you find any of our documentations unclear. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created yml file with
probes:
name: 'get-data'
description: get-data
interval: 30
requests:
body: {}
saveBody: true
timeout: 10000
method: POST
url: https://application.com/search_1/version
saveBody: true
headers:
Authorization: Bearer {{ responses.[0].body.accessToken }}
url: https:///application.com/search_1/version_1
saveBody: true
headers:
Authorization: Bearer {{ responses.[0].body.accessToken }}
url: https:///application.com/search_1/version_4
body: { "points": [1,3,4,5]}
saveBody: true
headers:
Authorization: Bearer {{ responses.[0].body.accessToken }}
url: https:///application.com/search_1/version_4
body: {"points": [6,7,8,9]}
saveBody: true
headers:
Authorization: Bearer {{ responses.[0].body.accessToken }}
incidentThreshold: 5
recoveryThreshold: 5
alerts:
message: Get-elevation-route-UK is not healthy. It has been returning status 0 code {{ responses.[0].status }}. status 1 code {{ responses.[1].status }}
message: >-
Get-elevation-route-UK is not healthy. Response 0 {{ responses.[0].time }} Response 1 {{ responses.[1].time }} Status 0 {{ responses.[0].status }} status 1 {{ responses.[1].status }}
on grafana i do not see data for 5th request , which is like 4th but body is differents
what is wrong ?
next my question is if I use probe with many requests , what happen If some request receive 200 or time out
probe will be interupted ?
if I have many probes with meny request , one bad request interupt only owns probe or interupt all test
how could i print result from request , if in assertion I could use responses.[0].time or only last ?
Beta Was this translation helpful? Give feedback.
All reactions