Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Appendable ¶
Appendable returns an Appender.
type ScrapeManager ¶
type ScrapeManager struct {
// contains filtered or unexported fields
}
ScrapeManager maintains a set of scrape pools and manages start/stop cycles when receiving new target groups form the discovery manager.
func NewScrapeManager ¶
func NewScrapeManager(logger log.Logger, app Appendable) *ScrapeManager
NewScrapeManager is the ScrapeManager constructor
func (*ScrapeManager) ApplyConfig ¶
func (m *ScrapeManager) ApplyConfig(cfg *config.Config) error
ApplyConfig resets the manager's target providers and job configurations as defined by the new cfg.
func (*ScrapeManager) Run ¶
func (m *ScrapeManager) Run(tsets <-chan map[string][]*targetgroup.Group) error
Run starts background processing to handle target updates and reload the scraping loops.
func (*ScrapeManager) Stop ¶
func (m *ScrapeManager) Stop()
Stop cancels all running scrape pools and blocks until all have exited.
func (*ScrapeManager) TargetMap ¶
func (m *ScrapeManager) TargetMap() map[string][]*Target
TargetMap returns map of active and dropped targets and their corresponding scrape config job name.
func (*ScrapeManager) Targets ¶
func (m *ScrapeManager) Targets() []*Target
Targets returns the targets currently being scraped.
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target refers to a singular HTTP or HTTPS endpoint.
func (*Target) DiscoveredLabels ¶ added in v1.5.0
DiscoveredLabels returns a copy of the target's labels before any processing.
func (*Target) Health ¶
func (t *Target) Health() TargetHealth
Health returns the last known health state of the target.
func (*Target) LastScrape ¶
LastScrape returns the time of the last scrape.
type TargetHealth ¶
type TargetHealth string
TargetHealth describes the health state of a target.
const ( HealthUnknown TargetHealth = "unknown" HealthGood TargetHealth = "up" HealthBad TargetHealth = "down" )
The possible health states of a target based on the last performed scrape.