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 nginx.org.

Discovery

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.

Prerequisites

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 https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/nginx/conf.d/status.conf)

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 /opt/stackdriver/collectd/etc/collectd.d/:

(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 collectd nginx plugin, see Plugin:nginx.

What is monitored

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

Hai trovato utile questa pagina? Facci sapere cosa ne pensi:

Invia feedback per...

Stackdriver Monitoring
Hai bisogno di assistenza? Visita la nostra pagina di assistenza.