简体   繁体   English

InfluxDB 字段值混合来自另一个测量

[英]InfluxDB field values mixed from another measurement

I'm sending data into influx-DB 1.8 OSS , which has 2 measurements.我正在将数据发送到influx-DB 1.8 OSS ,它有 2 个测量值。 In that one measurement got mixed field values from another measurement.在那一次测量中,从另一次测量中获得了混合场值。

Eg:例如:

measurement 1测量 1

field: Apple, Banana, Grapes, Orange

Measurement 2测量 2

field: Potato, Cucumber, Onion, Carrot

When I checked measurement 1 , I got the result:当我检查测量 1时,我得到了结果:

Apple Banana Potato Grapes Onion Orange.

Why did this happen?为什么会这样? I'm using Python to push data to InfluxDB.我正在使用Python将数据推送到 InfluxDB。 For measurement 1 and measurement 2 I'm using separate function.对于测量 1测量 2 ,我使用单独的功能。 And using Multiprocessing to Push at the same time to InfluxDB.并使用Multiprocessing同时推送到 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?您能否尝试为您的 Python 客户端共享您的 JSON 主体,以便我们确定根本原因? I might just double check the measurement section in the JSON body.我可能会仔细检查 JSON 正文中的测量部分。 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
            }
        }
    ]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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