web

package
v0.0.0-...-95bd64c Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2015 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertStatus

type AlertStatus struct {
	AlertingRules        []*rules.AlertingRule
	AlertStateToRowClass map[rules.AlertState]string
}

AlertStatus bundles alerting rules and the mapping of alert states to row classes.

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler serves various HTTP endpoints of the Prometheus server

func New

func New(st local.Storage, qe *promql.Engine, rm *rules.Manager, status *PrometheusStatus, o *Options) *Handler

New initializes a new web Handler.

func (*Handler) Quit

func (h *Handler) Quit() <-chan struct{}

Quit returns the receive-only quit channel.

func (*Handler) Run

func (h *Handler) Run()

Run serves the HTTP endpoints.

type Options

type Options struct {
	PathPrefix           string
	ListenAddress        string
	Hostname             string
	MetricsPath          string
	UseLocalAssets       bool
	UserAssetsPath       string
	ConsoleTemplatesPath string
	ConsoleLibrariesPath string
	EnableQuit           bool
}

Options for the web Handler.

type PrometheusStatus

type PrometheusStatus struct {
	Birth     time.Time
	BuildInfo map[string]string
	Flags     map[string]string
	Config    string

	// A function that returns the current scrape targets pooled
	// by their job name.
	TargetPools func() map[string][]*retrieval.Target
	// A function that returns all loaded rules.
	Rules func() []rules.Rule
	// contains filtered or unexported fields
}

PrometheusStatus contains various information about the status of the running Prometheus process.

func (*PrometheusStatus) ApplyConfig

func (s *PrometheusStatus) ApplyConfig(conf *config.Config) bool

ApplyConfig updates the status state as the new config requires. Returns true on success.

Directories

Path Synopsis
api
v1

Jump to

Keyboard shortcuts

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