mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 23:10:12 -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: "",
|
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'
|
# metrics_path defaults to '/metrics'
|
||||||
# scheme defaults to 'http'.
|
# scheme defaults to 'http'.
|
||||||
|
|
||||||
labels:
|
|
||||||
foo: baz
|
|
||||||
|
|
||||||
file_sd_configs:
|
file_sd_configs:
|
||||||
- names:
|
- names:
|
||||||
- foo/*.slow.json
|
- foo/*.slow.json
|
||||||
|
@ -73,3 +70,10 @@ scrape_configs:
|
||||||
- source_labels: [job]
|
- source_labels: [job]
|
||||||
regex: (.*)some-[regex]$
|
regex: (.*)some-[regex]$
|
||||||
action: drop
|
action: drop
|
||||||
|
|
||||||
|
|
||||||
|
- job_name: service-y
|
||||||
|
|
||||||
|
consul_sd_configs:
|
||||||
|
- server: 'localhost:1234'
|
||||||
|
services: ['nginx', 'cache', 'mysql']
|
Loading…
Reference in a new issue