ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 150 - CV0-004 discussion

Report
Export

A systems administrator needs to configure a script that will monitor whether an application is healthy and stop the VM if an unsuccessful code is returned. Which of the following scripts should the systems administrator use to achieve this goal?

A.
RESPONSE_CODE } string APP_URL bool RESPONSE_CODE string VM health checker (APP_URL, VM) { if [ http_probe (APP_URL) == 200] { echo RESPONSE_CODE } else{ stop (VM) echo
Answers
A.
RESPONSE_CODE } string APP_URL bool RESPONSE_CODE string VM health checker (APP_URL, VM) { if [ http_probe (APP_URL) == 200] { echo RESPONSE_CODE } else{ stop (VM) echo
B.
else{ echo string APP_URL float RESPONSE_CODE string VM health_checker (APP_URL, VM) { if [ http_probe (APP_URL) == 200] { stop (RESPONSE_CODE) echo VM } stop (VM) RESPONSE CODE }
Answers
B.
else{ echo string APP_URL float RESPONSE_CODE string VM health_checker (APP_URL, VM) { if [ http_probe (APP_URL) == 200] { stop (RESPONSE_CODE) echo VM } stop (VM) RESPONSE CODE }
C.
else{ echo string APP_URL int RESPONSE CODE string VM health checker (APP_URL, VM) { if [ http_probe (APP_URL) == 200] { echo RESPONSE_CODE } stop (VM) RESPONSE_CODE }
Answers
C.
else{ echo string APP_URL int RESPONSE CODE string VM health checker (APP_URL, VM) { if [ http_probe (APP_URL) == 200] { echo RESPONSE_CODE } stop (VM) RESPONSE_CODE }
D.
else{ echo string APP_URL int RESPONSE_CODE string VM health_checker (APP_URL, VM) { if [ http_probe (VM) == 200] { stop (VM) echo RESPONSE_CODE } RESPONSE CODE }
Answers
D.
else{ echo string APP_URL int RESPONSE_CODE string VM health_checker (APP_URL, VM) { if [ http_probe (VM) == 200] { stop (VM) echo RESPONSE_CODE } RESPONSE CODE }
Suggested answer: A

Explanation:

Script A is designed to monitor the health of an application by checking its response code. If the application returns a 200 (OK) status, it indicates that the application is healthy. Otherwise, the script will stop the VM to address the issue, which is a common approach to handle unhealthy application states in automated environments. This script effectively achieves the goal of monitoring application health and taking corrective action when an unsuccessful code is returned.

asked 02/10/2024
MAXIM TEN
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first