Documentation ¶
Index ¶
- type APIBasicAuth
- type APILabelPair
- type APIScrapeConfig
- type APIScrapeConfigsAddStaticTargetsRequest
- type APIScrapeConfigsCreateRequest
- type APIScrapeConfigsListResponse
- type APIScrapeConfigsRemoveStaticTargetsRequest
- type APIStaticConfig
- type APITLSConfig
- type Client
- func (c *Client) ScrapeConfigsAddStaticTargets(ctx context.Context, req *APIScrapeConfigsAddStaticTargetsRequest) error
- func (c *Client) ScrapeConfigsCreate(ctx context.Context, req *APIScrapeConfigsCreateRequest) error
- func (c *Client) ScrapeConfigsDelete(ctx context.Context, jobName string) error
- func (c *Client) ScrapeConfigsList(ctx context.Context) (*APIScrapeConfigsListResponse, error)
- func (c *Client) ScrapeConfigsRemoveStaticTargets(ctx context.Context, req *APIScrapeConfigsRemoveStaticTargetsRequest) error
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIBasicAuth ¶
type APILabelPair ¶
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 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 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 (*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 (*Client) ScrapeConfigsList ¶
func (c *Client) ScrapeConfigsList(ctx context.Context) (*APIScrapeConfigsListResponse, error)
func (*Client) ScrapeConfigsRemoveStaticTargets ¶
func (c *Client) ScrapeConfigsRemoveStaticTargets(ctx context.Context, req *APIScrapeConfigsRemoveStaticTargetsRequest) error
Click to show internal directories.
Click to hide internal directories.