haproxy

package
v5.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2017 License: Apache-2.0 Imports: 11 Imported by: 483

Documentation

Overview

Package haproxy is a Metricbeat module that contains MetricSets.

Index

Constants

This section is empty.

Variables

View Source
var HostParser = parse.URLHostParserBuilder{DefaultScheme: "tcp"}.Build()

HostParser is used for parsing the configured HAProxy hosts.

Functions

This section is empty.

Types

type Client

type Client struct {
	Address     string
	ProtoScheme string
}

Client is an instance of the HAProxy client

func NewHaproxyClient

func NewHaproxyClient(address string) (*Client, error)

NewHaproxyClient returns a new instance of HaproxyClient

func (*Client) GetInfo

func (c *Client) GetInfo() (*Info, error)

GetInfo returns the result from the 'show stat' command

func (*Client) GetStat

func (c *Client) GetStat() ([]*Stat, error)

GetStat returns the result from the 'show stat' command

type Info

type Info struct {
	Name                       string `mapstructure:"Name"`
	Version                    string `mapstructure:"Version"`
	ReleaseDate                string `mapstructure:"Release_date"`
	Nbproc                     string `mapstructure:"Nbproc"`
	ProcessNum                 string `mapstructure:"Process_num"`
	Pid                        string `mapstructure:"Pid"`
	Uptime                     string `mapstructure:"Uptime"`
	UptimeSec                  string `mapstructure:"Uptime_sec"`
	MemMax                     string `mapstructure:"Memmax_MB"`
	UlimitN                    string `mapstructure:"Ulimit-n"`
	Maxsock                    string `mapstructure:"Maxsock"`
	Maxconn                    string `mapstructure:"Maxconn"`
	HardMaxconn                string `mapstructure:"Hard_maxconn"`
	CurrConns                  string `mapstructure:"CurrConns"`
	CumConns                   string `mapstructure:"CumConns"`
	CumReq                     string `mapstructure:"CumReq"`
	MaxSslConns                string `mapstructure:"MaxSslConns"`
	CurrSslConns               string `mapstructure:"CurrSslConns"`
	CumSslConns                string `mapstructure:"CumSslConns"`
	Maxpipes                   string `mapstructure:"Maxpipes"`
	PipesUsed                  string `mapstructure:"PipesUsed"`
	PipesFree                  string `mapstructure:"PipesFree"`
	ConnRate                   string `mapstructure:"ConnRate"`
	ConnRateLimit              string `mapstructure:"ConnRateLimit"`
	MaxConnRate                string `mapstructure:"MaxConnRate"`
	SessRate                   string `mapstructure:"SessRate"`
	SessRateLimit              string `mapstructure:"SessRateLimit"`
	MaxSessRate                string `mapstructure:"MaxSessRate"`
	SslRate                    string `mapstructure:"SslRate"`
	SslRateLimit               string `mapstructure:"SslRateLimit"`
	MaxSslRate                 string `mapstructure:"MaxSslRate"`
	SslFrontendKeyRate         string `mapstructure:"SslFrontendKeyRate"`
	SslFrontendMaxKeyRate      string `mapstructure:"SslFrontendMaxKeyRate"`
	SslFrontendSessionReusePct string `mapstructure:"SslFrontendSessionReuse_pct"`
	SslBackendKeyRate          string `mapstructure:"SslBackendKeyRate"`
	SslBackendMaxKeyRate       string `mapstructure:"SslBackendMaxKeyRate"`
	SslCacheLookups            string `mapstructure:"SslCacheLookups"`
	SslCacheMisses             string `mapstructure:"SslCacheMisses"`
	CompressBpsIn              string `mapstructure:"CompressBpsIn"`
	CompressBpsOut             string `mapstructure:"CompressBpsOut"`
	CompressBpsRateLim         string `mapstructure:"CompressBpsRateLim"`
	ZlibMemUsage               string `mapstructure:"ZlibMemUsage"`
	MaxZlibMemUsage            string `mapstructure:"MaxZlibMemUsage"`
	Tasks                      string `mapstructure:"Tasks"`
	RunQueue                   string `mapstructure:"Run_queue"`
	IdlePct                    string `mapstructure:"Idle_pct"`
	Node                       string `mapstructure:"Node"`
	Description                string `mapstructure:"Description"`
}

type Stat

type Stat struct {
	PxName        string `csv:"# pxname"`
	SvName        string `csv:"svname"`
	Qcur          string `csv:"qcur"`
	Qmax          string `csv:"qmax"`
	Scur          string `csv:"scur"`
	Smax          string `csv:"smax"`
	Slim          string `csv:"slim"`
	Stot          string `csv:"stot"`
	Bin           string `csv:"bin"`
	Bout          string `csv:"bout"`
	Dreq          string `csv:"dreq"`
	Dresp         string `csv:"dresp"`
	Ereq          string `csv:"ereq"`
	Econ          string `csv:"econ"`
	Eresp         string `csv:"eresp"`
	Wretr         string `csv:"wretr"`
	Wredis        string `csv:"wredis"`
	Status        string `csv:"status"`
	Weight        string `csv:"weight"`
	Act           string `csv:"act"`
	Bck           string `csv:"bck"`
	ChkFail       string `csv:"chkfail"`
	ChkDown       string `csv:"chkdown"`
	Lastchg       string `csv:"lastchg"`
	Downtime      string `csv:"downtime"`
	Qlimit        string `csv:"qlimit"`
	Pid           string `csv:"pid"`
	Iid           string `csv:"iid"`
	Sid           string `csv:"sid"`
	Throttle      string `csv:"throttle"`
	Lbtot         string `csv:"lbtot"`
	Tracked       string `csv:"tracked"`
	Type          string `csv:"type"`
	Rate          string `csv:"rate"`
	RateLim       string `csv:"rate_lim"`
	RateMax       string `csv:"rate_max"`
	CheckStatus   string `csv:"check_status"`
	CheckCode     string `csv:"check_code"`
	CheckDuration string `csv:"check_duration"`
	Hrsp1xx       string `csv:"hrsp_1xx"`
	Hrsp2xx       string `csv:"hrsp_2xx"`
	Hrsp3xx       string `csv:"hrsp_3xx"`
	Hrsp4xx       string `csv:"hrsp_4xx"`
	Hrsp5xx       string `csv:"hrsp_5xx"`
	HrspOther     string `csv:"hrsp_other"`
	Hanafail      string `csv:"hanafail"`
	ReqRate       string `csv:"req_rate"`
	ReqRateMax    string `csv:"req_rate_max"`
	ReqTot        string `csv:"req_tot"`
	CliAbrt       string `csv:"cli_abrt"`
	SrvAbrt       string `csv:"srv_abrt"`
	CompIn        string `csv:"comp_in"`
	CompOut       string `csv:"comp_out"`
	CompByp       string `csv:"comp_byp"`
	CompRsp       string `csv:"comp_rsp"`
	LastSess      string `csv:"lastsess"`
	LastChk       string `csv:"last_chk"`
	LastAgt       string `csv:"last_agt"`
	Qtime         string `csv:"qtime"`
	Ctime         string `csv:"ctime"`
	Rtime         string `csv:"rtime"`
	Ttime         string `csv:"ttime"`
}

Stat is an instance of the HAProxy stat information

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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