prometheus

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	prometheusAPI_v1.API
	// contains filtered or unexported fields
}

func New

func New(config Config) *API

func (*API) CPUCurrent

func (api *API) CPUCurrent() (float64, error)

func (*API) CPUHistory

func (api *API) CPUHistory(from, to time.Time, step time.Duration) (dataframe.Dataframe, error)

func (*API) CPUNodesHistory

func (api *API) CPUNodesHistory(from, to time.Time, step time.Duration) (map[string]dataframe.Dataframe, error)

func (*API) MemoryCurrent

func (api *API) MemoryCurrent() (float64, error)

func (*API) MemoryHistory

func (api *API) MemoryHistory(from, to time.Time, step time.Duration) (dataframe.Dataframe, error)

func (*API) MemoryNodesHistory

func (api *API) MemoryNodesHistory(from, to time.Time, step time.Duration) (map[string]dataframe.Dataframe, error)

func (*API) Query

func (api *API) Query(query string, args ...interface{}) (model.Value, error)

func (*API) QueryRange

func (api *API) QueryRange(r metrics.Range, query string, args ...interface{}) (model.Value, error)

func (*API) StorageCurrent

func (api *API) StorageCurrent() (float64, error)

type Config

type Config struct {
	Timeout time.Duration
	Addr    string
}

Jump to

Keyboard shortcuts

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