nginx

package
v0.0.0-...-3667945 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 12 Imported by: 0

README

Telegraf Plugin: Nginx

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 SSL Config
  # ssl_ca = "/etc/telegraf/ca.pem"
  # ssl_cert = "/etc/telegraf/cert.pem"
  # ssl_key = "/etc/telegraf/key.pem"
  ## Use SSL 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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nginx

type Nginx struct {
	// List of status URLs
	Urls []string
	// Path to CA file
	SSLCA string `toml:"ssl_ca"`
	// Path to client cert file
	SSLCert string `toml:"ssl_cert"`
	// Path to cert key file
	SSLKey string `toml:"ssl_key"`
	// Use SSL but skip chain & host verification
	InsecureSkipVerify bool

	// Response timeout
	ResponseTimeout internal.Duration
	// contains filtered or unexported fields
}

func (*Nginx) Description

func (n *Nginx) Description() string

func (*Nginx) Gather

func (n *Nginx) Gather(acc telegraf.Accumulator) error

func (*Nginx) SampleConfig

func (n *Nginx) SampleConfig() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL