Help us shape the future of Go! Take the 2026 Go Developer Survey

prometheus

package
v1.300057.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: MIT Imports: 56 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	DefaultTLSCaFilePath   = filepath.Join("/etc", "amazon-cloudwatch-observability-agent-cert", "tls-ca.crt")
	DefaultTLSCertFilePath = filepath.Join("/etc", "amazon-cloudwatch-observability-agent-ta-client-cert", "client.crt")
	DefaultTLSKeyFilePath  = filepath.Join("/etc", "amazon-cloudwatch-observability-agent-ta-client-cert", "client.key")
)

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
}

type TargetAllocatorManager added in v1.300050.0

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

func (*TargetAllocatorManager) AttachReloadConfigHandler added in v1.300050.0

func (tam *TargetAllocatorManager) AttachReloadConfigHandler(handler func(config *promconfig.Config))

func (*TargetAllocatorManager) Run added in v1.300050.0

func (tam *TargetAllocatorManager) Run() error

func (*TargetAllocatorManager) Shutdown added in v1.300050.0

func (tam *TargetAllocatorManager) Shutdown()

Jump to

Keyboard shortcuts

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