Skip to content

telegraf fails to handle negative inputs since 1.2.0 #2324

@faheus

Description

@faheus

Bug report

Since the update to Version 1.2.0, the mqtt_consumer plugin fails to fetch negative numbers

Relevant telegraf.conf:

[[inputs.mqtt_consumer]]
servers = ["localhost:1883"]
qos = 0

   topics = [
     "lab/sensor/#",
     "office/sensor/#"
   ]

     persistent_session = true

     client_id = "telegraf"
    username = "telegraf"
    password = ""
   data_format = "value"
   data_type = "float"

System info:

Telegrav v1.2.0, Debian Jessie.

Steps to reproduce:

  1. configure output.file to output in /tmp/metrics.out
  2. tail -f on that file
  3. Publish a negative Value in an MQTT Topic -> No output in this file
  4. Publish a positive Value in an MQTT Topic -> gets shown: mqtt_consumer,topic=office/sensor/esp_0f4b61/temperature,host=host value=21.8125 1485459636345140907

Expected behavior:

As in a previous Version, it should deliver also the Negative Values.

Additional info:

The configfile didn't change in the Update.

Metadata

Metadata

Assignees

Labels

bugunexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions