nginxvts

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: GPL-3.0 Imports: 10 Imported by: 1

README

NGINX VTS monitoring with Netdata

nginxvts can monitor statistics of NGINX which configured with nginx-module-vts, including:

  • Nginx uptime (seconds):

    • Uptime
  • Nginx connections (requests/s):

    • active, reading, writing, waiting, accepted, handled, total
  • Shared memory size (bytes)

    • Maximum size of shared memory
    • Current size of shared memory
  • Number of node using in shared memory (nodes)

  • Total number of client requests (requests/s)

  • Total Response code (responses/s)

    • 1xx, 2xx, 3xx, 4xx, 5xx
  • Total server traffic (bytes/s)

    • The total number of bytes received from clients
    • The total number of bytes sent to clients
  • Total server cache (responses/s)

    • miss, bypass, expired, stale, updating, revalidated, hit, scarce

Refer nginx-module-vts for more information.

(Other statistics like UpsteamZones, FilterZones will be added later)

Configuration

Edit the go.d/nginxvts.conf configuration file using edit-config from the your agent's config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/nginxvts.conf

Needs only url to server's stub_status. Here is an example for local and remote servers:

jobs:
  - name: local
    url: http://127.0.0.1/status/format/json
  - name: remote
    url: http://203.0.113.0/status/format/json

For all available options please see module configuration file.

Troubleshooting

To troubleshoot issues with the nginxvts collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

First, navigate to your plugins directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the setting plugins directory. Once you're in the plugin's directory, switch to the netdata user.

cd /usr/libexec/netdata/plugins.d/
sudo -u netdata -s

You can now run the go.d.plugin orchestrator to debug the collector:

./go.d.plugin -d -m nginxvts

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	web.HTTP `yaml:",inline"`
}

type NginxVTS

type NginxVTS struct {
	module.Base
	Config `yaml:",inline"`
	// contains filtered or unexported fields
}

func New

func New() *NginxVTS

func (*NginxVTS) Charts

func (vts *NginxVTS) Charts() *module.Charts

func (*NginxVTS) Check

func (vts *NginxVTS) Check() bool

func (*NginxVTS) Cleanup

func (vts *NginxVTS) Cleanup()

func (*NginxVTS) Collect

func (vts *NginxVTS) Collect() map[string]int64

func (*NginxVTS) Init

func (vts *NginxVTS) Init() bool

type Server

type Server struct {
	RequestCounter int64 `stm:"requestcounter"`
	InBytes        int64 `stm:"inbytes"`
	OutBytes       int64 `stm:"outbytes"`
	Responses      struct {
		Resp1xx     int64 `stm:"responses_1xx" json:"1xx"`
		Resp2xx     int64 `stm:"responses_2xx" json:"2xx"`
		Resp3xx     int64 `stm:"responses_3xx" json:"3xx"`
		Resp4xx     int64 `stm:"responses_4xx" json:"4xx"`
		Resp5xx     int64 `stm:"responses_5xx" json:"5xx"`
		Miss        int64 `stm:"cache_miss"`
		Bypass      int64 `stm:"cache_bypass"`
		Expired     int64 `stm:"cache_expired"`
		Stale       int64 `stm:"cache_stale"`
		Updating    int64 `stm:"cache_updating"`
		Revalidated int64 `stm:"cache_revalidated"`
		Hit         int64 `stm:"cache_hit"`
		Scarce      int64 `stm:"cache_scarce"`
	} `stm:""`
}

Server is for total Nginx server

Jump to

Keyboard shortcuts

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