Add a helper to generate legacy configuration

This moves the DefaultConfig method out into a helper to generate legacy
configuration.  Passing in a config file is now required.
This commit is contained in:
Solly Ross 2018-06-22 12:01:58 -04:00
parent ad1837e9b5
commit 40a9ee2474
9 changed files with 150 additions and 40 deletions

View file

@ -19,7 +19,7 @@ type DiscoveryRule struct {
// that can't be represented in the SeriesQuery (e.g. series matching `container_.+`
// not matching `container_.+_total`. A filter will be automatically appended to
// match the form specified in Name.
SeriesFilters []RegexFilter `yaml:"seriesFilter"`
SeriesFilters []RegexFilter `yaml:"seriesFilters"`
// Resources specifies how associated Kubernetes resources should be discovered for
// the given metrics.
Resources ResourceMapping `yaml:"resources"`