v1

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Storage     local.Storage
	QueryEngine *promql.Engine
	// contains filtered or unexported fields
}

API can register a set of endpoints in a router and handle them using the provided storage and query engine.

func NewAPI

func NewAPI(
	qe *promql.Engine,
	st local.Storage,
	tr targetRetriever,
	ar alertmanagerRetriever,
	configFunc func() config.Config,
	readyFunc func(http.HandlerFunc) http.HandlerFunc,
) *API

NewAPI returns an initialized API type.

func (*API) Register

func (api *API) Register(r *route.Router)

Register the API's endpoints in the given router.

type AlertmanagerDiscovery added in v1.5.0

type AlertmanagerDiscovery struct {
	ActiveAlertmanagers []*AlertmanagerTarget `json:"activeAlertmanagers"`
}

AlertmanagerDiscovery has all the active Alertmanagers.

type AlertmanagerTarget added in v1.5.0

type AlertmanagerTarget struct {
	URL string `json:"url"`
}

AlertmanagerTarget has info on one AM.

type Target added in v1.5.0

type Target struct {
	// Labels before any processing.
	DiscoveredLabels model.LabelSet `json:"discoveredLabels"`
	// Any labels that are added to this target and its metrics.
	Labels model.LabelSet `json:"labels"`

	ScrapeURL string `json:"scrapeUrl"`

	LastError  string                 `json:"lastError"`
	LastScrape time.Time              `json:"lastScrape"`
	Health     retrieval.TargetHealth `json:"health"`
}

Target has the information for one target.

type TargetDiscovery added in v1.5.0

type TargetDiscovery struct {
	ActiveTargets []*Target `json:"activeTargets"`
}

TargetDiscovery has all the active targets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL