The Monitoring agent is a collectd-based daemon that gathers system and application metrics from virtual machine instances and sends them to Stackdriver 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.
The Monitoring agent's metrics are only available with the Stackdriver Premium service tier, but the agent can be installed on VM instances in the Basic tier. You can try out this and other Stackdriver premium features free for 30 days, when you create a new Stackdriver account.
To install the Monitoring agent, see Installing the Monitoring Agent.
Using the Monitoring agent is optional but recommended. Stackdriver Monitoring can access some metrics without the Monitoring agent, including CPU utilization, some disk traffic metrics, network traffic, and uptime information. Stackdriver 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
collectd 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 application metrics to Stackdriver Monitoring as custom metrics, see Monitoring Custom Applications.
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:
Google 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.
Amazon Elastic Compute Cloud (EC2) instances. The Monitoring agent sends monitoring information to the AWS connector project for your Stackdriver account. Stackdriver creates this project for you when you connect your AWS account to a Stackdriver account. The Stackdriver account must be in the Stackdriver Premium service tier.
For the Stackdriver Monitoring agent to function correctly, the Amazon EC2 instance it runs on must be able to communicate with Google Cloud APIs, particularly the Stackdriver Monitoring API. This requires either an external IP address or a VPC internet gateway.
To create an Amazon EC2 instance, see Amazon EC2 Getting Started Guide.
The following VM instances do not require the Stackdriver Monitoring agent:
- Google App Engine includes built-in support for Stackdriver Monitoring in the standard and flexible environments.
The Stackdriver Monitoring agent does not support the following VM instances:
- Google App Engine flexible environment instances.
Google Kubernetes Engine node instances.
Kubernetes Engine uses Compute Engine for its instances. If your instance is running a version of Linux supported by the agent, then you can install the agent on the instance. However, you only receive the same monitoring information that any Compute Engine instance provides. The information is not assocated with Kubernetes nodes.
The Monitoring agent supports the following operating systems on compatible VM instances:
- Amazon Linux AMI
- CentOS 7 and 6
- Debian 9 "Stretch", Debian 8 "Jessie", Debian 7 "Wheezy", and Debian-7-backports
- Red Hat Enterprise Linux 7 and 6
- Ubuntu LTS 12.04 "Precise", LTS 14.04 "Trusty", LTS 16.04 "Xenial" (only LTS releases are supported)
- Microsoft Windows Server 2008, 2012, and 2016
The Monitoring agent does not presently support the Container-Optimized OS that is the default in Kubernetes Engine clusters.
You can configure Stackdriver Monitoring to monitor a variety of popular open source software applications. For more information, see Monitoring Third-party Applications.
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 do not need the information in this section unless you want to understand the source code or you have other special needs.
The Monitoring agent,
stackdriver-agent, is based on the original
collectd system statistics
stackdriver-agent source code is available at
The build and packaging scripts for the Monitoring agent are available at
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 Stackdriver Monitoring API output plugin.
- The top-level configuration files for the Monitoring agent.