Influxdb: Impossible to delete/drop series when tag value includes dash character

Created on 20 Jun 2018  路  5Comments  路  Source: influxdata/influxdb

Bug report

I am trying to delete all series from and old host not anymore in use.

__System info:__

# influxd version
InfluxDB v1.4.3 (git: 1.4 60d27e6995558f38a39e90b35a92cbac080310a3)
# influx --version
InfluxDB shell version: 1.4.3

__Steps to reproduce:__

  1. USE telegraf
  2. DROP SERIES WHERE "host" = 'thisisokhost'
  3. SHOW SERIES WHERE "host" = 'thisisokhost' >> does not list results(CORRECT)
  4. DROP SERIES WHERE "host" = 'this-is-not-ok-host'
  5. SHOW SERIES WHERE "host" = 'this-is-not-ok-host' >> lists results (ERROR)
  6. DELETE FROM <measurement> WHERE "host" = 'this-is-not-ok-host'
  7. SHOW SERIES WHERE "host" = 'this-is-not-ok-host' >> lists results (ERROR)

__Expected behavior:__

4 and 6 should delete all series from tag value 'this-is-not-ok-host'.

__Actual behavior:__

Deleting series at point 4 and 6 does not work as expected. There's still contents after running 5 and 7.
I suspect the problem is from the hostname (tag value) using "-" (dash).

kinbug need more info

All 5 comments

@carlessanagustin can you upgrade to 1.5.3 and see if you can reproduce? We made some changes to drops and deletes in 1.5.

@e-dard

  1. upgraded to 1.5 and now DROP works fine :)
  2. but hosts keep appearing in chronograf 1.5 /sources/0/hosts dashboard until I restart influx service :(

any flush option available?

@carlessanagustin that seems like a Chronograf issue? Maybe you could file a ticket over at Chronograf? I'm going to close this as this particular issue seems to be resolved.

Reopening this. Chronograf doesn't "cache" any host list data, so it must be coming from the database somehow. Here are the queries Chronograf runs on the host list page. Try running them in the DB and see if the host is returned.

SHOW TAG VALUES WITH KEY = "host";

show series from /^apache$|^consul_health_checks$|^consul_consul_fsm_register$|^consul_memberlist_msg_alive$|^consul_raft_state_candidate$|^consul_consul_http_GET_v1_health_state__$|^consul_raft_state_leader$|^consul_serf_events$|^cpu$|^disk$|^diskio$|^docker$|^docker_container_blkio$|^docker_container_net$|^elasticsearch_indices$|^haproxy$|^influxdb_database$|^influxdb_httpd$|^influxdb_queryExecutor$|^influxdb_write$|^kubernetes_node$|^kubernetes_pod_container$|^kubernetes_pod_network$|^kubernetes_system_container$|^system$|^mem$|^memcached$|^mesos$|^mongodb$|^mysql$|^net$|^netstat$|^nginx$|^nsq_channel$|^nsq_server$|^nsq_topic$|^phpfpm$|^ping$|^postgresql$|^processes$|^procstat$|^rabbitmq_node$|^redis$|^riak$|^varnish$|^win_cpu$|^win_mem$|^win_net$|^win_system$|^win_websvc$/

It looks like upgrading telegraf solves the issue :|
and chronograf does not display the host anymore.

root@ws-test-ito-mon-001:~# telegraf version
Telegraf v1.5.3 (git: release-1.5 1e519698)
root@ws-test-ito-mon-001:~# apt-get install --only-upgrade telegraf
root@ws-test-ito-mon-001:~# telegraf version
Telegraf v1.7.0 (git: release-1.7 f4d22dd4)

Full screencast with version v1.5 then v1.7:
https://gist.github.com/carlessanagustin/1e185b2b497966c9fd4f55e90b43ea62

Was this page helpful?
0 / 5 - 0 ratings

Related issues

beckettsean picture beckettsean  路  44Comments

beckettsean picture beckettsean  路  81Comments

phemmer picture phemmer  路  60Comments

beckettsean picture beckettsean  路  83Comments

beckettsean picture beckettsean  路  43Comments