Documentation
¶
Index ¶
- Variables
- func CheckTargetAddress(address model.LabelValue) error
- type BucketRule
- type ComponentReloader
- type Config
- type ConfigReloader
- type ObjectStorage
- type ObjectStorageValidRule
- type PprofConfig
- type PprofProfilingConfig
- type ProfilingConfig
- type SampleType
- type ScrapeConfig
- type ScrapeConfigsValidRule
- type Secret
- type ServiceDiscoveryConfig
Constants ¶
This section is empty.
Variables ¶
var BucketValid = BucketRule{}
var ObjectStorageValid = ObjectStorageValidRule{}
ObjectStorageValid is the ValidRule.
var ScrapeConfigsValid = ScrapeConfigsValidRule{}
ScrapeConfigsValid is the ValidRule.
Functions ¶
func CheckTargetAddress ¶
func CheckTargetAddress(address model.LabelValue) error
CheckTargetAddress checks if target address is valid.
Types ¶
type BucketRule ¶ added in v0.13.0
type BucketRule struct{}
func (BucketRule) Validate ¶ added in v0.13.0
func (r BucketRule) Validate(value interface{}) error
Validate the bucket config.
type ComponentReloader ¶ added in v0.12.0
ComponentReloader describes how to reload a component.
type Config ¶
type Config struct {
ObjectStorage *ObjectStorage `yaml:"object_storage,omitempty"`
ScrapeConfigs []*ScrapeConfig `yaml:"scrape_configs,omitempty"`
}
Config holds all the configuration information for Parca.
func (*Config) SetDirectory ¶
SetDirectory joins any relative file paths with dir.
type ConfigReloader ¶ added in v0.12.0
type ConfigReloader struct {
// contains filtered or unexported fields
}
ConfigReloader holds all information required to reload Parca's config into its running components.
func NewConfigReloader ¶ added in v0.12.0
func NewConfigReloader( logger log.Logger, reg prometheus.Registerer, filename string, reloaders []ComponentReloader, ) (*ConfigReloader, error)
NewConfigReloader returns an instantiated config reloader.
type ObjectStorage ¶ added in v0.13.0
type ObjectStorage struct {
Bucket *client.BucketConfig `yaml:"bucket,omitempty"`
}
type ObjectStorageValidRule ¶ added in v0.15.0
type ObjectStorageValidRule struct{}
ObjectStorageValidRule is a validation rule for the Config. It implements the validation.Rule interface.
func (ObjectStorageValidRule) Validate ¶ added in v0.15.0
func (v ObjectStorageValidRule) Validate(value interface{}) error
ObjectStorageValidate returns an error if the config is not valid.
type PprofConfig ¶
type PprofConfig map[string]*PprofProfilingConfig
type PprofProfilingConfig ¶
type PprofProfilingConfig struct {
Enabled *bool `yaml:"enabled,omitempty"`
Path string `yaml:"path,omitempty"`
Delta bool `yaml:"delta,omitempty"`
KeepSampleType []SampleType `yaml:"keep_sample_type,omitempty"`
Seconds int `yaml:"seconds,omitempty"`
}
type ProfilingConfig ¶
type ProfilingConfig struct {
PprofConfig PprofConfig `yaml:"pprof_config,omitempty"`
PprofPrefix string `yaml:"path_prefix,omitempty"`
}
type SampleType ¶ added in v0.19.0
type ScrapeConfig ¶
type ScrapeConfig struct {
// Name of the section in the config
JobName string `yaml:"job_name"`
// A set of query parameters with which the target is scraped.
Params url.Values `yaml:"params,omitempty"`
// How frequently to scrape the targets of this scrape config.
ScrapeInterval model.Duration `yaml:"scrape_interval,omitempty"`
// The timeout for scraping targets of this config.
ScrapeTimeout model.Duration `yaml:"scrape_timeout,omitempty"`
// The URL scheme with which to fetch metrics from targets.
Scheme string `yaml:"scheme,omitempty"`
// NormalizedAddresses can be set to true if the addresses returned by the
// endpoints have already been normalized.
NormalizedAddresses bool `yaml:"normalized_addresses,omitempty"`
ProfilingConfig *ProfilingConfig `yaml:"profiling_config,omitempty"`
RelabelConfigs []*relabel.Config `yaml:"relabel_configs,omitempty"`
// We cannot do proper Go type embedding below as the parser will then parse
// values arbitrarily into the overflow maps of further-down types.
ServiceDiscoveryConfigs discovery.Configs `yaml:"-"`
HTTPClientConfig commonconfig.HTTPClientConfig `yaml:",inline"`
}
ScrapeConfig configures a scraping unit for conprof.
func DefaultScrapeConfig ¶
func DefaultScrapeConfig() ScrapeConfig
func (*ScrapeConfig) SetDirectory ¶
func (c *ScrapeConfig) SetDirectory(dir string)
SetDirectory joins any relative file paths with dir.
func (*ScrapeConfig) UnmarshalYAML ¶
func (c *ScrapeConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type ScrapeConfigsValidRule ¶ added in v0.21.0
type ScrapeConfigsValidRule struct{}
ScrapeConfigsValidRule is a validation rule for the Config. It implements the validation.Rule interface.
func (ScrapeConfigsValidRule) Validate ¶ added in v0.21.0
func (v ScrapeConfigsValidRule) Validate(value interface{}) error
ScrapeConfigsValidate returns an error if the config is not valid.
type Secret ¶
type Secret string
Secret special type for storing secrets.
func (Secret) MarshalYAML ¶
MarshalYAML implements the yaml.Marshaler interface for Secrets.
func (*Secret) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface for Secrets.
type ServiceDiscoveryConfig ¶
type ServiceDiscoveryConfig struct {
// List of labeled target groups for this job.
StaticConfigs []*targetgroup.Group `yaml:"static_configs,omitempty"`
}
ServiceDiscoveryConfig configures lists of different service discovery mechanisms.