mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 06:47:28 -08:00
config: extend and format config example/test.
This commit is contained in:
parent
6bb5e3f8cd
commit
3a24a7779d
|
@ -115,6 +115,24 @@ var expectedConf = &Config{
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
JobName: "service-y",
|
||||
|
||||
ScrapeInterval: Duration(15 * time.Second),
|
||||
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
||||
|
||||
MetricsPath: DefaultScrapeConfig.MetricsPath,
|
||||
Scheme: DefaultScrapeConfig.Scheme,
|
||||
|
||||
ConsulSDConfigs: []*ConsulSDConfig{
|
||||
{
|
||||
Server: "localhost:1234",
|
||||
Services: []string{"nginx", "cache", "mysql"},
|
||||
TagSeparator: DefaultConsulSDConfig.TagSeparator,
|
||||
Scheme: DefaultConsulSDConfig.Scheme,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
original: "",
|
||||
}
|
||||
|
|
10
config/testdata/conf.good.yml
vendored
10
config/testdata/conf.good.yml
vendored
|
@ -22,9 +22,6 @@ scrape_configs:
|
|||
# metrics_path defaults to '/metrics'
|
||||
# scheme defaults to 'http'.
|
||||
|
||||
labels:
|
||||
foo: baz
|
||||
|
||||
file_sd_configs:
|
||||
- names:
|
||||
- foo/*.slow.json
|
||||
|
@ -73,3 +70,10 @@ scrape_configs:
|
|||
- source_labels: [job]
|
||||
regex: (.*)some-[regex]$
|
||||
action: drop
|
||||
|
||||
|
||||
- job_name: service-y
|
||||
|
||||
consul_sd_configs:
|
||||
- server: 'localhost:1234'
|
||||
services: ['nginx', 'cache', 'mysql']
|
Loading…
Reference in a new issue