Skip to content

nginx plugin

Plugin name nginx
Type read
Callbacks config, init, read
Status supported
Since 4.2
Copyright 2006–2010 Florian Forster, 2008 Sebastian Harl
License MIT License
Configuration collectd.conf(5)

The nginx plugin connects to nginx (pronounced “engine x”), an HTTP and mail (reverse) proxy server. It collects the number of requests handled by the nginx daemon since startup and the number of current connections by connection state (reading, writing, …).

Synopsis

 <Plugin "nginx">
   <nowiki>URL "https://localhost:8433"</nowiki>
   User "stats"
   Password "uleePi4A"
 </Plugin>

Example graphs

Nginx-connections-and-requests.png

Dependencies

Configuration

Configuration options · from collectd.conf(5)

See this section in the full configuration reference

This plugin collects the number of connections and requests handled by the nginx daemon (speak: engineE<nbsp>X), a HTTP and mail server/proxy. It queries the page provided by the ngx_http_stub_status_module module, which isn't compiled by default. Please refer to http://wiki.codemongers.com/NginxStubStatusModule for more information on how to compile and configure nginx and this module.

The following options are accepted by the nginx plugin:

URL http://host/nginx_status
Sets the URL of the ngx_http_stub_status_module output.
User Username
Optional user name needed for authentication.
Password Password
Optional password needed for authentication.
VerifyPeer true|false
Enable or disable peer SSL certificate verification. See http://curl.haxx.se/docs/sslcerts.html for details. Enabled by default.
VerifyHost true|false
Enable or disable peer host name verification. If enabled, the plugin checks if the Common Name or a Subject Alternate Name field of the SSL certificate matches the host name provided by the URL option. If this identity check fails, the connection is aborted. Obviously, only works when connecting to a SSL enabled server. Enabled by default.
CACert File
File that holds one or more SSL certificates. If you want to use HTTPS you will possibly need this option. What CA certificates come bundled with libcurl and are checked by default depends on the distribution you use.
Timeout Milliseconds
The Timeout option sets the overall timeout for HTTP requests to URL, in milliseconds. By default, the configured Interval is used to set the timeout.