PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #75
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…
The correct answer is A. Configure the Ops Agent with a logging receiver. Create a logs-based metric. The Ops Agent can be configured with a logging receiver to collect web server logs (e.g., nginx/Apache access logs) from Compute Engine instances. Once logs are flowing into Cloud Logging, you create a logs-based metric filtered by the specific IP address to count its requests…
Question
Options
- AConfigure the Ops Agent with a logging receiver. Create a logs-based metric.
- BCreate a script to scrape the web server log. Export the IP address request metrics to the Cloud
- CUpdate the application to export the IP address request metrics to the Cloud Monitoring API.
- DConfigure the Ops Agent with a metrics receiver.
How the community answered
(29 responses)- A76% (22)
- B3% (1)
- C7% (2)
- D14% (4)
Explanation
The Ops Agent can be configured with a logging receiver to collect web server logs (e.g., nginx/Apache access logs) from Compute Engine instances. Once logs are flowing into Cloud Logging, you create a logs-based metric filtered by the specific IP address to count its requests. This metric then appears in Cloud Monitoring for dashboards and alerts. This approach requires minimal operational overhead - no custom scripts, no application code changes, and no custom metrics receiver configuration. Options B and C require significant custom development.
Topics
Community Discussion
No community discussion yet for this question.