fix: re-allow specifying the influx parser type (#11806)

This commit is contained in:
Joshua Powers 2022-09-21 13:02:41 -06:00 committed by GitHub
parent ba99426c86
commit d091a59e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -699,6 +699,11 @@ func (c *Config) addParser(parentname string, table *ast.Table) (*models.Running
dataformat = "influx"
}
}
var influxParserType string
c.getFieldString(table, "influx_parser_type", &influxParserType)
if dataformat == "influx" && influxParserType == "upstream" {
dataformat = "influx_upstream"
}
creator, ok := parsers.Parsers[dataformat]
if !ok {
@ -1213,7 +1218,7 @@ func (c *Config) missingTomlField(_ reflect.Type, key string) error {
"tagdrop", "tagexclude", "taginclude", "tagpass", "tags":
// Parser options to ignore
case "data_type":
case "data_type", "influx_parser_type":
// Serializer options to ignore
case "prefix", "template", "templates",