Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[telegraf-ds] Single bracket for single element in map list interface #664

Open
nicolas-rey opened this issue Aug 13, 2024 · 0 comments
Open

Comments

@nicolas-rey
Copy link

Telegraf-ds Helm chart version: 1.1.32
Telegraf Docker image 1.29-alpine
Amazon Linux on EKS

I'm trying to put processors.converter in telegraf-ds configuration.

On this processors I want to convert tags to fields, for exemple the expected config will be :

[[processors.converter]]
  namepass = ["ping"]
  [processors.converter.tags]
    string = [
      "host",
      "name",
      "url"
    ]

For this, configuration on YAML for telegraf-ds is:

config:
 # [...]
  inputs:
  processors:
    - converter:
        namepass:
          - ping
        tags:
          string:
            - host
            - name
            - url

With the actual template for telegraf-ds the result is :

[[processors.converter]]
  namepass = ["ping"]
  [[processors.converter.tags]]
    string = [
      "host"
      "name",
      "url"
    ]

Two problems here:

  1. processors.converter.tags have two bracket and not one (https://github.com/influxdata/helm-charts/blob/telegraf-ds-1.1.32/charts/telegraf-ds/templates/_helpers.tpl#L228)
  2. first element of string list don't have comma

I've check on telegraf template and it's good. An If statement is in place for used single bracket with converter, override, clone and two brackets for other (https://github.com/influxdata/helm-charts/blob/telegraf-1.8.51/charts/telegraf/templates/_helpers.tpl#L342)

After check all templates and part, 3 syntaxe is present for manage map string interface :


Can you used one if statement on processors in telegraf-ds for allow processors.converter ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant