prometheus

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPodResourceUsage

func GetPodResourceUsage(pc promv1.API, obj metav1.ObjectMeta) core.ResourceList

Types

type BasicAuth

type BasicAuth struct {
	Username     string `yaml:"username" json:"username"`
	Password     string `yaml:"password,omitempty" json:"password,omitempty"`
	PasswordFile string `yaml:"password_file,omitempty" json:"password_file,omitempty"`
}

BasicAuth contains basic HTTP authentication credentials.

type Config

type Config struct {
	// The address where metrics will be sent
	Addr string
	// The HTTP basic authentication credentials for the targets.
	BasicAuth BasicAuth `yaml:"basic_auth,omitempty" json:"basic_auth,omitempty"`
	// The bearer token for the targets. Deprecated in favour of
	// Authorization.Credentials.
	BearerToken string `yaml:"bearer_token,omitempty" json:"bearer_token,omitempty"`
	// The bearer token file for the targets. Deprecated in favour of
	// Authorization.CredentialsFile.
	BearerTokenFile string `yaml:"bearer_token_file,omitempty" json:"bearer_token_file,omitempty"`
	// HTTP proxy server to use to connect to the targets.
	ProxyURL string `yaml:"proxy_url,omitempty" json:"proxy_url,omitempty"`
	// TLSConfig to use to connect to the targets.
	TLSConfig prom_config.TLSConfig `yaml:"tls_config,omitempty" json:"tls_config,omitempty"`
}

func NewPrometheusConfig

func NewPrometheusConfig() *Config

func (*Config) AddFlags

func (p *Config) AddFlags(fs *pflag.FlagSet)

func (*Config) AddGoFlags

func (p *Config) AddGoFlags(fs *flag.FlagSet)

func (*Config) NewPrometheusClient

func (p *Config) NewPrometheusClient() (promapi.Client, error)

func (*Config) ToHTTPClientConfig

func (p *Config) ToHTTPClientConfig() (*prom_config.HTTPClientConfig, error)

func (*Config) Validate

func (p *Config) Validate() error

Jump to

Keyboard shortcuts

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