Update field value in InfluxDB

In the InfluxDB dimension, how can I update the values ​​of the point fields that match the query? Is this still not easy to do with v1.4 ?

As the example in this GitHub proposal showed, what is the cleanest way to achieve something like this?

UPDATE access_log SET username='something' WHERE mac='xxx' 

Is there anything better than driving all of this from a customer updating individual points ?

0
source share
1 answer

Q: How to update the values ​​of the fields corresponding to the query? Is this still not easy to do with v1.4?

A: As far as I know, in version 1.4 there is no easy way to update .

Field value point can only be updated by redefinition. That is, to rewrite its value, you need to know the details of your points. This data includes information about timestamp and series , which is the dimension that it contains, and its corresponding tags .

Note. This update strategy can only be used to change the field value, but not the tag . To update the tag value, you must first DELETE specify the point data and rewrite all the point data with the updated tag and value.

Q: Is there anything better than managing an entire client by updating individual points?

A: Influxdb supports multi-drop recording . Therefore, if you can create a filter to pre-select a small set of point data, change their field values ​​and then redefine them in bulk.

+2
source

Source: https://habr.com/ru/post/1263709/


All Articles