prom

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIReadConfig

func APIReadConfig(file string) *api.Result

APIReadConfig is the default implementation of api /api/v1/status/config

func APIReloadConfig

func APIReloadConfig(log logrus.FieldLogger, file string, apply []func(cfg *config.Config) error) *api.Result

APIReloadConfig is the default implementation of api /-/reload

Types

type Client

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

Client is a client to do prometheus API request

func NewClient

func NewClient(url string) *Client

NewClient return an cli with url

func (*Client) ConfigReload

func (c *Client) ConfigReload() error

ConfigReload do Config reloading

func (*Client) RuntimeInfo

func (c *Client) RuntimeInfo() (*RuntimeInfo, error)

RuntimeInfo return the current status of this shard, only return tManager targets if scrapingOnly is true, otherwise ,all target this cli discovered will be returned

func (*Client) Targets

func (c *Client) Targets(state string) (*v1.TargetDiscovery, error)

Targets is compatible with prometheusURL /api/v1/targets the origin prometheusURL's Config is injected, so the targets it report must be adjusted by cli sidecar

type RuntimeInfo

type RuntimeInfo struct {
	// TimeSeriesCount is the series the prometheus head check handled
	TimeSeriesCount int64 `json:"timeSeriesCount"`
}

RuntimeInfo include some filed the prometheus API /api/v1/runtimeinfo returned

Jump to

Keyboard shortcuts

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