Google Cloud Professional Cloud DevOps Engineer — Question 98
You are running a web application deployed to a Compute Engine managed instance group. Ops Agent is installed on all instances. You recently noticed suspicious activity from a specific IP address. You need to configure Cloud Monitoring to view the number of requests from that specific IP address with minimal operational overhead. What should you do?
Answer options
- A. Configure the Ops Agent with a logging receiver. Create a logs-based metric. B Create a script to scrape the web server log. Export the IP address request metrics to the Cloud Monitoring API.
- C. Update the application to export the IP address request metrics to the Cloud Monitoring API.
- D. Configure the Ops Agent with a metrics receiver.
Correct answer: A
Explanation
The correct answer is A because configuring the Ops Agent with a logging receiver and creating a logs-based metric allows you to efficiently capture and monitor logs without significant additional effort. Options B and C require more operational overhead by developing scripts or modifying the application, while option D does not provide the necessary logging capabilities to track specific IP address requests.