Skip to content

processors should run in the order they appear in the config #8016

@ssoroka

Description

@ssoroka

Without specifying order, processors are loaded and run in a random order. This makes no sense, as the order they're specified in the .toml file is correct most of the time.

Relevant telegraf.conf:

eg this .conf needs order to work properly

[agent]
  interval = "1s"
  flush_interval = "1s"
  omit_hostname = true

[[inputs.file]]
  name_override = "filesystems_raw"
  files = ["./json.txt"]
  data_format = "value"
  data_type = "string"

[[processors.parser]]
  metric_name = "filesystems"
  order = 1
  namepass = "filesystems_raw"
  drop_original = false
  parse_fields = ["value"]
  data_format = "json"
  json_strict = true
  json_query = "filesystems./"
  tag_keys = [
    "mount",
    "device"
  ]

[[processors.parser]]
  metric_name = "filesystems"
  order = 2
  namepass = "filesystems_raw"
  drop_original = false
  parse_fields = ["value"]
  data_format = "json"
  json_strict = true
  json_query = "filesystems./usr"
  tag_keys = [
    "mount",
    "device"
  ]

[[processors.strings]]
  order = 3
  namepass = "filesystems_raw"
  fielddrop = ["value"] # deletes the metric

[[outputs.file]]
  namedrop = "filesystems_raw"
  files = ["stdout"]

Expected behavior:

  • order processors appear in .conf file used as default
  • order = n still exists and not deprecated and can override default config order

Actual behavior:

  • order is random unless specified

Metadata

Metadata

Assignees

Labels

area/agentbugunexpected problem or unintended behaviorsize/m2-4 day effort

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions