Add parse_multivalue to collectd parser (#4403)
This commit is contained in:
@@ -66,6 +66,9 @@ type Config struct {
|
||||
// Dataset specification for collectd
|
||||
CollectdTypesDB []string
|
||||
|
||||
// whether to split or join multivalue metrics
|
||||
CollectdSplit string
|
||||
|
||||
// DataType only applies to value, this will be the type to parse value to
|
||||
DataType string
|
||||
|
||||
@@ -109,7 +112,7 @@ func NewParser(config *Config) (Parser, error) {
|
||||
config.Templates, config.DefaultTags)
|
||||
case "collectd":
|
||||
parser, err = NewCollectdParser(config.CollectdAuthFile,
|
||||
config.CollectdSecurityLevel, config.CollectdTypesDB)
|
||||
config.CollectdSecurityLevel, config.CollectdTypesDB, config.CollectdSplit)
|
||||
case "dropwizard":
|
||||
parser, err = NewDropwizardParser(
|
||||
config.DropwizardMetricRegistryPath,
|
||||
@@ -172,8 +175,9 @@ func NewCollectdParser(
|
||||
authFile string,
|
||||
securityLevel string,
|
||||
typesDB []string,
|
||||
split string,
|
||||
) (Parser, error) {
|
||||
return collectd.NewCollectdParser(authFile, securityLevel, typesDB)
|
||||
return collectd.NewCollectdParser(authFile, securityLevel, typesDB, split)
|
||||
}
|
||||
|
||||
func NewDropwizardParser(
|
||||
|
||||
Reference in New Issue
Block a user