collector

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExtractServiceTimes bool
)

Functions

This section is empty.

Types

type CacheObjectClient

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

CacheObjectClient holds information about squid manager

func NewCacheObjectClient

func NewCacheObjectClient(cor *CacheObjectRequest) *CacheObjectClient

NewCacheObjectClient initializes a new cache client

func (*CacheObjectClient) GetCounters

func (c *CacheObjectClient) GetCounters() (types.Counters, error)

GetCounters fetches counters from squid cache manager

func (*CacheObjectClient) GetInfos added in v1.11.0

func (c *CacheObjectClient) GetInfos() (types.Counters, error)

GetInfos fetches info from squid cache manager

func (*CacheObjectClient) GetServiceTimes added in v1.9.0

func (c *CacheObjectClient) GetServiceTimes() (types.Counters, error)

GetServiceTimes fetches service times from squid cache manager

type CacheObjectRequest added in v1.10.0

type CacheObjectRequest struct {
	Hostname string
	Port     int
	Login    string
	Password string
	Headers  []string
}

type CollectorConfig added in v1.10.0

type CollectorConfig struct {
	Hostname string
	Port     int
	Login    string
	Password string
	Labels   config.Labels
	Headers  []string
}

type Exporter

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

Exporter entry point to squid exporter

func New

func New(c *CollectorConfig) *Exporter

New initializes a new exporter

func (*Exporter) Collect

func (e *Exporter) Collect(c chan<- prometheus.Metric)

Collect fetches metrics from squid manager and pushes them to promethus

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe describes all the metrics ever exported by the ECS exporter. It implements prometheus.Collector.

type SquidClient

type SquidClient interface {
	GetCounters() (types.Counters, error)
	GetServiceTimes() (types.Counters, error)
	GetInfos() (types.Counters, error)
}

SquidClient provides functionality to fetch squid metrics

Jump to

Keyboard shortcuts

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