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 nginx.org.
Even if the Nginx plugin is not configured, Stackdriver 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
The services discovered are displayed on the Nginx Services page in the Resources menu. After you install the monitoring agent and configure the Nginx plugin on your instances, Monitoring populates the Nginx Services page with inventory and metrics.
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
(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 of
nginx.conf file, normally located in one of the following directories
on your VM instance:
Reload the Nginx configuration by running:
sudo service nginx reload
Enabling the Nginx monitoring plugin
(cd /opt/stackdriver/collectd/etc/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 restart
For more information on the
nginx plugin, see
What is monitored
The full list of metrics the Nginx plugin monitors is at Agent metrics: nginx.