influxdata / influxdata/helm-charts

Telegraf helmchart: error parsing mqtt_consumer, adding parser failed: line 59: cannot unmarshal TOML table into []xpath.Config (need struct or map

Open
#641 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Mustache
Stars
257
Forks
347
Avg merge
4d 20h
Merged PRs (30d)
9

Description

Hi,

I'm trying to configure Telegraf using the values.yaml file. Part of the configuration is a [[inputs.mqtt_consumer.xpath]] block in the mqtt_consumer:

[[inputs.mqtt_consumer.xpath]]
timestamp = "/timestamp"
timestamp_format = "unix"
tag_selection = "/tags/*"
field_selection = "/fields/*"

In the values.yaml file I translated this to:

xpath:
timestamp: "/timestamp"
timestamp_format: "unix"
tag_selection: "/tags/*"
field_selection: "/fields/*"

Unfortunately this gives me the following error:

Telegraf helmchart: error parsing mqtt_consumer, adding parser failed: line 59: cannot unmarshal TOML table into []xpath.Config (need struct or map)

Contributor guide

Open the contributing guide

Research direction

Start with the chart's values.yaml and the mqtt_consumer configuration templating, tracing how the xpath block is rendered into Telegraf configuration. Verify that the rendered configuration represents the repeated xpath entries expected by Telegraf, then confirm the chart installs without the reported TOML unmarshalling error.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.