autoscrape

package
v1.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package autoscrape implements a scraper for integrations.

Index

Constants

This section is empty.

Variables

View Source
var DefaultGlobal = Global{
	Enable:          true,
	MetricsInstance: "default",
}

DefaultGlobal holds default values for Global.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enable          *bool          `yaml:"enable,omitempty"`           // Whether self-scraping should be enabled.
	MetricsInstance string         `yaml:"metrics_instance,omitempty"` // Metrics instance name to send metrics to.
	ScrapeInterval  model.Duration `yaml:"scrape_interval,omitempty"`  // Self-scraping frequency.
	ScrapeTimeout   model.Duration `yaml:"scrape_timeout,omitempty"`   // Self-scraping timeout.

	RelabelConfigs       []*relabel.Config `yaml:"relabel_configs,omitempty"`        // Relabel the autoscrape job
	MetricRelabelConfigs []*relabel.Config `yaml:"metric_relabel_configs,omitempty"` // Relabel individual autoscrape metrics
}

Config configure autoscrape for an individual integration. Override defaults.

type Global

type Global struct {
	Enable          bool           `yaml:"enable,omitempty"`           // Whether self-scraping should be enabled.
	MetricsInstance string         `yaml:"metrics_instance,omitempty"` // Metrics instance name to send metrics to.
	ScrapeInterval  model.Duration `yaml:"scrape_interval,omitempty"`  // Self-scraping frequency.
	ScrapeTimeout   model.Duration `yaml:"scrape_timeout,omitempty"`   // Self-scraping timeout.
}

Global holds default settings for metrics integrations that support autoscraping. Integrations may override their settings.

func (*Global) UnmarshalYAML

func (g *Global) UnmarshalYAML(f func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler.

type ScrapeConfig

type ScrapeConfig struct {
	Instance string
	Config   prom_config.ScrapeConfig
}

ScrapeConfig bind a Prometheus scrape config with an instance to send scraped metrics to.

Jump to

Keyboard shortcuts

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