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 to modify 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 monitor third-party applications or how to use the agent to collect user-defined metrics. For information on those topics, see the following pages:
Before you begin
If you haven't installed the Monitoring agent on a VM, see Install 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: 
   
sudo  
service  
stackdriver-agent  
restart 
 
Stopping the collection of process metrics
For information about how to stop the collection of
process metrics—the metrics with the prefix agent.googleapis.com/processes 
—see Disable collection of process metrics 
.
Configuring reported CPU metrics
By default, the  Monitoring agent reports the total CPU utilization by state
for all CPUs on the VM by using the  agent.googleapis.com/cpu/utilization 
 
metric type.
This behavior is specified in the configuration file by the following
settings:
-  ValuesPercentage true
-  ReportByCpu false
You must modify these settings if you want the agent to report the
utilization 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 of collectd 
.
When ReportByCpu 
is true 
, the ValuesPercentage 
field determines
if the utilization or usage is reported. When ReportByCpu 
is false 
,
the agent reports the CPU utilization.
Troubleshooting
If you're having trouble installing or running the agent, see Troubleshooting agent installation .

