-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to DELETE TAG VALUES in Influxdb? #5092
Comments
I scan #4029.But it still does not help me.What I want is to filter TAG VALUES by anyway like time.I don't want to show TAG VALUES that do not contain any datas. Please! |
@meng2014 I linked you to that request to show you that InfluxDB is not like a relational database with a fixed and centralized schema. There is no one central store that "knows" whether any points have a particular tag value or not. The tag value appears in the series index, meaning at least one point has been written with that tag value, but there is no way and likely never will be a way to determine whether that point is still in the database. Consistency like that is I/O and computationally intensive. InfluxDB achieves high throughput by avoiding that complexity and resource cost, but it does mean there are some traditional database functions that InfluxDB cannot do. |
@beckettsean OK,Thanks for your answers.I understand the design intent of InfluxDB.I respect it.But I retain my demand.Because I think maybe it is important for some scenes.Thank you. |
@meng2014 If all you need is to remove tags from the index, you can achieve what you want with |
The ability to strip tags off a measurement could be useful, perhaps a something was added as a tag, but on second though you realize that it is increasing your cardinality too rapidly. Thus, you stop pushing that tag, but you still want to retain the old data. I imagine you could do something with a continuous query or SELECT INTO to remove the tag from the old data, but it would be nice if there was an easy way to do it. |
I I do, for example: DROP SERIES WHERE "host" = 'vcrsappn.moscow.alfaintra.net' then I still see this host in SHOW TAG VALUES WITH key = "host" output. |
Hi, I have same issue, but when I do DROP SERIES WHERE host = some_host I still see tag value some_host even I restart influxdb. Just updated from previous version to 1.6.0 and problem is still here. |
@Naumis1 please provide |
Hi, thanks for replay. Here's output:
host rob-test-virt name: disk host rob-test-virt name: diskio host rob-test-virt name: interrupts host rob-test-virt name: kernel host rob-test-virt name: linux_sysctl_fs host rob-test-virt name: mem host rob-test-virt name: net host rob-test-virt name: netstat host rob-test-virt name: processes host rob-test-virt name: soft_interrupts host rob-test-virt name: swap host rob-test-virt name: system host rob-test-virt
|
I'm having the same issue on 2 different measurements. One is OK after influxdb restart (DROPped tag disappear after influxdb is restarted). On the other measurement (snmp), old junk tag is retain even after all related series has been dropped and influx has also been restart several time.
This measurements is OK, all junk metric (tag) is gone after series is dropped and influxdb is
This one is polluted no mater what I do, any query to these tag/metric return nothing so I'm pretty sure all the related series has been gone
So I'm assuming that series somehow stayed in indexes even after the DROP query has been isssued. Is there any good way to track this bug and drop these index other than SELECT INTO? |
I face the same issue. Restart does not help. Anything that I'm doing wrong?
|
@ZhukovAlexey @Naumis1 @moophat @akamac I think the issue that tags of dropped series still appear in SHOW TAG VALUES is being tracked here: #10285 |
One workaround can be to remove all the data tagged with the relevant tag key, then restart your influx service and influx should remove that tag value. |
I recently use InfluxDB to save my datas.AND when save data to InfluxDb,I set a TAG key of "host" with the value of "myhost" to series,like this:
Point.measurement("supervisor").field("slotsTotal", tmp.getSlotsTotal()).tag("host", tmp.getHost());
AND,I set a RETENTION POLICIES of 7 days to this database. That means datas retain 7 days.After 7 days those will be deleted.
Then,the issue is coming..
After datas deleted , the TAG VALUES of those datas is NOT deleted.There is a phenomenon that all datas with this TAG VALUE are deleted,but this TAG VALUE not deleted.Then I want SHOW current TAG VALUES ,that means I want to show TAG VALUES that contains some datas NOT none datas.AND all VALUES hits.AND I do not find DELETE TAG VALUES function.Please help me..
The text was updated successfully, but these errors were encountered: