Get remote JSON response and search for some specific results such as string, number.
WM_API_ENDPOINTAPI endpoint to call.WM_EXPECTComma separated list of items.
It is separated into four parts separated with a slash.
keyThe name of the key to search in response.rulestringnumber,integerboolean
operator- string
eq,=(exact match)*=(partial match)
- numbers
eq,=(exact match)gt,>- greater than (numbers)lt,<- lower than (numbers)
- string
valueCompared value.
There is an example of the check at Whoops Monitor configuration tab or the .env file.
WM_API_ENDPOINT=https://localhost:1337
WM_EXPECT=data.db/boolean/=/trueWM_API_ENDPOINT=https://localhost:1337
WM_EXPECT=data.db/number/gt/1000- Data founded in the format as expected.2- Data does not have a proper format.
docker build -t whoopsmonitor-check-json-expect .docker run --rm --env-file .env whoopsmonitor-check-json-expect