The Monitoring agent is a collectd-based daemon that gathers system and application metrics from virtual machine instances and sends them to Monitoring. By default, the Monitoring agent collects disk, CPU, network, and process metrics. You can configure the Monitoring agent to monitor third-party applications to get the full list of agent metrics.
To install the agent, see Installing the Monitoring agent .
Using the Monitoring agent is optional but recommended. Monitoring can access some instance metrics without the Monitoring agent , including CPU utilization, some disk traffic metrics, network traffic, and uptime information. Monitoring uses the Monitoring agent to access additional system resources and application services in virtual machine (VM) instances. If you want these additional capabilities, you should install the Monitoring agent .
After installing the Monitoring agent , you can monitor supported
third-party applications by adding application-specific
configurations. See Monitoring third-party
applications for details.
For a complete list of the built-in metrics you can get with the Monitoring agent , see Agent metrics.
To send any custom metric to Monitoring using the agent, see Monitoring custom applications. If you have access to the source code of your application, it may be more convenient to instrument it with OpenCensus.
The Monitoring agent is compatible with the following environments.
Virtual machine instances
You can install the Monitoring agent on the following kinds of VM instances:
Compute Engine instances. The Monitoring agent sends monitoring information to each instance's associated project.
For instances without external IP addresses, you must enable Private Google Access to allow the Monitoring agent to send metrics.
To create a Compute Engine instance, see Compute Engine getting started guide.
The Monitoring agent sends monitoring information to the AWS connector project that links your AWS account to Google Cloud services.
For the Monitoring agent to function correctly, the Amazon EC2 instance it runs on must be able to communicate with Google Cloud APIs, particularly the Monitoring API. This requires either an external IP address or a NAT Gateway.
To create an Amazon EC2 instance, see Amazon EC2 Getting Started Guide.
The following types of VM instances belong to managed services that implement service-specific Monitoring support. Don't try to manually install or configure the Monitoring agent on them:
App Engine standard has built-in Monitoring support. Agents aren't needed.
App Engine flexible environment instances have pre-installed agents with service-specific configurations.
Dataflow instances have pre-installed agents with service-specific configurations.
Dataproc instances have pre-installed agents with service-specific configurations.
Google Kubernetes Engine node instances:
GKE on Google Cloud instances have Cloud Operations for GKE pre-installed. Cloud Operations for GKE is an integrated monitoring and logging solution that is enabled by default for new container clusters and can be enabled for existing container clusters. For information, see Installing Google Cloud's operations suite for GKE.
The Monitoring agent supports the following operating systems on compatible VM instances.
Linux operating systems
The Monitoring agent supports the following Linux operating systems:
- Amazon Linux AMI
- CentOS 7
- CentOS 8
- Rocky Linux 8
- RHEL 7: rhel-7, rhel-7-6-sap-ha, rhel-7-7-sap-ha
- RHEL 8: rhel-8, rhel-8-1-sap-ha
- Debian 9 (Stretch)
- Debian 10 (Buster)
- SLES 12: sles-12, sles-12-sp2-sap, sles-12-sp3-sap, sles-12-sp4-sap, sles-12-sp5-sap
- SLES 15: sles-15, sles-15-sap, sles-15-sp1-sap, sles-15-sp2-sap
- OpenSUSE Leap 15: opensuse-leap (opensuse-leap-15-2-*, opensuse-leap-15-3-*)
- Ubuntu LTS 18.04 (Bionic Beaver): ubuntu-1804-lts, ubuntu-minimal-1804-lts
- Ubuntu LTS 20.04 (Focal Fossa): ubuntu-2004-lts, ubuntu-minimal-2004-lts
The Monitoring agent does not presently support the Container-Optimized OS that is the default in Google Kubernetes Engine clusters.
Windows operating systems:
All versions of the Monitoring agent support the following Windows operating systems:
- Windows Server 2019
- Windows Server Core 2019
- Windows Server 2016
- Windows Server Core 2016
- Windows Server 2012 R2
- Windows Server Core 2012 R2
The Monitoring agent does not presently support Windows Server Core 2019 for containers.
You can configure Monitoring to monitor a variety of popular open source software applications. Configuration is only possible for agents running on Linux. Agents running on Windows can monitor IIS and MS SQL applications, but they are not configurable for other applications.
For more information, see Monitoring third-party applications.
Agent access requirements
Running the agent requires access to the following DNS names:
OAuth2 token server:
Installing the agent requires access to the following DNS names:
(Linux) Google Cloud package repository:
(Windows) Legacy Stackdriver download server:
Getting the Monitoring agent source code
The source code for the Monitoring agent is available for only the Linux-hosted Monitoring agent . The Windows-hosted Monitoring agent is not open source.
The Monitoring agent is installed by a script described in the installation instructions. You can skip this section if you only want to install and use the agent. If you want to understand the source code, then read this section.
The Monitoring agent ,
stackdriver-agent, is based on the
original collectd system
statistics collection daemon.
stackdriver-agent source code is available at
The build and packaging scripts for the Monitoring agent are
available at Stackdriver/agent-packaging.
The configuration files for third-party applications are in the agent's
GitHub configuration repository.
The software package for
- The collectd daemon.
- The plugin shared libraries, including the Cloud Monitoring API output plugin.
- The top-level configuration files for the Monitoring agent .
The Monitoring agent is subject to the Agents deprecation policy.
For deprecation information for legacy features and versions, refer to Google Cloud's operations suite deprecations.
- See Quickstart to monitor a VM instance running an Apache web server. The quickstart includes installing the agent.
- See Installing the Monitoring agent to install the agent on Compute Engine or Amazon EC2 VM instances.