Skip to content

unpivot does not work if tagpass is set #8044

@neben

Description

@neben

Relevant telegraf.conf:

[[processors.unpivot]]
  [processors.unpivot.tagpass]
    cpu = ["cpu0"]
  tag_key = "name"
  value_key = "value"

System info:

Telegraf version 1.15.2
Docker 19.03.12 running on Debian Linux version 10.5

Docker

Steps to reproduce:

Use the unpivot processor as illustrated in the documentation, but add a tagpass filter to filter for measurements with tag cpu=cpu0.

Expected behavior:

The fields in the cpu measurement should be unpivoted, i.e., there should be a new measurement for each field, tagged with the field name and having exactly one metric.

Actual behavior:

The measurement is dropped, with the following debug info:

2020-08-27 15:53:19 | 2020-08-27T13:53:19Z D! [serializers.influx] could not serialize field "": invalid field key; discarding field

Additional info:

The unpivot processor works fine, if there are no filters given, and also if the namepass filter is given.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugunexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions