Nginx plugin Stay organized with collections Save and categorize content based on your preferences.
Nginx is a free, open-source, high-performance HTTP server and reverse proxy,as well as an IMAP/POP3 proxy server.For more information visitnginx.org.
This functionality is only available for agents running on Linux. It isnot available on Windows.
Note: You can now collect metrics from your Nginx instance using theOps Agent, the primary andpreferred agent for collecting telemetry from your Compute Engine instances.For details, seeconfiguring the Ops Agent fornginx.Discovery
Even if the Nginx plugin is not configured, Cloud Monitoring will discoverNginx services running in your Cloud Platform project by:
- Searching instance names fornginx
- Checking for ports opened to80 or443 via firewall rules
To see the metrics for Nginx, do the following:
In the Google Cloud console, go to the Dashboards page:
If you use the search bar to find this page, then select the result whose subheading isMonitoring.
- Select theNginx dashboard from the list.
Configuring Monitoring to monitor Nginx
After youinstall the monitoring agent, usethe following instructions to configure the Nginx plugin on your instances.
Prerequisites
The Nginx plugin requires that you enable the status information handler inNginx. This can be done by downloadingstatus.conf from theGitHub configuration repository and placing it in the Nginx configuration directory (normally/etc/nginx/conf.d/):
(cd /etc/nginx/conf.d/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/nginx/conf.d/status.conf)Alternatively, you can append the contents ofstatus.conf to yournginx.conf file, normally located in one of the following directorieson your VM instance:/etc/nginx,/usr/local/nginx/conf, or/usr/local/etc/nginx.
localhost throughHTTP.Reload the Nginx configuration by running:
sudoservicenginxreloadEnabling the Nginx monitoring plugin
On your VM instance, downloadnginx.conf from theGitHub configuration repository and place it in the directory/etc/stackdriver/collectd.d/:
(cd /etc/stackdriver/collectd.d/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/nginx.conf)After adding the configuration file, restart the monitoring agent by running the following command:
sudo service stackdriver-agent restartFor more information on thecollectdnginx plugin, seePlugin:nginx.
What is monitored
The full list of metrics the Nginx plugin monitors is atAgent metrics: nginx.
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 2026-02-19 UTC.