collector

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// LitespeedMetrics includes all available LiteSpeed metrics
	LitespeedMetrics = metrics{
		// contains filtered or unexported fields
	}
)

Functions

func ParseFlagsToMap

func ParseFlagsToMap(s []string) map[string]bool

ParseFlagsToMap converts array of strings to a boolean map

Types

type LitespeedCollector

type LitespeedCollector struct {
	// contains filtered or unexported fields
}

LitespeedCollector collects LiteSpeed stats from the given files and exports them as Prometheus metrics

func NewLitespeedCollector

func NewLitespeedCollector(opts LitespeedCollectorOpts, logger log.Logger) *LitespeedCollector

NewLitespeedCollector returns constructed collector

func (*LitespeedCollector) Collect

func (c *LitespeedCollector) Collect(ch chan<- prometheus.Metric)

Collect fetches the stats from target files and delivers them as Prometheus metrics

func (*LitespeedCollector) Describe

func (c *LitespeedCollector) Describe(ch chan<- *prometheus.Desc)

Describe describes all the metrics that can be exported by the LiteSpeed exporter

type LitespeedCollectorOpts

type LitespeedCollectorOpts struct {
	FilePattern     string
	ReqRatesByHost  bool
	MetricsByCore   bool
	ExcludeExtapp   bool
	ExcludedMetrics map[string]bool
}

LitespeedCollectorOpts carries the options used in LitespeedCollector

Jump to

Keyboard shortcuts

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