While @Michael's answer is true that you cannot change tag values โโusing InfluxDB commands, however you can write a client script that can change the tag value by inserting โduplicateโ in the dimension with the same time stamp, set of fields and tags, except that the search tag changes its value.
Point with invalid tag (in Line protocol format ):
cpu,hostname=machine.lan cpu=50 1514970123
After launch
INSERT cpu,hostname=machine.mydomain.com cpu=50 1514970123
SELECT * FROM CPU will turn on
cpu,hostname=machine.lan cpu=50 1514970123 cpu,hostname=machine.mydomain.com cpu=50 1514970123
After the script runs all the INSERT commands, you need to drop the outdated series of points with the old tag value:
DROP SERIES FROM cpu WHERE hostname='machine.lan'
Of course, this is very inefficient (note, in particular, this error ), and if you need to update the tag value to another tag value, which other points that you do not want to delete already have , you cannot just DROP SERIES . Therefore, please vote for InfluxDB to implement tag renaming and, in particular, change tag values โโbased on WHERE queries. Or consider an alternative time series database that allows you to use regular SQL, such as Timescale .
source share