Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelsHashWithJobName ¶ added in v0.127.0
LabelsHashWithJobName computes a hash of the labels and the job name. Same logic as Prometheus labels.Hash: https://github.com/prometheus/prometheus/blob/8fd46f74aa0155e4d5aa30654f9c02e564e03743/model/labels/labels.go#L72 but adds in the job name since this is not in the labelset from the discovery manager. The scrape manager adds it later. Address is already included in the labels, so it is not needed here.
Types ¶
type Discoverer ¶
type Discoverer struct {
// contains filtered or unexported fields
}
func NewDiscoverer ¶
func (*Discoverer) ApplyConfig ¶
func (m *Discoverer) ApplyConfig(source allocatorWatcher.EventSource, scrapeConfigs []*promconfig.ScrapeConfig) error
func (*Discoverer) Close ¶
func (m *Discoverer) Close()
func (*Discoverer) Reload ¶
func (m *Discoverer) Reload()
Reload triggers a reload of the scrape configs. This will process the target groups and update the targets concurrently.
func (*Discoverer) Run ¶
func (m *Discoverer) Run() error
func (*Discoverer) UpdateTsets ¶
func (m *Discoverer) UpdateTsets(tsets map[string][]*targetgroup.Group)
UpdateTsets updates the target sets to be scraped.
type Item ¶
type Item struct {
JobName string
TargetURL string
Labels labels.Labels
CollectorName string
// contains filtered or unexported fields
}
Item represents a target to be scraped.
func NewItem ¶
func NewItem(jobName string, targetURL string, labels labels.Labels, collectorName string, opts ...ItemOption) *Item
NewItem Creates a new target item. INVARIANTS: * Item fields must not be modified after creation.
func (*Item) GetEndpointSliceName ¶ added in v0.129.1
GetEndpointSliceName returns the name of the EndpointSlice that the target is part of. If the target is not part of an EndpointSlice, it returns an empty string.
func (*Item) GetNodeName ¶
type ItemOption ¶ added in v0.137.0
type ItemOption func(*Item)
func WithRelabeledLabels ¶ added in v0.137.0
func WithRelabeledLabels(lbs labels.Labels) ItemOption