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 ¶
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.
Click to show internal directories.
Click to hide internal directories.