# MQTT - parsing problem

**URL:** <https://community.influxdata.com/t/mqtt-parsing-problem/27651>\
**Category:** Telegraf\
**Tags:** mqtt, parser\
**Created:** [December 7, 2022, 10:28am UTC](https://community.influxdata.com/t/mqtt-parsing-problem/27651 "2022-12-07T10:28:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Surfer2010](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/surfer2010/32/11577_2.png) [@Surfer2010](https://community.influxdata.com/u/Surfer2010)\
**Post date:** [December 7, 2022, 10:28am UTC](https://community.influxdata.com/t/mqtt-parsing-problem/27651/1 "2022-12-07T10:28:56Z")

</div>

Hello,  
I have a lot of trouble setting up the correct parsing for my mqtt datastream.  
this is a view to the data:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/e/ee6cf1f0a54c15c4c1f94744280945791e3b3937.png)

and here is my telegraf.conf

```auto
  urls = ["http://192.168.178.123:8086"]
  token = "xxxxxxxxxxxxxxxxxx"
  organization = "myorg"
  bucket = "data"

[[outputs.file]]
  files = ["stdout", "/tmp/metrics.out"]

[[inputs.mqtt_consumer]]
  servers = ["tcp://192.168.178.123:1887"]
  topics = [
    "solarmodul/SENSOR/#",
  ]
  data_format = "json"
  username = "xxxxxx"
  password = "xxxxxx"

[[inputs.mqtt_consumer]]
  servers = ["tcp://192.168.178.123:1887"]
  topics = [
    "SchachtSensor/Luftdruck/#"
    [[inputs.mqtt_consumer.topic_parsing]]
        topic = "_/topic"
        measurement = "measurement/_"
  ]
  data_format = "value"
  data_type= "float"
  username = "xxxxxx"
  password = "xxxxxx"

```

I did get this bottom “SchachtSensor/Luftdruck” to show up on influx but only as “value” … so this way all values would be written in the same spot.  
Thanks for your help I just didn’t find any helpfull tutorial on this parsing problem

---

<div class="post-metadata">

**Author:** ![srebhan](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/srebhan/32/8572_2.png) [@srebhan](https://community.influxdata.com/u/srebhan)\
**Post date:** [December 8, 2022, 2:45pm UTC](https://community.influxdata.com/t/mqtt-parsing-problem/27651/2 "2022-12-08T14:45:47Z")

</div>

There is an [explicit example in the documentation](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/mqtt_consumer#field-pivoting-example) for exactly this case. Can you please try this and let me know if it fixes your problem!?
