influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.59k stars 5.56k forks source link

telegraf fails to handle negative inputs since 1.2.0 #2324

Closed faheus closed 7 years ago

faheus commented 7 years ago

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.

sparrc commented 7 years ago

can confirm that this is affecting all plugins using the influx parser, will have a fix and a 1.2.1 release available soon