Documentation
¶
Overview ¶
promql provides an abstraction on the prometheus HTTP API
Index ¶
- func CreateClient(host string) (v1.API, error)
- func CreateClientWithAuth(host string, authCfg config.Authorization, tlsCfg config.TLSConfig) (v1.API, error)
- type Client
- type PromQL
- func (p *PromQL) InstantQuery(queryString string) (model.Vector, v1.Warnings, error)
- func (p *PromQL) LabelsQuery(query string) (model.Vector, v1.Warnings, error)
- func (p *PromQL) MetaQuery(query string) (map[string][]v1.Metadata, error)
- func (p *PromQL) RangeQuery(queryString string) (model.Matrix, v1.Warnings, error)
- func (p *PromQL) SeriesQuery(query string) ([]model.LabelSet, v1.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClient ¶
CreateClient creates a Client interface for the provided hostname
func CreateClientWithAuth ¶ added in v0.3.0
func CreateClientWithAuth(host string, authCfg config.Authorization, tlsCfg config.TLSConfig) (v1.API, error)
CreateClientWithAuth creates a Client interface witht the provided hostname and auth config
Types ¶
type PromQL ¶ added in v0.3.0
type PromQL struct { Host string Step string Output string TimeoutDuration time.Duration CfgFile string Time time.Time Start string End string NoHeaders bool Auth config.Authorization Client v1.API TLSConfig config.TLSConfig }
Cfg conatins the final configuration params parsed from a combo of flags, config file values, and env vars.
func (*PromQL) InstantQuery ¶ added in v0.3.0
InstantQuery performs an instant query and returns the result
func (*PromQL) LabelsQuery ¶ added in v0.3.0
LabelsQuery runs a labels query and returns the result
func (*PromQL) MetaQuery ¶ added in v0.3.0
MetaQuery returns prometheus metrics metadata. Used for our metrics and meta commands
func (*PromQL) RangeQuery ¶ added in v0.3.0
rangeQuery performs a range query and writes the results to stdout
Click to show internal directories.
Click to hide internal directories.