I have one API :
[GET] http:localhost:8080/myservice/fetchdetails. Now, I want to raise splunk alert whenever this API is down for any reason.
So, I have my search query as
|eval ['http:localhost:8080/myservice/fetchdetails'] | search status=20* to monitor the API.
But it is not fetching me any result. What should be the search query such that it makes a get call to the API and then capture the response status?