Skip to content

Line protocol implementation includes empty tags, which Telegraf can't parse #12

@martinraag

Description

@martinraag

The line protocol doesn't purge None or empty string values from tags. This causes Telegraf to fail parsing the message.

For example, for the following code:

from telegraf.client import TelegrafClient

client = TelegrafClient('localhost', 8094)
tags = {'foo': ''}
client.metric('metric', 1, tags=tags)

Running Telegraf version 1.8.0, the following error message is displayed:

2018-10-02T19:33:37Z E! Error in plugin [inputs.socket_listener]: unable to parse incoming packet: metric parse error: expected tag at offset 11: "metric,foo= value=1i\n"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions