Documentation
¶
Overview ¶
Package prometheusreceiver autodiscovers and scrapes Prometheus metrics handlers, often served at /metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
NewFactory creates a new Prometheus receiver factory.
Types ¶
type Config ¶
type Config struct { PrometheusConfig *PromConfig `mapstructure:"config"` TrimMetricSuffixes bool `mapstructure:"trim_metric_suffixes"` // UseStartTimeMetric enables retrieving the start time of all counter metrics // from the process_start_time_seconds metric. This is only correct if all counters on that endpoint // started after the process start time, and the process is the only actor exporting the metric after // the process started. It should not be used in "exporters" which export counters that may have // started before the process itself. Use only if you know what you are doing, as this may result // in incorrect rate calculations. UseStartTimeMetric bool `mapstructure:"use_start_time_metric"` StartTimeMetricRegex string `mapstructure:"start_time_metric_regex"` // ReportExtraScrapeMetrics - enables reporting of additional metrics for Prometheus client like scrape_body_size_bytes ReportExtraScrapeMetrics bool `mapstructure:"report_extra_scrape_metrics"` TargetAllocator *TargetAllocator `mapstructure:"target_allocator"` // EnableProtobufNegotiation allows the collector to set the scraper option for // protobuf negotiation when conferring with a prometheus client. EnableProtobufNegotiation bool `mapstructure:"enable_protobuf_negotiation"` }
Config defines configuration for Prometheus receiver.
type PromConfig ¶ added in v0.93.0
type PromConfig promconfig.Config
PromConfig is a redeclaration of promconfig.Config because we need custom unmarshaling as prometheus "config" uses `yaml` tags.
func (*PromConfig) Unmarshal ¶ added in v0.93.0
func (cfg *PromConfig) Unmarshal(componentParser *confmap.Conf) error
func (*PromConfig) Validate ¶ added in v0.93.0
func (cfg *PromConfig) Validate() error
type PromHTTPSDConfig ¶ added in v0.93.0
PromHTTPSDConfig is a redeclaration of promHTTP.SDConfig because we need custom unmarshaling as prometheus "config" uses `yaml` tags.
type TargetAllocator ¶ added in v0.93.0
type TargetAllocator struct { Endpoint string `mapstructure:"endpoint"` Interval time.Duration `mapstructure:"interval"` CollectorID string `mapstructure:"collector_id"` HTTPSDConfig *PromHTTPSDConfig `mapstructure:"http_sd_config"` }
func (*TargetAllocator) Validate ¶ added in v0.93.0
func (cfg *TargetAllocator) Validate() error
Click to show internal directories.
Click to hide internal directories.