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?
- A.The response does not satisfy either configured condition; expect status code 204 and remove or change the content match.Correct answer
- B.Availability tests require HTTP 200, so the endpoint must be changed to return HTTP 200.
- C.The test is successful because any HTTP 2xx response automatically ignores content matching.
- 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
- A team wants to detect when its public API becomes unreachable from outside Azure. They create an Application Insights availability test fo…
- An Application Insights URL availability test named Checkout API runs every five minutes. The team must be alerted when the availability of…
- An application has a checkout workflow that requires logging in, adding an item to a cart, and verifying that the total is correct. The wor…
- A company wants an alert only when an Application Insights availability test fails from at least two different test locations during the sa…
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 freeFree to start · No credit card needed