From 0d21296aede9c9b8f5ab08c3986a4c9bd327b13c Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Mon, 21 May 2018 16:39:15 -0700 Subject: [PATCH] Expose graphite_tag_support option in graphite output data format --- internal/config/config.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/config/config.go b/internal/config/config.go index 4c6ed5624..e7a008f4b 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -1409,6 +1409,18 @@ func buildSerializer(name string, tbl *ast.Table) (serializers.Serializer, error } } + if node, ok := tbl.Fields["graphite_tag_support"]; ok { + if kv, ok := node.(*ast.KeyValue); ok { + if b, ok := kv.Value.(*ast.Boolean); ok { + var err error + c.GraphiteTagSupport, err = b.Boolean() + if err != nil { + return nil, err + } + } + } + } + if node, ok := tbl.Fields["json_timestamp_units"]; ok { if kv, ok := node.(*ast.KeyValue); ok { if str, ok := kv.Value.(*ast.String); ok { @@ -1428,6 +1440,7 @@ func buildSerializer(name string, tbl *ast.Table) (serializers.Serializer, error delete(tbl.Fields, "influx_max_line_bytes") delete(tbl.Fields, "influx_sort_fields") delete(tbl.Fields, "influx_uint_support") + delete(tbl.Fields, "graphite_tag_support") delete(tbl.Fields, "data_format") delete(tbl.Fields, "prefix") delete(tbl.Fields, "template")