config: extend and format config example/test.

This commit is contained in:
Fabian Reinartz 2015-06-12 13:39:12 +02:00
parent 6bb5e3f8cd
commit 3a24a7779d
2 changed files with 74 additions and 52 deletions

View file

@ -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: "",
}

View file

@ -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']