Health Monitor and Expect Text
tomccomb
Member ✭
Good afternoon everyone,
I am attempting to perform a health check on an application server that returns a long nested string. This is more than a 200 or even a Success! on a health monitor page but something more along the lines of the below.
{"node_type":["WebUser"],"health":[{"last_reported_time":"2021-04-20T14:27:01.636Z","test_name":"HTML-Stream-Check","status":"success"},{"last_reported_time":"2021-04-20T14:27:01.636Z","test_name":"ServiceRegistry-Check","status":"success"}],"state":"healthy","node_id":"a1712d7d0758e00c21b4355e52722e68"}
Is there a way to perform some variables or even something along the way of an aflex to focus on the: ""state":"healthy""
Tagged:
0
Answers
try the following health check
health monitor healthy
method http port 80 expect "\"state\":\"healthy\"" url GET /healthy.html
Thank you @dquinn I'll apply this into our UAT environment tomorrow and give it a go!