Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Queryable storage.Queryable 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, q storage.Queryable, tr targetRetriever, ar alertmanagerRetriever, configFunc func() config.Config, flagsMap map[string]string, readyFunc func(http.HandlerFunc) http.HandlerFunc, db func() *tsdb.DB, enableAdmin bool, ) *API
NewAPI returns an initialized API type.
type AlertmanagerDiscovery ¶
type AlertmanagerDiscovery struct { ActiveAlertmanagers []*AlertmanagerTarget `json:"activeAlertmanagers"` DroppedAlertmanagers []*AlertmanagerTarget `json:"droppedAlertmanagers"` }
AlertmanagerDiscovery has all the active Alertmanagers.
type AlertmanagerTarget ¶
type AlertmanagerTarget struct {
URL string `json:"url"`
}
AlertmanagerTarget has info on one AM.
type DroppedTarget ¶
type DroppedTarget struct { // Labels before any processing. DiscoveredLabels map[string]string `json:"discoveredLabels"` }
DroppedTarget has the information for one target that was dropped during relabelling.
type Target ¶
type Target struct { // Labels before any processing. DiscoveredLabels map[string]string `json:"discoveredLabels"` // Any labels that are added to this target and its metrics. Labels map[string]string `json:"labels"` ScrapeURL string `json:"scrapeUrl"` LastError string `json:"lastError"` LastScrape time.Time `json:"lastScrape"` Health scrape.TargetHealth `json:"health"` }
Target has the information for one target.
type TargetDiscovery ¶
type TargetDiscovery struct { ActiveTargets []*Target `json:"activeTargets"` DroppedTargets []*DroppedTarget `json:"droppedTargets"` }
TargetDiscovery has all the active targets.
Click to show internal directories.
Click to hide internal directories.