From d091a59e6603204ee631047d57bb60c21bd9bbb8 Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Wed, 21 Sep 2022 13:02:41 -0600 Subject: [PATCH] fix: re-allow specifying the influx parser type (#11806) --- config/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index a60a997c7..ac2d9570c 100644 --- a/config/config.go +++ b/config/config.go @@ -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",