prometheus

package
v1.3000030.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CleanUpTimeThreshold = 60 * 1000       // 1 minute
	CacheTTL             = 5 * time.Minute // 5 minutes
)
View Source
const (
	MaxDropMetricsLogged = 1000
)

Variables

This section is empty.

Functions

func NewMetricsTypeHandler

func NewMetricsTypeHandler() *metricsTypeHandler

func Start

func Start(configFilePath string, receiver storage.Appendable, shutDownChan chan interface{}, wg *sync.WaitGroup, mth *metricsTypeHandler)

Types

type Calculator

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

func NewCalculator

func NewCalculator() *Calculator

func (*Calculator) Calculate

func (c *Calculator) Calculate(pmb PrometheusMetricBatch) (result PrometheusMetricBatch)

Do calculation based on metric type

type DeltaCalculator

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

func NewDeltaCalculator

func NewDeltaCalculator() *DeltaCalculator

type MetricsFilter

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

func NewMetricsFilter

func NewMetricsFilter() *MetricsFilter

func (*MetricsFilter) Filter

Filter out and Log the unsupported metric types

type Prometheus

type Prometheus struct {
	PrometheusConfigPath string                                      `toml:"prometheus_config_path"`
	ClusterName          string                                      `toml:"cluster_name"`
	ECSSDConfig          *ecsservicediscovery.ServiceDiscoveryConfig `toml:"ecs_service_discovery"`
	// contains filtered or unexported fields
}

func (*Prometheus) Description

func (p *Prometheus) Description() string

func (*Prometheus) Gather

func (p *Prometheus) Gather(_ telegraf.Accumulator) error

func (*Prometheus) SampleConfig

func (p *Prometheus) SampleConfig() string

func (*Prometheus) Start

func (p *Prometheus) Start(accIn telegraf.Accumulator) error

func (*Prometheus) Stop

func (p *Prometheus) Stop()

type PrometheusMetric

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

type PrometheusMetricBatch

type PrometheusMetricBatch []*PrometheusMetric

type ScrapeManager

type ScrapeManager interface {
	TargetsAll() map[string][]*scrape.Target
}

Jump to

Keyboard shortcuts

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