varnishreceiver

package module
v0.0.0-...-faa7035 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

README

Varnish Cache Receiver

This Varnish Cache Metric Receiver will collects metrics using the varnishstat command. It will generate metrics on the backend, cache, thread and session.

Supported pipeline types: metrics

Prerequisites

This Varnish Cache receiver will collect metrics for supported versions 6.X - 7.0.X

Configuration

The following configuration settings are optional:

  • collection_interval (default = 60s): This receiver collects metrics on an interval. Valid time units are ns, us (or µs), ms, s, m, h.

  • cache_dir (Optional): This specifies the cache dir to use when collecting metrics. If not specified, this will default to the host name.

  • exec_dir (Optional): The directory where the varnishadm and varnishstat executables are located.

Example Configuration
receivers:
  varnish:
    collection_interval: 60s

The full list of settings exposed for this receiver are documented here with detailed sample configurations here.

Metrics

Details about the metrics produced by this receiver can be found in metadata.yaml

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ReceiverFactory

NewFactory create a factory for the varnish receiver.

Types

type Config

type Config struct {
	scraperhelper.ScraperControllerSettings `mapstructure:",squash"`
	Metrics                                 metadata.MetricsSettings `mapstructure:"metrics"`
	CacheDir                                string                   `mapstructure:"cache_dir"`
	ExecDir                                 string                   `mapstructure:"exec_dir"`
}

Config defines configuration for varnish metrics receiver.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the config.

type FullStats

type FullStats struct {
	Version   int    `json:"version"`
	Timestamp string `json:"timestamp"`
	Counters  Stats  `json:"counters"`
}

FullStats holds stats from a 6.5+ response.

type Stats

type Stats struct {
	MAINBackendConn struct {
		Value int64 `json:"value"`
	} `json:"MAIN.backend_conn"`
	MAINBackendUnhealthy struct {
		Value int64 `json:"value"`
	} `json:"MAIN.backend_unhealthy"`
	MAINBackendBusy struct {
		Value int64 `json:"value"`
	} `json:"MAIN.backend_busy"`
	MAINBackendFail struct {
		Value int64 `json:"value"`
	} `json:"MAIN.backend_fail"`
	MAINBackendReuse struct {
		Value int64 `json:"value"`
	} `json:"MAIN.backend_reuse"`
	MAINBackendRecycle struct {
		Value int64 `json:"value"`
	} `json:"MAIN.backend_recycle"`
	MAINBackendRetry struct {
		Value int64 `json:"value"`
	} `json:"MAIN.backend_retry"`
	MAINCacheHit struct {
		Value int64 `json:"value"`
	} `json:"MAIN.cache_hit"`
	MAINCacheHitpass struct {
		Value int64 `json:"value"`
	} `json:"MAIN.cache_hitpass"`
	MAINCacheMiss struct {
		Value int64 `json:"value"`
	} `json:"MAIN.cache_miss"`
	MAINThreadsCreated struct {
		Value int64 `json:"value"`
	} `json:"MAIN.threads_created"`
	MAINThreadsDestroyed struct {
		Value int64 `json:"value"`
	} `json:"MAIN.threads_destroyed"`
	MAINThreadsFailed struct {
		Value int64 `json:"value"`
	} `json:"MAIN.threads_failed"`
	MAINSessConn struct {
		Value int64 `json:"value"`
	} `json:"MAIN.sess_conn"`
	MAINSessFail struct {
		Value int64 `json:"value"`
	} `json:"MAIN.sess_fail"`
	MAINSessDropped struct {
		Value int64 `json:"value"`
	} `json:"MAIN.sess_dropped"`
	MAINReqDropped struct {
		Value int64 `json:"value"`
	} `json:"MAIN.req_dropped"`
	MAINNObject struct {
		Value int64 `json:"value"`
	} `json:"MAIN.n_object"`
	MAINNExpired struct {
		Value int64 `json:"value"`
	} `json:"MAIN.n_expired"`
	MAINNLruNuked struct {
		Value int64 `json:"value"`
	} `json:"MAIN.n_lru_nuked"`
	MAINNLruMoved struct {
		Value int64 `json:"value"`
	} `json:"MAIN.n_lru_moved"`
	MAINClientReq400 struct {
		Value int64 `json:"value"`
	} `json:"MAIN.client_req_400"`
	MAINClientReq417 struct {
		Value int64 `json:"value"`
	} `json:"MAIN.client_req_417"`
	MAINClientResp500 struct {
		Value int64 `json:"value"`
	} `json:"MAIN.client_resp_500"`
	MAINClientReq struct {
		Value int64 `json:"value"`
	} `json:"MAIN.client_req"`
	MAINBackendReq struct {
		Value int64 `json:"value"`
	} `json:"MAIN.backend_req"`
}

Stats holds the metric stats.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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