uwsgi

package
v1.16.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 13 Imported by: 2

README

uWSGI Input Plugin

The uWSGI input plugin gathers metrics about uWSGI using its Stats Server.

Configuration
[[inputs.uwsgi]]
  ## List with urls of uWSGI Stats servers. Url must match pattern:
  ## scheme://address[:port]
  ##
  ## For example:
  ## servers = ["tcp://localhost:5050", "http://localhost:1717", "unix:///tmp/statsock"]
  servers = ["tcp://127.0.0.1:1717"]

  ## General connection timeout
  # timeout = "5s"
Metrics:
  • uwsgi_overview
  • tags:
    • source
    • uid
    • gid
    • version
  • fields:
    • listen_queue
    • listen_queue_errors
    • signal_queue
    • load
    • pid
  • uwsgi_workers
    • tags:
      • worker_id
      • source
    • fields:
      • requests
      • accepting
      • delta_request
      • exceptions
      • harakiri_count
      • pid
      • signals
      • signal_queue
      • status
      • rss
      • vsz
      • running_time
      • last_spawn
      • respawn_count
      • tx
      • avg_rt
  • uwsgi_apps
    • tags:
      • app_id
      • worker_id
      • source
    • fields:
      • modifier1
      • requests
      • startup_time
      • exceptions
  • uwsgi_cores
    • tags:
      • core_id
      • worker_id
      • source
    • fields:
      • requests
      • static_requests
      • routed_requests
      • offloaded_requests
      • write_errors
      • read_errors
      • in_request
Example Output:
uwsgi_overview,gid=0,uid=0,source=172.17.0.2,version=2.0.18 listen_queue=0i,listen_queue_errors=0i,load=0i,pid=1i,signal_queue=0i 1564441407000000000
uwsgi_workers,source=172.17.0.2,worker_id=1 accepting=1i,avg_rt=0i,delta_request=0i,exceptions=0i,harakiri_count=0i,last_spawn=1564441202i,pid=6i,requests=0i,respawn_count=1i,rss=0i,running_time=0i,signal_queue=0i,signals=0i,status="idle",tx=0i,vsz=0i 1564441407000000000
uwsgi_apps,app_id=0,worker_id=1,source=172.17.0.2 exceptions=0i,modifier1=0i,requests=0i,startup_time=0i 1564441407000000000
uwsgi_cores,core_id=0,worker_id=1,source=172.17.0.2 in_request=0i,offloaded_requests=0i,read_errors=0i,requests=0i,routed_requests=0i,static_requests=0i,write_errors=0i 1564441407000000000

Documentation

Overview

Package uwsgi implements a telegraf plugin for collecting uwsgi stats from the uwsgi stats server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// Tags
	AppID int `json:"id"`

	// Fields
	Modifier1   int `json:"modifier1"`
	Requests    int `json:"requests"`
	StartupTime int `json:"startup_time"`
	Exceptions  int `json:"exceptions"`
}

App defines the app metric structure.

type Core

type Core struct {
	// Tags
	CoreID int `json:"id"`

	// Fields
	Requests          int `json:"requests"`
	StaticRequests    int `json:"static_requests"`
	RoutedRequests    int `json:"routed_requests"`
	OffloadedRequests int `json:"offloaded_requests"`
	WriteErrors       int `json:"write_errors"`
	ReadErrors        int `json:"read_errors"`
	InRequest         int `json:"in_request"`
}

Core defines the core metric structure.

type StatsServer

type StatsServer struct {
	PID     int    `json:"pid"`
	UID     int    `json:"uid"`
	GID     int    `json:"gid"`
	Version string `json:"version"`

	// Fields
	ListenQueue       int `json:"listen_queue"`
	ListenQueueErrors int `json:"listen_queue_errors"`
	SignalQueue       int `json:"signal_queue"`
	Load              int `json:"load"`

	Workers []*Worker `json:"workers"`
	// contains filtered or unexported fields
}

StatsServer defines the stats server structure.

type Uwsgi

type Uwsgi struct {
	Servers []string          `toml:"servers"`
	Timeout internal.Duration `toml:"timeout"`
	// contains filtered or unexported fields
}

Uwsgi server struct

func (*Uwsgi) Description

func (u *Uwsgi) Description() string

Description returns the plugin description

func (*Uwsgi) Gather

func (u *Uwsgi) Gather(acc telegraf.Accumulator) error

Gather collect data from uWSGI Server

func (*Uwsgi) SampleConfig

func (u *Uwsgi) SampleConfig() string

SampleConfig returns the sample configuration

type Worker

type Worker struct {
	// Tags
	WorkerID int `json:"id"`
	PID      int `json:"pid"`

	// Fields
	Accepting     int    `json:"accepting"`
	Requests      int    `json:"requests"`
	DeltaRequests int    `json:"delta_requests"`
	Exceptions    int    `json:"exceptions"`
	HarakiriCount int    `json:"harakiri_count"`
	Signals       int    `json:"signals"`
	SignalQueue   int    `json:"signal_queue"`
	Status        string `json:"status"`
	Rss           int    `json:"rss"`
	Vsz           int    `json:"vsz"`
	RunningTime   int    `json:"running_time"`
	LastSpawn     int    `json:"last_spawn"`
	RespawnCount  int    `json:"respawn_count"`
	Tx            int    `json:"tx"`
	AvgRt         int    `json:"avg_rt"`

	Apps  []*App  `json:"apps"`
	Cores []*Core `json:"cores"`
}

Worker defines the worker metric structure.

Jump to

Keyboard shortcuts

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