Documentation
¶
Overview ¶
Package locator implements discovery mechanism for etcd clusters
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LabeledValue ¶
LabeledValue represents a persed metric instance
func ScrapeMetric ¶
func ScrapeMetric(addr string, name string) (*LabeledValue, error)
ScrapeMetric parses metrics in a simple fashion, returning the first instance of each metric for a given name; results may be unexpected for metrics with multiple instances
func (*LabeledValue) String ¶
func (lv *LabeledValue) String() string
type Locator ¶
type Locator interface {
// Endpoints provides a list of candidate prometheus endpoints
Endpoints() ([]*PrometheusEndpoint, error)
}
Locator is a pluggable interface for locating prometheus endpoints
func NewEndpointsFileLocator ¶
NewEndpointsFileLocator returns a new Locator which reads a set of endpoints from a file path, one endpoint per line
type PrometheusEndpoint ¶
type PrometheusEndpoint struct {
QueryAPI prometheus.QueryAPI
Error error
Uptime time.Duration
Selected bool
Address string
ComparisonMetricValue interface{}
}
PrometheusEndpoint encapsulates a QueryAPI instance and its associated address
func ToPrometheusClients ¶
func ToPrometheusClients(endpointURLs []string) ([]*PrometheusEndpoint, error)
ToPrometheusClients generates prometheus Client objects from a provided list of URLs
func (*PrometheusEndpoint) String ¶
func (pe *PrometheusEndpoint) String() string
func (*PrometheusEndpoint) Viable ¶ added in v0.2.2
func (pe *PrometheusEndpoint) Viable() bool
Viable returns true if the endpoint is able to respond to basic query API requests within a reasonable time
Directories
¶
| Path | Synopsis |
|---|---|
|
Package kuberneteslocator implements prometheus location for kubernetes deployments
|
Package kuberneteslocator implements prometheus location for kubernetes deployments |
|
Package marathonlocator implements prometheus discovery for marathon deployments
|
Package marathonlocator implements prometheus discovery for marathon deployments |