Your company runs dozens of Compute Engine VMs that host internal web applications. SREs want to forward OS-level metrics (CPU, memory, disk, network) and application logs to Cloud Monitoring and Cloud Logging without installing and maintaining two different agents. They also need a single YAML file on each VM to enable collection of NGINX access logs in addition to the default system telemetry. Which approach best meets these requirements with the least operational overhead?
Enable Cloud Audit Logs at the project level and export them to Cloud Monitoring; no agent installation is required.
Deploy a Prometheus sidecar on every VM for metrics and use a custom script to send log files to a Cloud Storage bucket.
Install the legacy Monitoring agent for metrics and the legacy Logging agent with a Fluentd NGINX plugin to collect logs.
Install the Google Cloud Ops Agent on each VM and add an nginx_access logging receiver to the agent's unified config.yaml file.
The Google Cloud Ops Agent is a single package that replaces the older standalone Monitoring and Logging agents. It ships system metrics and logs out of the box and can be extended by creating /etc/google-cloud-ops-agent/config.yaml, where you add receivers such as the built-in type: nginx_access to capture NGINX access logs. Installing both legacy agents or exporting logs in other ways would require two components or extra infrastructure, contrary to the requirement for one agent and one configuration file.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the Google Cloud Ops Agent?
Open an interactive chat with Bash
How do you configure the Google Cloud Ops Agent for NGINX logs?
Open an interactive chat with Bash
Why are legacy agents not recommended for this use case?
Open an interactive chat with Bash
What is the Google Cloud Ops Agent?
Open an interactive chat with Bash
What does the unified config.yaml file do in Ops Agent?
Open an interactive chat with Bash
How does the Ops Agent differ from legacy Monitoring and Logging agents?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Setting up a cloud solution environment
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .