mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/promscrape: removes omitempty for ScrapeConfig (#2457)
This change fixes incorrect marshalling for ScrapeConfig it affects http endpoint and ScrapeConfig checksum. With omitempty, custom Marshaller is not called if field is not a pointer. Previously this issue happened at vmalert
This commit is contained in:
parent
5e9afcceaa
commit
baa1c24b36
1 changed files with 4 additions and 4 deletions
|
@ -134,8 +134,8 @@ type GlobalConfig struct {
|
||||||
// See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
|
// See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
|
||||||
type ScrapeConfig struct {
|
type ScrapeConfig struct {
|
||||||
JobName string `yaml:"job_name"`
|
JobName string `yaml:"job_name"`
|
||||||
ScrapeInterval promutils.Duration `yaml:"scrape_interval,omitempty"`
|
ScrapeInterval promutils.Duration `yaml:"scrape_interval"`
|
||||||
ScrapeTimeout promutils.Duration `yaml:"scrape_timeout,omitempty"`
|
ScrapeTimeout promutils.Duration `yaml:"scrape_timeout"`
|
||||||
MetricsPath string `yaml:"metrics_path,omitempty"`
|
MetricsPath string `yaml:"metrics_path,omitempty"`
|
||||||
HonorLabels bool `yaml:"honor_labels,omitempty"`
|
HonorLabels bool `yaml:"honor_labels,omitempty"`
|
||||||
HonorTimestamps *bool `yaml:"honor_timestamps,omitempty"`
|
HonorTimestamps *bool `yaml:"honor_timestamps,omitempty"`
|
||||||
|
@ -168,8 +168,8 @@ type ScrapeConfig struct {
|
||||||
DisableCompression bool `yaml:"disable_compression,omitempty"`
|
DisableCompression bool `yaml:"disable_compression,omitempty"`
|
||||||
DisableKeepAlive bool `yaml:"disable_keepalive,omitempty"`
|
DisableKeepAlive bool `yaml:"disable_keepalive,omitempty"`
|
||||||
StreamParse bool `yaml:"stream_parse,omitempty"`
|
StreamParse bool `yaml:"stream_parse,omitempty"`
|
||||||
ScrapeAlignInterval promutils.Duration `yaml:"scrape_align_interval,omitempty"`
|
ScrapeAlignInterval promutils.Duration `yaml:"scrape_align_interval"`
|
||||||
ScrapeOffset promutils.Duration `yaml:"scrape_offset,omitempty"`
|
ScrapeOffset promutils.Duration `yaml:"scrape_offset"`
|
||||||
SeriesLimit int `yaml:"series_limit,omitempty"`
|
SeriesLimit int `yaml:"series_limit,omitempty"`
|
||||||
ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"`
|
ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue