From e25fbed0de030164a4ba799a93a853a452a6306a Mon Sep 17 00:00:00 2001 From: Max U Date: Thu, 28 Jun 2018 16:00:32 -0700 Subject: [PATCH] add old exported func NewJSONParser --- plugins/parsers/registry.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/parsers/registry.go b/plugins/parsers/registry.go index a1580fe53..048eb2308 100644 --- a/plugins/parsers/registry.go +++ b/plugins/parsers/registry.go @@ -143,6 +143,19 @@ func newJSONParser( return parser, nil } +func NewJSONParser( + metricName string, + tagKeys []string, + defaultTags map[string]string, +) (Parser, error) { + parser := &json.JSONParser{ + MetricName: metricName, + TagKeys: tagKeys, + DefaultTags: defaultTags, + } + return parser, nil +} + func NewNagiosParser() (Parser, error) { return &nagios.NagiosParser{}, nil }