简体   繁体   中英

InfluxDB field values mixed from another measurement

I'm sending data into influx-DB 1.8 OSS , which has 2 measurements. In that one measurement got mixed field values from another measurement.

Eg:

measurement 1

field: Apple, Banana, Grapes, Orange

Measurement 2

field: Potato, Cucumber, Onion, Carrot

When I checked measurement 1 , I got the result:

Apple Banana Potato Grapes Onion Orange.

Why did this happen? I'm using Python to push data to InfluxDB. For measurement 1 and measurement 2 I'm using separate function. And using Multiprocessing to Push at the same time to InfluxDB.

Please suggest why this is happening.

I have no right to add comment right now so post suggestions here.

Could you try share your JSON body for your Python client so that we could nail down the root cause? I might just double check the measurement section in the JSON body. There is a great example you could try on. In your case, the body could be:

>>> json_body = 
    [
        {
            "measurement": "measurement 1",
            "time": "2018-03-28T8:01:00Z",
            "fields": {
                "Apple": 11,
                "Banana": 12,
                "Grapes": 13,
                "Orange": 14
            }
        },
        {
            "measurement": "measurement 2",
            "time": "2018-03-28T8:02:00Z",
            "fields": {
                "Potato": 21,
                "Cucumber": 22,
                "Onion": 23,
                "Carrot": 24
            }
        }
    ]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM