telegraf/plugins/inputs/nginx
Joshua Powers 8c49ddccc3
chore: update to go1.19.1 (#11776)
2022-09-08 12:49:36 -06:00
..
README.md chore: Fix readme linter errors for input plugins M-Z (#11274) 2022-06-08 15:22:56 -06:00
nginx.go chore: update to go1.19.1 (#11776) 2022-09-08 12:49:36 -06:00
nginx_test.go fix: Linter fixes for plugins/inputs/[n-o]* (#10011) 2021-11-02 08:42:22 -06:00
sample.conf chore(inputs_m-z): migrate sample configs into separate files (#11133) 2022-05-18 11:31:34 -05:00

README.md

Nginx Input Plugin

This plugin gathers basic status from the open source web server Nginx. Nginx Plus is a commercial version. For more information about the differences between Nginx (F/OSS) and Nginx Plus, see the Nginx documentation.

Configuration

# Read Nginx's basic status information (ngx_http_stub_status_module)
[[inputs.nginx]]
  ## An array of Nginx stub_status URI to gather stats.
  urls = ["http://localhost/server_status"]

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false

  ## HTTP response timeout (default: 5s)
  response_timeout = "5s"

Measurements & Fields

  • Measurement
    • accepts
    • active
    • handled
    • reading
    • requests
    • waiting
    • writing

Tags

  • All measurements have the following tags:
    • port
    • server

Example Output

Using this configuration:

[[inputs.nginx]]
  ## An array of Nginx stub_status URI to gather stats.
  urls = ["http://localhost/status"]

When run with:

./telegraf --config telegraf.conf --input-filter nginx --test

It produces:

* Plugin: nginx, Collection 1
> nginx,port=80,server=localhost accepts=605i,active=2i,handled=605i,reading=0i,requests=12132i,waiting=1i,writing=1i 1456690994701784331