Print global_tags first in sample configuration

This commit is contained in:
Daniel Nelson 2019-06-05 14:07:02 -07:00
parent 4e147919d3
commit f2b3b35640
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@ import (
var ( var (
// Default sections // Default sections
sectionDefaults = []string{"agent", "global_tags", "outputs", sectionDefaults = []string{"global_tags", "agent", "outputs",
"processors", "aggregators", "inputs"} "processors", "aggregators", "inputs"}
// Default input plugins // Default input plugins
@ -536,13 +536,13 @@ func printFilteredOutputs(outputFilters []string, commented bool) {
} }
func printFilteredGlobalSections(sectionFilters []string) { func printFilteredGlobalSections(sectionFilters []string) {
if sliceContains("agent", sectionFilters) {
fmt.Printf(agentConfig)
}
if sliceContains("global_tags", sectionFilters) { if sliceContains("global_tags", sectionFilters) {
fmt.Printf(globalTagsConfig) fmt.Printf(globalTagsConfig)
} }
if sliceContains("agent", sectionFilters) {
fmt.Printf(agentConfig)
}
} }
type printer interface { type printer interface {