Documentation ¶
Index ¶
- type Appendable
- type Manager
- type Target
- func (t *Target) DiscoveredLabels() labels.Labels
- func (t *Target) Health() TargetHealth
- func (t *Target) Labels() labels.Labels
- func (t *Target) LastError() error
- func (t *Target) LastScrape() time.Time
- func (t *Target) SetDiscoveredLabels(l labels.Labels)
- func (t *Target) String() string
- func (t *Target) URL() *url.URL
- type TargetHealth
- type Targets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Appendable ¶
Appendable returns an Appender.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager maintains a set of scrape pools and manages start/stop cycles when receiving new target groups form the discovery manager.
func NewManager ¶
func NewManager(logger log.Logger, app Appendable) *Manager
NewManager is the Manager constructor
func (*Manager) ApplyConfig ¶
ApplyConfig resets the manager's target providers and job configurations as defined by the new cfg.
func (*Manager) DroppedTargets ¶
DroppedTargets returns the targets dropped during relabelling.
func (*Manager) Run ¶
func (m *Manager) Run(tsets <-chan map[string][]*targetgroup.Group) error
Run starts background processing to handle target updates and reload the scraping loops.
func (*Manager) Stop ¶
func (m *Manager) Stop()
Stop cancels all running scrape pools and blocks until all have exited.
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target refers to a singular HTTP or HTTPS endpoint.
func (*Target) DiscoveredLabels ¶
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.
func (*Target) SetDiscoveredLabels ¶
SetDiscoveredLabels sets new DiscoveredLabels
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.