1

I am new to using influxdb (v1.7.4), and I am using its python module (influxdb-python). I want to write data in bulk into influxdb. But unable to get the correct output when using the write_points method.

point = [
        {
            "fields": {
                "PATH": "/",
                "DISK_USED_PERCENT": "10"
            },
            "measurement": "xxxxxxx"
        },
        {
            "fields": {
                "PATH": "/xxxxxxxxx",
                "DISK_USED_PERCENT": "0"
            },
            "measurement": "xxxxxxx"
        }
        ]

client.write_points(point)

I want to add multiple points in a go. As per the documentation, it can be done by providing a list of dictionaries. But the result I'm seeing is only taking the last item from the list and creating a ResultSet with it.

ResultSet({'('xxxxxxx', None)': [{'time': '2021-05-10T09:38:20.818555Z', 'DISK_USED_PERCENT': '0', 'PATH': '/xxxxxxxxx'}]})

Any leads would be appreciated.

0 Answers0