Application Insights – Availability Tests and Alerts · AZ-204: Developing Solutions for Microsoft Azure Monitor and Troubleshoot Azure Solutions

An Application Insights URL availability test calls an endpoint that returns HTTP 204 with an empty response body. The test is configured to expect s…

Practice question from Application Insights – Availability Tests and Alerts (AZ-204: Developing Solutions for Microsoft Azure Monitor and Troubleshoot Azure Solutions), with the correct answer and a step-by-step solution.

easy · MCQ · Q-7D49BE

An Application Insights URL availability test calls an endpoint that returns HTTP 204 with an empty response body. The test is configured to expect status code 200 and to find the text "Healthy" in the response. Why is the test reported as failed, and how should it be configured?

  1. A.The response does not satisfy either configured condition; expect status code 204 and remove or change the content match.Correct answer
  2. B.Availability tests require HTTP 200, so the endpoint must be changed to return HTTP 200.
  3. C.The test is successful because any HTTP 2xx response automatically ignores content matching.
  4. D.The test is failing because availability tests cannot call endpoints that return an empty body.

Solution

The test evaluates the configured success criteria. An HTTP 204 response does not match an expected 200 status, and an empty body cannot contain the configured text. Configure the expected status as 204 and remove or revise the content check.

More from Application Insights – Availability Tests and Alerts

All of Application Insights – Availability Tests and Alerts

Practise more Monitor and Troubleshoot Azure Solutions

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed