Configure the Monitoring agent Stay organized with collections Save and categorize content based on your preferences.
This page describes how to configure which built-in metrics the Monitoring agent collects from a Linux VM.The content on this page is intended for system administrators who want tomodify the default configuration of the Monitoring agent.
You cannot configure the Monitoring agent when it is installed on a Windows VM.
This page doesn't describe how to configure the Monitoring agent to monitorthird-party applications or how to use the agent to collect user-definedmetrics. For information on those topics, see the following pages:
Before you begin
If you haven't installed the Monitoring agent on a VM,seeInstall the Monitoring agent.
Changing the default Monitoring agent configuration
To change the configuration of the Monitoring agent, do the following:
Edit the Monitoring agent configuration file
/etc/stackdriver/collectd.conf.Restart the Monitoring agent by running the following command:
sudoservicestackdriver-agentrestartStopping the collection of process metrics
For information about how to stop the collection ofprocess metrics—the metrics with the prefixagent.googleapis.com/processes—seeDisable collection of process metrics.
Configuring reported CPU metrics
By default, the Monitoring agent reports the total CPU utilization by statefor all CPUs on the VM by using theagent.googleapis.com/cpu/utilization metric type.This behavior is specified in the configuration file by the followingsettings:
ValuesPercentage trueReportByCpu false
You must modify these settings if you want the agent to report theutilization per CPU, or if you want it to report CPU usage time,agent.googleapis.com/cpu/usage_time, metrics:
To configure the Monitoring agent to report the
agent.googleapis.com/cpu/utilizationper CPU,do the following:- Leave
ValuesPercentageat the default value oftrue. - Set
ReportByCputotrue.
- Leave
To configure the Monitoring agent to report the
agent.googleapis.com/cpu/usage_timeper CPU, do the following:- Set
ValuesPercentagetofalse. - Set
ReportByCputotrue.
- Set
The Monitoring agent can either report the CPU utilization or the CPU usage,but not both metrics.This is a known limitation ofcollectd.WhenReportByCpu istrue, theValuesPercentage field determinesif the utilization or usage is reported. WhenReportByCpu isfalse,the agent reports the CPU utilization.
Troubleshooting
If you're having trouble installing or running the agent, seeTroubleshooting agent installation.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.