Nginx plugin

Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. For more information visit

This functionality is only available for agents running on Linux. It is not available on Windows.


Even if the Nginx plugin is not configured, Cloud Monitoring will discover Nginx services running in your Cloud Platform project by:

  • Searching instance names for nginx
  • Checking for ports opened to 80 or 443 via firewall rules

To see the metrics for Nginx, do the following:

  1. In the Google Cloud console, go to the  Dashboards page:

    Go to Dashboards

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select the Nginx dashboard from the list.

Configuring Monitoring to monitor Nginx

After you install the monitoring agent, use the following instructions to configure the Nginx plugin on your instances.


The Nginx plugin requires that you enable the status information handler in Nginx. This can be done by downloading status.conf from the GitHub configuration repository and placing it in the Nginx configuration directory (normally /etc/nginx/conf.d/):

(cd /etc/nginx/conf.d/ && sudo curl -O

Alternatively, you can append the contents of status.conf to your nginx.conf file, normally located in one of the following directories on your VM instance: /etc/nginx, /usr/local/nginx/conf, or /usr/local/etc/nginx.

Reload the Nginx configuration by running:

sudo service nginx reload

Enabling the Nginx monitoring plugin

On your VM instance, download nginx.conf from the GitHub configuration repository and place it in the directory /etc/stackdriver/collectd.d/:

(cd /etc/stackdriver/collectd.d/ && sudo curl -O

After adding the configuration file, restart the monitoring agent by running the following command:

sudo service stackdriver-agent restart

For more information on the collectd nginx plugin, see Plugin:nginx.

What is monitored

The full list of metrics the Nginx plugin monitors is at Agent metrics: nginx.