managed

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2017 License: AGPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIBasicAuth

type APIBasicAuth struct {
	// username
	Username string `json:"username,omitempty"`

	// password
	Password string `json:"password,omitempty"`
}

type APILabelPair

type APILabelPair struct {
	// Label name
	Name string `json:"name,omitempty"`

	// Label value
	Value string `json:"value,omitempty"`
}

type APIScrapeConfig

type APIScrapeConfig struct {
	// The job name assigned to scraped metrics by default: "example-job" (required)
	JobName string `json:"job_name,omitempty"`

	// How frequently to scrape targets from this job: "10s"
	ScrapeInterval string `json:"scrape_interval,omitempty"`

	// Per-scrape timeout when scraping this job: "5s"
	ScrapeTimeout string `json:"scrape_timeout,omitempty"`

	// The HTTP resource path on which to fetch metrics from targets: "/metrics"
	MetricsPath string `json:"metrics_path,omitempty"`

	// Configures the protocol scheme used for requests: "http" or "https"
	Scheme string `json:"scheme,omitempty"`

	// Sets the `Authorization` header on every scrape request with the configured username and password
	BasicAuth *APIBasicAuth `json:"basic_auth,omitempty"`

	// Configures the scrape request's TLS settings
	TLSConfig *APITLSConfig `json:"tls_config,omitempty"`

	// List of labeled statically configured targets for this job
	StaticConfigs []*APIStaticConfig `json:"static_configs"`
}

type APIScrapeConfigsAddStaticTargetsRequest

type APIScrapeConfigsAddStaticTargetsRequest struct {
	// job name
	JobName string `json:"job_name,omitempty"`

	// Hostnames or IPs followed by an optional port number: "1.2.3.4:9090"
	Targets []string `json:"targets"`
}

type APIScrapeConfigsCreateRequest

type APIScrapeConfigsCreateRequest struct {
	// scrape config
	ScrapeConfig *APIScrapeConfig `json:"scrape_config,omitempty"`
}

type APIScrapeConfigsListResponse

type APIScrapeConfigsListResponse struct {
	// scrape configs
	ScrapeConfigs []*APIScrapeConfig `json:"scrape_configs"`
}

type APIScrapeConfigsRemoveStaticTargetsRequest

type APIScrapeConfigsRemoveStaticTargetsRequest struct {
	// job name
	JobName string `json:"job_name,omitempty"`

	// Hostnames or IPs followed by an optional port number: "1.2.3.4:9090"
	Targets []string `json:"targets"`
}

type APIStaticConfig

type APIStaticConfig struct {
	// Labels assigned to all metrics scraped from the targets
	Labels []*APILabelPair `json:"labels"`

	// Hostnames or IPs followed by an optional port number: "1.2.3.4:9090"
	Targets []string `json:"targets"`
}

type APITLSConfig

type APITLSConfig struct {
	// insecure skip verify
	InsecureSkipVerify bool `json:"insecure_skip_verify,omitempty"`
}

type Client

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

func NewClient

func NewClient(host string, scheme string, user *url.Userinfo, insecureSSL bool, verbose bool) *Client

func (*Client) ScrapeConfigsAddStaticTargets

func (c *Client) ScrapeConfigsAddStaticTargets(ctx context.Context, req *APIScrapeConfigsAddStaticTargetsRequest) error

func (*Client) ScrapeConfigsCreate

func (c *Client) ScrapeConfigsCreate(ctx context.Context, req *APIScrapeConfigsCreateRequest) error

func (*Client) ScrapeConfigsDelete

func (c *Client) ScrapeConfigsDelete(ctx context.Context, jobName string) error

func (*Client) ScrapeConfigsList

func (c *Client) ScrapeConfigsList(ctx context.Context) (*APIScrapeConfigsListResponse, error)

func (*Client) ScrapeConfigsRemoveStaticTargets

func (c *Client) ScrapeConfigsRemoveStaticTargets(ctx context.Context, req *APIScrapeConfigsRemoveStaticTargetsRequest) error

type Error

type Error struct {
	Err  string `json:"error"`
	Code int    `json:"code"`
}

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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